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_VALUE_ACTOR_HPP
9 #define BOOST_SPIRIT_ACTOR_REF_CONST_REF_VALUE_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 // and a const reference to value_ref.
21 // act methods are feed with ref, value_ref and the parse result.
23 // (This doc uses convention available in actors.hpp)
26 // ...(T& ref_, ValueT const& value_ref_);
27 // where ref_ and value_ref_ are stored in the holder.
30 // act(ref, value_ref, value);
31 // act(ref, value_ref, first, last);
35 ///////////////////////////////////////////////////////////////////////////
41 class ref_const_ref_value_actor : public ActionT
45 ValueT const& value_ref;
47 ref_const_ref_value_actor(
49 ValueT const& value_ref_
58 void operator()(T2 const& val_) const
60 this->act(ref,value_ref,val_); // defined in ActionT
64 template<typename IteratorT>
66 IteratorT const& first_,
67 IteratorT const& last_
70 this->act(ref,value_ref,first_,last_); // defined in ActionT
74 BOOST_SPIRIT_CLASSIC_NAMESPACE_END