1 /*=============================================================================
2 Copyright (c) 2003 Jonathan de Halleux (dehalleux@pelikhan.com)
3 Copyright (c) 2011 Bryce Lelbach
4 http://spirit.sourceforge.net/
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
9 #ifndef BOOST_SPIRIT_ACTOR_REF_VALUE_ACTOR_HPP
10 #define BOOST_SPIRIT_ACTOR_REF_VALUE_ACTOR_HPP
12 #include <boost/detail/workaround.hpp>
14 #include <boost/spirit/home/classic/namespace.hpp>
16 namespace boost { namespace spirit {
18 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
20 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
22 #pragma warning(disable:4512) //assignment operator could not be generated
25 ///////////////////////////////////////////////////////////////////////////
27 // A semantic action policy holder. This holder stores a reference to ref.
28 // act methods are feed with ref and the parse result.
30 // (This doc uses convention available in actors.hpp)
34 // where ref_ is stored.
38 // act(ref, first,last);
42 ///////////////////////////////////////////////////////////////////////////
47 class ref_value_actor : public ActionT
53 ref_value_actor(T& ref_)
58 void operator()(T2 const& val_) const
60 this->act(ref,val_); // defined in ActionT
64 template<typename IteratorT>
66 IteratorT const& first_,
67 IteratorT const& last_
70 this->act(ref,first_,last_); // defined in ActionT
74 BOOST_SPIRIT_CLASSIC_NAMESPACE_END
76 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)