1 /*=============================================================================
2 Copyright (c) 2003 Jonathan de Halleux (dehalleux@pelikhan.com)
3 http://spirit.sourceforge.net/
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 #ifndef BOOST_SPIRIT_ACTOR_REF_CONST_REF_CONST_REF_ACTOR_HPP
9 #define BOOST_SPIRIT_ACTOR_REF_CONST_REF_CONST_REF_ACTOR_HPP
11 #include <boost/spirit/home/classic/namespace.hpp>
13 namespace boost { namespace spirit {
15 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
17 ///////////////////////////////////////////////////////////////////////////
19 // A semantic action policy holder. This holder stores a reference to ref
20 // , a const reference to value1_ref and a const reference to value2_ref.
21 // Typically, value1_ref is a key and value2_ref is value for associative
22 // container operations.
23 // act methods are feed with ref, value1_ref, value2_ref. The parse result
24 // is not used by this holder.
26 // (This doc uses convention available in actors.hpp)
31 // Value1T const& value1_ref_,
32 // Value2T const& value2_ref_ );
33 // where ref_, value1_ref and value2_ref_ are stored in the holder.
36 // act(ref, value1_ref, value2_ref);
40 ///////////////////////////////////////////////////////////////////////////
47 class ref_const_ref_const_ref_actor : public ActionT
51 Value1T const& value1_ref;
52 Value2T const& value2_ref;
54 ref_const_ref_const_ref_actor(
56 Value1T const& value1_ref_,
57 Value2T const& value2_ref_
61 value1_ref(value1_ref_),
62 value2_ref(value2_ref_)
67 void operator()(T2 const& /*val*/) const
69 this->act(ref,value1_ref,value2_ref); // defined in ActionT
73 template<typename IteratorT>
75 IteratorT const& /*first*/,
76 IteratorT const& /*last*/
79 this->act(ref,value1_ref,value2_ref); // defined in ActionT
83 BOOST_SPIRIT_CLASSIC_NAMESPACE_END