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_ACTOR_HPP
9 #define BOOST_SPIRIT_ACTOR_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 // and a const reference to value_ref.
21 // act methods are feed with ref and value_ref. The parse result is
22 // not used by this holder.
24 // (This doc uses convention available in actors.hpp)
27 // ...(T& ref_, ValueT const& value_ref_);
28 // where ref_ and value_ref_ are stored in the holder.
31 // act(ref, value_ref);
35 ///////////////////////////////////////////////////////////////////////////
41 class ref_const_ref_actor : public ActionT
45 ValueT const& value_ref;
49 ValueT const& value_ref_
58 void operator()(T2 const& /*val*/) const
60 this->act(ref,value_ref); // defined in ActionT
64 template<typename IteratorT>
66 IteratorT const& /*first*/,
67 IteratorT const& /*last*/
70 this->act(ref,value_ref); // defined in ActionT
74 BOOST_SPIRIT_CLASSIC_NAMESPACE_END