From ff11bb5eff8a87996a156091098daf09c2e71ad6 Mon Sep 17 00:00:00 2001 From: Christophe Henry Date: Mon, 7 Jun 2010 20:51:03 +0000 Subject: [PATCH] corrected inspection report warnings [SVN r62522] --- include/boost/msm/back/bind_helpers.hpp | 20 +- include/boost/msm/back/copy_policies.hpp | 2 +- .../boost/msm/back/default_compile_policy.hpp | 2 +- include/boost/msm/back/dispatch_table.hpp | 32 +- include/boost/msm/back/favor_compile_time.hpp | 230 +-- include/boost/msm/back/history_policies.hpp | 36 +- include/boost/msm/back/metafunctions.hpp | 188 +- include/boost/msm/back/state_machine.hpp | 130 +- .../boost/msm/front/detail/common_states.hpp | 12 +- include/boost/msm/front/euml/common.hpp | 336 ++-- include/boost/msm/front/euml/container.hpp | 944 +++++----- include/boost/msm/front/euml/euml.hpp | 2 +- include/boost/msm/front/euml/euml_typeof.hpp | 2 +- .../boost/msm/front/euml/guard_grammar.hpp | 124 +- include/boost/msm/front/euml/operator.hpp | 1616 ++++++++--------- .../boost/msm/front/euml/state_grammar.hpp | 432 ++--- include/boost/msm/front/euml/stl.hpp | 2 +- include/boost/msm/front/euml/stt_grammar.hpp | 8 +- .../boost/msm/front/euml/transformation.hpp | 132 +- include/boost/msm/front/functor_row.hpp | 2 +- include/boost/msm/front/internal_row.hpp | 50 +- include/boost/msm/front/row2.hpp | 146 +- include/boost/msm/front/state_machine_def.hpp | 190 +- 23 files changed, 2319 insertions(+), 2319 deletions(-) diff --git a/include/boost/msm/back/bind_helpers.hpp b/include/boost/msm/back/bind_helpers.hpp index d415fa1..a2f8316 100644 --- a/include/boost/msm/back/bind_helpers.hpp +++ b/include/boost/msm/back/bind_helpers.hpp @@ -18,22 +18,22 @@ namespace boost { namespace msm { namespace back // helper to replace std::plus as the lack of implicit conversion makes it not usable in one of our bind template struct plus2 - : public std::binary_function<_Ty, _Tz, _Ty> + : public std::binary_function<_Ty, _Tz, _Ty> { // functor for operator+ - _Ty operator()( _Ty _Left, _Tz _Right) const - { // apply operator+ to operands - return (_Left + _Right); - } + _Ty operator()( _Ty _Left, _Tz _Right) const + { // apply operator+ to operands + return (_Left + _Right); + } }; // helper to dereference a pointer to a function pointer template struct deref { - typedef T& result_type; - T& operator()(T* f) const - { - return *f; - } + typedef T& result_type; + T& operator()(T* f) const + { + return *f; + } }; } } }//boost::msm::back #endif //BOOST_MSM_BACK_BIND_HELPERS_H diff --git a/include/boost/msm/back/copy_policies.hpp b/include/boost/msm/back/copy_policies.hpp index 6ebc03f..1622313 100644 --- a/include/boost/msm/back/copy_policies.hpp +++ b/include/boost/msm/back/copy_policies.hpp @@ -19,7 +19,7 @@ namespace boost { namespace msm { namespace back struct NoCopy : ::boost::noncopyable { }; - + // allows deep copy struct DeepCopy { diff --git a/include/boost/msm/back/default_compile_policy.hpp b/include/boost/msm/back/default_compile_policy.hpp index 857cdad..8c328d8 100644 --- a/include/boost/msm/back/default_compile_policy.hpp +++ b/include/boost/msm/back/default_compile_policy.hpp @@ -17,7 +17,7 @@ namespace boost { namespace msm { namespace back { struct favor_runtime_speed { - typedef ::boost::mpl::true_ add_forwarding_rows; + typedef ::boost::mpl::true_ add_forwarding_rows; }; }}}// boost::msm::back diff --git a/include/boost/msm/back/dispatch_table.hpp b/include/boost/msm/back/dispatch_table.hpp index 5c92076..7acbe0d 100644 --- a/include/boost/msm/back/dispatch_table.hpp +++ b/include/boost/msm/back/dispatch_table.hpp @@ -153,18 +153,18 @@ struct dispatch_table template struct default_init_cell { - default_init_cell(dispatch_table* self_,cell* tofill_entries_) - : self(self_),tofill_entries(tofill_entries_) - {} + default_init_cell(dispatch_table* self_,cell* tofill_entries_) + : self(self_),tofill_entries(tofill_entries_) + {} template typename ::boost::enable_if::type,void>::type operator()(boost::msm::wrap const&,boost::msm::back::dummy<0> = 0) - { + { typedef typename create_stt::type stt; BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); cell call_no_transition = &Fsm::defer_transition; tofill_entries[state_id] = call_no_transition; - } + } template typename ::boost::disable_if::type,void >::type operator()(boost::msm::wrap const&,boost::msm::back::dummy<1> = 0) @@ -175,8 +175,8 @@ struct dispatch_table tofill_entries[state_id] = call_no_transition; } - dispatch_table* self; - cell* tofill_entries; + dispatch_table* self; + cell* tofill_entries; }; // variant for anonymous transitions @@ -185,23 +185,23 @@ struct dispatch_table typename ::boost::enable_if< typename is_completion_event::type>::type> { - default_init_cell(dispatch_table* self_,cell* tofill_entries_) - : self(self_),tofill_entries(tofill_entries_) - {} + default_init_cell(dispatch_table* self_,cell* tofill_entries_) + : self(self_),tofill_entries(tofill_entries_) + {} // this event is a compound one (not a real one, just one for use in event-less transitions) // Note this event cannot be used as deferred! - template + template void operator()(boost::msm::wrap const&) - { + { typedef typename create_stt::type stt; BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); cell call_no_transition = &Fsm::default_eventless_transition; tofill_entries[state_id] = call_no_transition; - } + } - dispatch_table* self; - cell* tofill_entries; + dispatch_table* self; + cell* tofill_entries; }; public: @@ -209,7 +209,7 @@ struct dispatch_table dispatch_table() { // Initialize cells for no transition - ::boost::mpl::for_each::type, + ::boost::mpl::for_each::type, boost::msm::wrap< ::boost::mpl::placeholders::_1> > (default_init_cell(this,entries)); diff --git a/include/boost/msm/back/favor_compile_time.hpp b/include/boost/msm/back/favor_compile_time.hpp index 8d16ea6..c36ada8 100644 --- a/include/boost/msm/back/favor_compile_time.hpp +++ b/include/boost/msm/back/favor_compile_time.hpp @@ -29,41 +29,41 @@ namespace boost { namespace msm { namespace back template struct process_any_event_helper { - process_any_event_helper(msm::back::HandledEnum& res_,Fsm* self_,::boost::any any_event_): - res(res_),self(self_),any_event(any_event_),finished(false){} - template - void operator()(boost::msm::wrap const&) - { - if ( ! finished && ::boost::any_cast(&any_event)!=0) - { - finished = true; - res = self->process_event(::boost::any_cast(any_event)); - } - } + process_any_event_helper(msm::back::HandledEnum& res_,Fsm* self_,::boost::any any_event_): + res(res_),self(self_),any_event(any_event_),finished(false){} + template + void operator()(boost::msm::wrap const&) + { + if ( ! finished && ::boost::any_cast(&any_event)!=0) + { + finished = true; + res = self->process_event(::boost::any_cast(any_event)); + } + } private: - msm::back::HandledEnum& res; - Fsm* self; - ::boost::any any_event; - bool finished; + msm::back::HandledEnum& res; + Fsm* self; + ::boost::any any_event; + bool finished; }; #define BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(fsmname) \ namespace boost { namespace msm { namespace back{ \ template<> \ - ::boost::msm::back::HandledEnum fsmname::process_any_event( ::boost::any const& any_event) \ - { \ - typedef ::boost::msm::back::recursive_get_transition_table::type stt; \ - typedef ::boost::msm::back::generate_event_set::type all_events; \ - ::boost::msm::back::HandledEnum res= ::boost::msm::back::HANDLED_FALSE; \ - ::boost::mpl::for_each > \ - (::boost::msm::back::process_any_event_helper(res,this,any_event)); \ - return res; \ - } \ + ::boost::msm::back::HandledEnum fsmname::process_any_event( ::boost::any const& any_event) \ + { \ + typedef ::boost::msm::back::recursive_get_transition_table::type stt; \ + typedef ::boost::msm::back::generate_event_set::type all_events; \ + ::boost::msm::back::HandledEnum res= ::boost::msm::back::HANDLED_FALSE; \ + ::boost::mpl::for_each > \ + (::boost::msm::back::process_any_event_helper(res,this,any_event)); \ + return res; \ + } \ }}} struct favor_compile_time { - typedef ::boost::mpl::false_ add_forwarding_rows; + typedef ::boost::mpl::false_ add_forwarding_rows; }; // Generates a singleton runtime lookup table that maps current state @@ -82,23 +82,23 @@ struct dispatch_table < Fsm, Stt, Event, ::boost::msm::back::favor_compile_time> typedef typename generate_state_set::type state_list; BOOST_STATIC_CONSTANT(int, max_state = ( ::boost::mpl::size::value)); - struct chain_row - { - HandledEnum operator()(Fsm& fsm, int region,int state,Event const& evt) const - { - HandledEnum res = HANDLED_FALSE; - typename std::deque::const_iterator it = one_state.begin(); - while (it != one_state.end() && res != HANDLED_TRUE) - { - HandledEnum handled = (*it)(fsm,region,state,evt); - res = ((HANDLED_GUARD_REJECT==handled) || (HANDLED_GUARD_REJECT==res))? - HANDLED_GUARD_REJECT:handled; - ++it; - } - return res; - } - std::deque one_state; - }; + struct chain_row + { + HandledEnum operator()(Fsm& fsm, int region,int state,Event const& evt) const + { + HandledEnum res = HANDLED_FALSE; + typename std::deque::const_iterator it = one_state.begin(); + while (it != one_state.end() && res != HANDLED_TRUE) + { + HandledEnum handled = (*it)(fsm,region,state,evt); + res = ((HANDLED_GUARD_REJECT==handled) || (HANDLED_GUARD_REJECT==res))? + HANDLED_GUARD_REJECT:handled; + ++it; + } + return res; + } + std::deque one_state; + }; template static HandledEnum call_submachine(Fsm& fsm, int region, int state, Event const& evt) { @@ -155,64 +155,64 @@ struct dispatch_table < Fsm, Stt, Event, ::boost::msm::back::favor_compile_time> template struct default_init_cell { - default_init_cell(dispatch_table* self_,chain_row* tofill_entries_) - : self(self_),tofill_entries(tofill_entries_) - {} - template - struct helper - {}; - template struct helper - { - template - static void execute(boost::msm::wrap const&,chain_row* tofill) - { - typedef typename create_stt::type stt; - BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); - cell call_no_transition = &Fsm::defer_transition; - tofill[state_id].one_state.push_back(call_no_transition); - } - }; - template struct helper - { - template - static void execute(boost::msm::wrap const&,chain_row* tofill) - { - typedef typename create_stt::type stt; - BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); - cell call_no_transition = &Fsm::defer_transition; - tofill[state_id].one_state.push_back(call_no_transition); - } - }; - template struct helper - { - template - static void execute(boost::msm::wrap const&,chain_row* tofill) - { - typedef typename create_stt::type stt; - BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); - cell call_no_transition = &call_submachine< State >; - tofill[state_id].one_state.push_front(call_no_transition); - } - }; - template struct helper - { - template - static void execute(boost::msm::wrap const&,chain_row* tofill) - { - typedef typename create_stt::type stt; - BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); - cell call_no_transition = &Fsm::call_no_transition; - tofill[state_id].one_state.push_back(call_no_transition); - } - }; - template - void operator()(boost::msm::wrap const& s) - { - helper::type::value, - is_composite_state::type::value>::execute(s,tofill_entries); - } - dispatch_table* self; - chain_row* tofill_entries; + default_init_cell(dispatch_table* self_,chain_row* tofill_entries_) + : self(self_),tofill_entries(tofill_entries_) + {} + template + struct helper + {}; + template struct helper + { + template + static void execute(boost::msm::wrap const&,chain_row* tofill) + { + typedef typename create_stt::type stt; + BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); + cell call_no_transition = &Fsm::defer_transition; + tofill[state_id].one_state.push_back(call_no_transition); + } + }; + template struct helper + { + template + static void execute(boost::msm::wrap const&,chain_row* tofill) + { + typedef typename create_stt::type stt; + BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); + cell call_no_transition = &Fsm::defer_transition; + tofill[state_id].one_state.push_back(call_no_transition); + } + }; + template struct helper + { + template + static void execute(boost::msm::wrap const&,chain_row* tofill) + { + typedef typename create_stt::type stt; + BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); + cell call_no_transition = &call_submachine< State >; + tofill[state_id].one_state.push_front(call_no_transition); + } + }; + template struct helper + { + template + static void execute(boost::msm::wrap const&,chain_row* tofill) + { + typedef typename create_stt::type stt; + BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); + cell call_no_transition = &Fsm::call_no_transition; + tofill[state_id].one_state.push_back(call_no_transition); + } + }; + template + void operator()(boost::msm::wrap const& s) + { + helper::type::value, + is_composite_state::type::value>::execute(s,tofill_entries); + } + dispatch_table* self; + chain_row* tofill_entries; }; // variant for anonymous transitions @@ -221,23 +221,23 @@ struct dispatch_table < Fsm, Stt, Event, ::boost::msm::back::favor_compile_time> typename ::boost::enable_if< typename is_completion_event::type>::type> { - default_init_cell(dispatch_table* self_,chain_row* tofill_entries_) - : self(self_),tofill_entries(tofill_entries_) - {} + default_init_cell(dispatch_table* self_,chain_row* tofill_entries_) + : self(self_),tofill_entries(tofill_entries_) + {} // this event is a compound one (not a real one, just one for use in event-less transitions) // Note this event cannot be used as deferred! - template + template void operator()(boost::msm::wrap const&) - { + { typedef typename create_stt::type stt; BOOST_STATIC_CONSTANT(int, state_id = (get_state_id::value)); cell call_no_transition = &Fsm::default_eventless_transition; tofill_entries[state_id].one_state.push_back(call_no_transition); - } + } - dispatch_table* self; - chain_row* tofill_entries; + dispatch_table* self; + chain_row* tofill_entries; }; public: @@ -245,13 +245,13 @@ struct dispatch_table < Fsm, Stt, Event, ::boost::msm::back::favor_compile_time> dispatch_table() { // Initialize cells for no transition - ::boost::mpl::for_each< - ::boost::mpl::filter_view< - Stt, ::boost::is_base_of, Event> > > - (init_cell(this)); + ::boost::mpl::for_each< + ::boost::mpl::filter_view< + Stt, ::boost::is_base_of, Event> > > + (init_cell(this)); - ::boost::mpl::for_each< - typename generate_state_set::type, + ::boost::mpl::for_each< + typename generate_state_set::type, boost::msm::wrap< ::boost::mpl::placeholders::_1> > (default_init_cell(this,entries)); @@ -261,7 +261,7 @@ struct dispatch_table < Fsm, Stt, Event, ::boost::msm::back::favor_compile_time> static const dispatch_table instance; public: // data members - chain_row entries[max_state]; + chain_row entries[max_state]; }; template diff --git a/include/boost/msm/back/history_policies.hpp b/include/boost/msm/back/history_policies.hpp index d4cebc2..4ef9304 100644 --- a/include/boost/msm/back/history_policies.hpp +++ b/include/boost/msm/back/history_policies.hpp @@ -28,18 +28,18 @@ public: void set_initial_states(int* const initial_states) { for (int i=0;i + template int* const history_entry(Event const& ) { - // always come back to the original state - return m_initialStates; + // always come back to the original state + return m_initialStates; } NoHistoryImpl& operator=(NoHistoryImpl const& rhs) { @@ -63,19 +63,19 @@ public: void set_initial_states(int* const initial_states) { for (int i=0;i + template int* const history_entry(Event const& ) { - // always load back the last active state - return m_initialStates; + // always load back the last active state + return m_initialStates; } AlwaysHistoryImpl& operator=(AlwaysHistoryImpl const& rhs) { @@ -100,25 +100,25 @@ public: { for (int i=0;i - int* const history_entry(Event const&) + int* const history_entry(Event const&) { if ( ::boost::mpl::contains::value) - { - return m_currentStates; - } - // not one of our events, no history - return m_initialStates; + { + return m_currentStates; + } + // not one of our events, no history + return m_initialStates; } ShallowHistoryImpl& operator=(ShallowHistoryImpl const& rhs) { diff --git a/include/boost/msm/back/metafunctions.hpp b/include/boost/msm/back/metafunctions.hpp index 91d9133..c3c9fa7 100644 --- a/include/boost/msm/back/metafunctions.hpp +++ b/include/boost/msm/back/metafunctions.hpp @@ -92,49 +92,49 @@ template struct generate_state_ids { typedef typename - ::boost::mpl::fold< - stt,::boost::mpl::pair< ::boost::mpl::map< >, ::boost::mpl::int_<0> >, - ::boost::mpl::pair< - ::boost::mpl::if_< - ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + ::boost::mpl::fold< + stt,::boost::mpl::pair< ::boost::mpl::map< >, ::boost::mpl::int_<0> >, + ::boost::mpl::pair< + ::boost::mpl::if_< + ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, transition_source_type< ::boost::mpl::placeholders::_2> >, - ::boost::mpl::first< ::boost::mpl::placeholders::_1>, - ::boost::mpl::insert< ::boost::mpl::first, - make_pair_source_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, - ::boost::mpl::placeholders::_2> > - >, - ::boost::mpl::if_< - ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + ::boost::mpl::insert< ::boost::mpl::first, + make_pair_source_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, + ::boost::mpl::placeholders::_2> > + >, + ::boost::mpl::if_< + ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, transition_source_type< ::boost::mpl::placeholders::_2> >, - ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, - ::boost::mpl::next< ::boost::mpl::second > - > - > //pair - >::type source_state_ids; + ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, + ::boost::mpl::next< ::boost::mpl::second > + > + > //pair + >::type source_state_ids; typedef typename ::boost::mpl::first::type source_state_map; typedef typename ::boost::mpl::second::type highest_state_id; typedef typename - ::boost::mpl::fold< - stt,::boost::mpl::pair, - ::boost::mpl::pair< - ::boost::mpl::if_< - ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + ::boost::mpl::fold< + stt,::boost::mpl::pair, + ::boost::mpl::pair< + ::boost::mpl::if_< + ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, transition_target_type< ::boost::mpl::placeholders::_2> >, - ::boost::mpl::first< ::boost::mpl::placeholders::_1>, - ::boost::mpl::insert< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, - make_pair_target_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, - ::boost::mpl::placeholders::_2> > - >, - ::boost::mpl::if_< - ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + ::boost::mpl::insert< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, + make_pair_target_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, + ::boost::mpl::placeholders::_2> > + >, + ::boost::mpl::if_< + ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>, transition_target_type< ::boost::mpl::placeholders::_2> >, - ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, - ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > > - > - > //pair - >::type all_state_ids; + ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, + ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > > + > + > //pair + >::type all_state_ids; typedef typename ::boost::mpl::first::type type; }; @@ -151,9 +151,9 @@ template struct get_initial_states { typedef typename ::boost::mpl::if_< - ::boost::mpl::is_sequence, - States, - typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,States>::type >::type type; + ::boost::mpl::is_sequence, + States, + typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,States>::type >::type type; }; // returns a mpl::int_ containing the size of a region. If the argument is not a sequence, returns 1 @@ -161,9 +161,9 @@ template struct get_number_of_regions { typedef typename mpl::if_< - ::boost::mpl::is_sequence, - ::boost::mpl::size, - ::boost::mpl::int_<1> >::type type; + ::boost::mpl::is_sequence, + ::boost::mpl::size, + ::boost::mpl::int_<1> >::type type; }; // builds a mpl::vector of initial states @@ -171,9 +171,9 @@ template struct get_regions_as_sequence { typedef typename ::boost::mpl::if_< - ::boost::mpl::is_sequence, - region, - typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,region>::type >::type type; + ::boost::mpl::is_sequence, + region, + typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,region>::type >::type type; }; template @@ -216,8 +216,8 @@ struct keep_source_names { // instead of the rows we want only the names of the states (from source) typedef typename - ::boost::mpl::transform< - stt,transition_source_type< ::boost::mpl::placeholders::_1> >::type type; + ::boost::mpl::transform< + stt,transition_source_type< ::boost::mpl::placeholders::_1> >::type type; }; // transform a transition table in a container of target states @@ -226,8 +226,8 @@ struct keep_target_names { // instead of the rows we want only the names of the states (from source) typedef typename - ::boost::mpl::transform< - stt,transition_target_type< ::boost::mpl::placeholders::_1> >::type type; + ::boost::mpl::transform< + stt,transition_target_type< ::boost::mpl::placeholders::_1> >::type type; }; template @@ -237,15 +237,15 @@ struct generate_state_set typedef typename keep_source_names::type sources; typedef typename keep_target_names::type targets; typedef typename - ::boost::mpl::fold< - sources, ::boost::mpl::set<>, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2> - >::type source_set; + ::boost::mpl::fold< + sources, ::boost::mpl::set<>, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2> + >::type source_set; typedef typename - ::boost::mpl::fold< - targets,source_set, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2> - >::type type; + ::boost::mpl::fold< + targets,source_set, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2> + >::type type; }; // iterates through the transition table and generate a mpl::set<> containing all the events @@ -271,8 +271,8 @@ struct has_state_delayed_event typedef typename ::boost::mpl::find::type found; typedef typename ::boost::mpl::if_< ::boost::is_same::type >, - ::boost::mpl::bool_, - ::boost::mpl::bool_ >::type type; + ::boost::mpl::bool_, + ::boost::mpl::bool_ >::type type; }; // returns a mpl::bool_ if State has any deferred event template @@ -351,15 +351,15 @@ struct create_stt typedef typename get_regions_as_sequence::type init_states; // iterate through the initial states and add them in the stt if not already there typedef typename - ::boost::mpl::fold< - init_states,Stt, - ::boost::mpl::if_< - ::boost::mpl::has_key, - ::boost::mpl::placeholders::_1, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end, - not_a_row< ::boost::mpl::placeholders::_2 > > - > - >::type with_init; + ::boost::mpl::fold< + init_states,Stt, + ::boost::mpl::if_< + ::boost::mpl::has_key, + ::boost::mpl::placeholders::_1, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end, + not_a_row< ::boost::mpl::placeholders::_2 > > + > + >::type with_init; // do the same for states marked as explicitly created typedef typename get_explicit_creation_as_sequence< typename ::boost::mpl::eval_if< @@ -369,19 +369,19 @@ struct create_stt >::type fake_explicit_created; typedef typename - ::boost::mpl::transform< - fake_explicit_created,convert_fake_state< ::boost::mpl::placeholders::_1,Derived> >::type explicit_created; + ::boost::mpl::transform< + fake_explicit_created,convert_fake_state< ::boost::mpl::placeholders::_1,Derived> >::type explicit_created; typedef typename - ::boost::mpl::fold< - explicit_created,with_init, - ::boost::mpl::if_< - ::boost::mpl::has_key, - ::boost::mpl::placeholders::_1, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end, - not_a_row< ::boost::mpl::placeholders::_2 > > - > - >::type type; + ::boost::mpl::fold< + explicit_created,with_init, + ::boost::mpl::if_< + ::boost::mpl::has_key, + ::boost::mpl::placeholders::_1, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end, + not_a_row< ::boost::mpl::placeholders::_2 > > + > + >::type type; }; // returns the transition table of a Composite state @@ -397,16 +397,16 @@ struct recursive_get_transition_table { // get the transition table of the state if it's a state machine typedef typename ::boost::mpl::eval_if::type, - get_transition_table, - ::boost::mpl::vector0<> >::type org_table; + get_transition_table, + ::boost::mpl::vector0<> >::type org_table; typedef typename generate_state_set::type states; // and for every substate, recursively get the transition table if it's a state machine typedef typename ::boost::mpl::fold< - states,org_table, - ::boost::mpl::insert_range< ::boost::mpl::placeholders::_1, ::boost::mpl::end, - recursive_get_transition_table< ::boost::mpl::placeholders::_2 > > + states,org_table, + ::boost::mpl::insert_range< ::boost::mpl::placeholders::_1, ::boost::mpl::end, + recursive_get_transition_table< ::boost::mpl::placeholders::_2 > > >::type type; }; @@ -460,10 +460,10 @@ struct find_completion_events typedef typename ::boost::mpl::fold< event_list, ::boost::mpl::set<>, - ::boost::mpl::if_< - is_completion_event< ::boost::mpl::placeholders::_2>, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >, - ::boost::mpl::placeholders::_1 > + ::boost::mpl::if_< + is_completion_event< ::boost::mpl::placeholders::_2>, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >, + ::boost::mpl::placeholders::_1 > >::type type; }; @@ -548,10 +548,10 @@ struct is_state_blocking { typedef typename ::boost::mpl::fold< typename StateType::flag_list, ::boost::mpl::set<>, - ::boost::mpl::if_< - has_event_blocking_flag< ::boost::mpl::placeholders::_2>, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >, - ::boost::mpl::placeholders::_1 > + ::boost::mpl::if_< + has_event_blocking_flag< ::boost::mpl::placeholders::_2>, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >, + ::boost::mpl::placeholders::_1 > >::type blocking_flags; typedef typename ::boost::mpl::if_< @@ -568,10 +568,10 @@ struct has_fsm_blocking_states typedef typename ::boost::mpl::fold< state_list, ::boost::mpl::set<>, - ::boost::mpl::if_< - is_state_blocking< ::boost::mpl::placeholders::_2>, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >, - ::boost::mpl::placeholders::_1 > + ::boost::mpl::if_< + is_state_blocking< ::boost::mpl::placeholders::_2>, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >, + ::boost::mpl::placeholders::_1 > >::type blocking_states; typedef typename ::boost::mpl::if_< diff --git a/include/boost/msm/back/state_machine.hpp b/include/boost/msm/back/state_machine.hpp index fa3081e..ca9b88b 100644 --- a/include/boost/msm/back/state_machine.hpp +++ b/include/boost/msm/back/state_machine.hpp @@ -176,7 +176,7 @@ private: public: // tags - //typedef ::boost::mpl::true_ composite_state; + //typedef ::boost::mpl::true_ composite_state; typedef int composite_tag; // in case someone needs to know @@ -229,7 +229,7 @@ private: } exit_pt():m_forward(){} // by assignments, we keep our forwarding functor unchanged as our containing SM did not change - template + template exit_pt(RHS& rhs):m_forward(){} exit_pt& operator= (const exit_pt& ) { @@ -805,37 +805,37 @@ private: { typedef g_row_ type; }; - template + template struct create_backend_stt { typedef a_row_ type; }; - template + template struct create_backend_stt<_row_tag,Transition,StateType> { typedef _row_ type; }; - template - struct create_backend_stt - { - typedef row_ type; - }; + template + struct create_backend_stt + { + typedef row_ type; + }; // internal transitions template struct create_backend_stt { typedef g_irow_ type; }; - template + template struct create_backend_stt { typedef a_irow_ type; }; - template - struct create_backend_stt - { - typedef irow_ type; - }; + template + struct create_backend_stt + { + typedef irow_ type; + }; template struct create_backend_stt<_irow_tag,Transition,StateType> { @@ -872,22 +872,22 @@ private: struct create_real_stt { //typedef typename BaseType::transition_table stt_simulated; - typedef typename ::boost::mpl::fold< - stt_simulated,mpl::vector0<>, + typedef typename ::boost::mpl::fold< + stt_simulated,mpl::vector0<>, ::boost::mpl::push_back< ::boost::mpl::placeholders::_1, make_row_tag< ::boost::mpl::placeholders::_2 , BaseType > > - >::type type; + >::type type; }; - template - struct add_forwarding_row_helper - { - typedef typename generate_event_set::type all_events; - typedef typename ::boost::mpl::fold< - all_events, Intermediate, - ::boost::mpl::push_back< ::boost::mpl::placeholders::_1, - frow > >::type type; - }; + template + struct add_forwarding_row_helper + { + typedef typename generate_event_set
::type all_events; + typedef typename ::boost::mpl::fold< + all_events, Intermediate, + ::boost::mpl::push_back< ::boost::mpl::placeholders::_1, + frow > >::type type; + }; // gets the transition table from a composite and make from it a forwarding row template struct get_internal_transition_table @@ -899,18 +899,18 @@ private: // Note: these are added first because they must have a lesser prio // than the deeper transitions in the sub regions typedef typename StateType::internal_transition_table istt_simulated; - typedef typename ::boost::mpl::fold< - istt_simulated,::boost::mpl::vector0<>, + typedef typename ::boost::mpl::fold< + istt_simulated,::boost::mpl::vector0<>, ::boost::mpl::push_back< ::boost::mpl::placeholders::_1, make_row_tag< ::boost::mpl::placeholders::_2 , StateType> > - >::type intermediate; + >::type intermediate; // and add for every event a forwarding row - typedef typename ::boost::mpl::eval_if< - typename CompilePolicy::add_forwarding_rows, - add_forwarding_row_helper, - ::boost::mpl::identity - >::type type; + typedef typename ::boost::mpl::eval_if< + typename CompilePolicy::add_forwarding_rows, + add_forwarding_row_helper, + ::boost::mpl::identity + >::type type; }; template struct get_internal_transition_table @@ -934,14 +934,14 @@ private: typedef typename Composite::stt Stt; // for every state, add its transition table (if any) // transformed as frow - typedef typename ::boost::mpl::fold, - get_internal_transition_table< + get_internal_transition_table< ::boost::mpl::placeholders::_2, is_composite_state< ::boost::mpl::placeholders::_2> > > - >::type type; + >::type type; }; // extend the table with tables from composite states typedef typename extend_table::type complete_table; @@ -1142,10 +1142,10 @@ private: public: // Construct with the default initial states state_machine() - :Derived() - ,m_events_queue() - ,m_deferred_events_queue() - ,m_history() + :Derived() + ,m_events_queue() + ,m_deferred_events_queue() + ,m_history() ,m_event_processing(false) ,m_is_included(false) ,m_visitors() @@ -1166,9 +1166,9 @@ private: state_machine(BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ) ) \ :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \ - ,m_events_queue() \ - ,m_deferred_events_queue() \ - ,m_history() \ + ,m_events_queue() \ + ,m_deferred_events_queue() \ + ,m_history() \ ,m_event_processing(false) \ ,m_is_included(false) \ ,m_visitors() \ @@ -1482,21 +1482,21 @@ private: #undef MSM_COMPOSITE_ACCEPT_EXECUTE #undef MSM_COMPOSITE_ACCEPT_SUB - // helper used to call the init states at the start of the state machine + // helper used to call the init states at the start of the state machine template - struct call_init - { - call_init(Event const& an_event,library_sm* self_): + struct call_init + { + call_init(Event const& an_event,library_sm* self_): evt(an_event),self(self_){} - template - void operator()(boost::msm::wrap const&) - { + template + void operator()(boost::msm::wrap const&) + { execute_entry(::boost::fusion::at_key(self->m_substate_list),evt,*self); - } - private: + } + private: Event const& evt; library_sm* self; - }; + }; // helper for flag handling. Uses OR by default on orthogonal zones. template struct FlagHelper @@ -1604,7 +1604,7 @@ private: { static void set_sm(library_sm* ) { - // state doesn't need its sm + // state doesn't need its sm } }; // create a state requiring a pointer to the state machine @@ -1613,8 +1613,8 @@ private: { static void set_sm(library_sm* sm) { - // create and set the fsm - ::boost::fusion::at_key(sm->m_substate_list).set_sm_ptr(sm); + // create and set the fsm + ::boost::fusion::at_key(sm->m_substate_list).set_sm_ptr(sm); } }; // main unspecialized helper class @@ -1657,13 +1657,13 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE m_is_included=true; ::boost::fusion::for_each(m_substate_list,add_state(this,sm)); } - // A function object for use with mpl::for_each that stuffs + // A function object for use with mpl::for_each that stuffs // states into the state list. template struct add_state { add_state(library_sm* self_,ContainingSM* sm) - : self(self_),containing_sm(sm){} + : self(self_),containing_sm(sm){} // State is a sub fsm with exit pseudo states and gets a pointer to this fsm, so it can build a callback template @@ -1674,7 +1674,7 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE ::boost::fusion::at_key(self->m_substate_list).set_containing_sm(containing_sm); } // State is a sub fsm without exit pseudo states and does not get a callback to this fsm - // or state is a normal state and needs nothing except creation + // or state is a normal state and needs nothing except creation template typename ::boost::enable_if< typename boost::mpl::and_ + template void start(Event const& incomingEvent) { region_start_helper< ::boost::mpl::int_<0> >::template do_start(this,incomingEvent); @@ -1988,7 +1988,7 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE static void do_exit(library_sm*,Event const& ){} }; // entry/exit for states machines which are themselves embedded in other state machines (composites) - template + template void do_entry(Event const& incomingEvent,FsmType& fsm) { // by default we activate the history/init states, can be overwritten by direct_event_start_helper @@ -2001,7 +2001,7 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE m_event_processing = false; process_message_queue(this); } - template + template void do_exit(Event const& incomingEvent,FsmType& fsm) { // first recursively exit the sub machines diff --git a/include/boost/msm/front/detail/common_states.hpp b/include/boost/msm/front/detail/common_states.hpp index 66eea8f..ece9da6 100644 --- a/include/boost/msm/front/detail/common_states.hpp +++ b/include/boost/msm/front/detail/common_states.hpp @@ -25,8 +25,8 @@ struct inherit_attributes { inherit_attributes():m_attributes(){} inherit_attributes(Attributes const& the_attributes):m_attributes(the_attributes){} - // on the fly attribute creation capability - typedef Attributes attributes_type; + // on the fly attribute creation capability + typedef Attributes attributes_type; template typename ::boost::fusion::result_of::at_key::type @@ -39,7 +39,7 @@ struct inherit_attributes typename ::boost::add_const< typename ::boost::fusion::result_of::at_key::type>::type - get_attribute(Index const&)const + get_attribute(Index const&)const { return const_cast< typename ::boost::add_const< @@ -49,8 +49,8 @@ struct inherit_attributes } private: - // attributes - Attributes m_attributes; + // attributes + Attributes m_attributes; }; // the interface for all states. Defines entry and exit functions. Overwrite to implement for any state needing it. @@ -58,7 +58,7 @@ template > struct state_base : public inherit_attributes, USERBASE { typedef USERBASE user_state_base; - typedef Attributes attributes_type; + typedef Attributes attributes_type; // empty implementation for the states not wishing to define an entry condition // will not be called polymorphic way diff --git a/include/boost/msm/front/euml/common.hpp b/include/boost/msm/front/euml/common.hpp index 6943e67..dcf59da 100644 --- a/include/boost/msm/front/euml/common.hpp +++ b/include/boost/msm/front/euml/common.hpp @@ -135,12 +135,12 @@ struct get_state_action_tag_type template struct get_result_type { - typedef typename T::template transition_action_result::type type; + typedef typename T::template transition_action_result::type type; }; template struct get_result_type2 { - typedef typename T::template state_action_result::type type; + typedef typename T::template state_action_result::type type; }; template struct get_sequence @@ -316,7 +316,7 @@ struct make_invalid_type template struct make_vector_one_row { - typedef boost::mpl::vector type; + typedef boost::mpl::vector type; }; template T make_T(T t) {return t;} @@ -369,29 +369,29 @@ struct GetSource_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - typename transition_action_result::type - operator()(EVT const& ,FSM& ,SourceState& src,TargetState&)const - { + template + typename transition_action_result::type + operator()(EVT const& ,FSM& ,SourceState& src,TargetState&)const + { return src.get_attribute(Index()); - } + } }; template<> struct GetSource_ : euml_action > { - template - struct transition_action_result - { - typedef SourceState& type; - }; - typedef ::boost::mpl::set tag_type; + template + struct transition_action_result + { + typedef SourceState& type; + }; + typedef ::boost::mpl::set tag_type; - template - typename transition_action_result::type - operator()(EVT const& , FSM&,SourceState& src,TargetState& )const - { + template + typename transition_action_result::type + operator()(EVT const& , FSM&,SourceState& src,TargetState& )const + { return src; - } + } }; struct get_source_tag {}; struct GetSource_Helper: proto::extends< proto::terminal::type, GetSource_Helper, sm_domain> @@ -419,29 +419,29 @@ struct GetTarget_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - typename transition_action_result::type - operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const - { + template + typename transition_action_result::type + operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const + { return tgt.get_attribute(Index()); - } + } }; template<> struct GetTarget_ : euml_action > { - template - struct transition_action_result - { - typedef TargetState& type; - }; - typedef ::boost::mpl::set tag_type; + template + struct transition_action_result + { + typedef TargetState& type; + }; + typedef ::boost::mpl::set tag_type; - template - typename transition_action_result::type - operator()(EVT const& , FSM&,SourceState& ,TargetState& tgt)const - { + template + typename transition_action_result::type + operator()(EVT const& , FSM&,SourceState& ,TargetState& tgt)const + { return tgt; - } + } }; struct get_target_tag {}; struct GetTarget_Helper: proto::extends< proto::terminal::type, GetTarget_Helper, sm_domain> @@ -472,28 +472,28 @@ struct GetState_ : euml_action > template typename state_action_result::type operator()(Event const&,FSM& ,STATE& state ) - { + { return state.get_attribute(Index()); - } + } }; template<> struct GetState_ : euml_action > { using euml_action::operator=; - template - struct state_action_result - { - typedef STATE& type; - }; - typedef ::boost::mpl::set tag_type; + template + struct state_action_result + { + typedef STATE& type; + }; + typedef ::boost::mpl::set tag_type; - template + template typename state_action_result::type operator()(Event const&,FSM& ,STATE& state ) - { + { return state; - } + } }; struct get_state_tag {}; struct GetState_Helper: proto::extends< proto::terminal::type, GetState_Helper, sm_domain> @@ -529,46 +529,46 @@ struct GetEvent_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - typename state_action_result::type - operator()(Event const& evt,FSM& ,STATE& ) - { - return evt.get_attribute(Index()); - } - template - typename transition_action_result::type - operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const - { + template + typename state_action_result::type + operator()(Event const& evt,FSM& ,STATE& ) + { return evt.get_attribute(Index()); - } + } + template + typename transition_action_result::type + operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const + { + return evt.get_attribute(Index()); + } }; template <> struct GetEvent_ : euml_action > { - template - struct state_action_result - { - typedef Event const& type; - }; - template - struct transition_action_result - { - typedef EVT const& type; - }; + template + struct state_action_result + { + typedef Event const& type; + }; + template + struct transition_action_result + { + typedef EVT const& type; + }; typedef ::boost::mpl::set tag_type; - template - typename state_action_result::type - operator()(Event const& evt,FSM& ,STATE& ) - { - return evt; - } - template - typename transition_action_result::type - operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const - { - return evt; - } + template + typename state_action_result::type + operator()(Event const& evt,FSM& ,STATE& ) + { + return evt; + } + template + typename transition_action_result::type + operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const + { + return evt; + } }; struct get_event_tag {}; struct GetEvent_Helper: proto::extends< proto::terminal::type, GetEvent_Helper, sm_domain> @@ -608,12 +608,12 @@ struct GetFsm_ : euml_action > { return fsm.get_attribute(Index()); } - template - typename transition_action_result::type - operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const - { + template + typename transition_action_result::type + operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const + { return fsm.get_attribute(Index()); - } + } }; template<> struct GetFsm_ : euml_action > @@ -739,7 +739,7 @@ struct GetAttribute_ : euml_action > template struct state_action_result { - typedef typename + typedef typename ::boost::fusion::result_of::at_key< typename get_attributes_type< typename ::boost::remove_reference< @@ -749,7 +749,7 @@ struct GetAttribute_ : euml_action > template struct transition_action_result { - typedef typename + typedef typename ::boost::fusion::result_of::at_key< typename get_attributes_type< typename ::boost::remove_reference< @@ -760,19 +760,19 @@ struct GetAttribute_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Target::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Target::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Target()(evt,fsm,src,tgt)).get_attribute(Index()); } template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Target::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Target::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Target()(evt,fsm,state)).get_attribute(Index()); @@ -800,117 +800,117 @@ template struct Source_ : euml_action > { using euml_action >::operator=; - template - struct transition_action_result - { - typedef typename - ::boost::fusion::result_of::at_key::type type; - }; - typedef ::boost::mpl::set tag_type; + template + struct transition_action_result + { + typedef typename + ::boost::fusion::result_of::at_key::type type; + }; + typedef ::boost::mpl::set tag_type; - template - typename transition_action_result::type - operator()(EVT const& , FSM&,SourceState& src,TargetState& )const - { + template + typename transition_action_result::type + operator()(EVT const& , FSM&,SourceState& src,TargetState& )const + { return src.get_attribute(Index()); - } + } }; template struct Target_ : euml_action > { using euml_action >::operator=; - template - struct transition_action_result - { - typedef typename - ::boost::fusion::result_of::at_key::type type; - }; - typedef ::boost::mpl::set tag_type; + template + struct transition_action_result + { + typedef typename + ::boost::fusion::result_of::at_key::type type; + }; + typedef ::boost::mpl::set tag_type; - template - typename transition_action_result::type - operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const - { + template + typename transition_action_result::type + operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const + { return tgt.get_attribute(Index()); - } + } }; template struct State_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename - ::boost::fusion::result_of::at_key::type type; - }; - typedef ::boost::mpl::set tag_type; + template + struct state_action_result + { + typedef typename + ::boost::fusion::result_of::at_key::type type; + }; + typedef ::boost::mpl::set tag_type; - template - typename state_action_result::type - operator()(Event const&,FSM& ,STATE& state ) - { + template + typename state_action_result::type + operator()(Event const&,FSM& ,STATE& state ) + { return state.get_attribute(Index()); - } + } }; template struct Event_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename ::boost::add_const< - typename ::boost::fusion::result_of::at_key + struct state_action_result + { + typedef typename ::boost::add_const< + typename ::boost::fusion::result_of::at_key::type>::type type; - }; - template - struct transition_action_result - { - typedef typename ::boost::add_const< + }; + template + struct transition_action_result + { + typedef typename ::boost::add_const< typename ::boost::fusion::result_of::at_key::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename state_action_result::type - operator()(Event const& evt,FSM& ,STATE& ) - { - return evt.get_attribute(Index()); - } - template - typename transition_action_result::type - operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const - { - return evt.get_attribute(Index()); - } + template + typename state_action_result::type + operator()(Event const& evt,FSM& ,STATE& ) + { + return evt.get_attribute(Index()); + } + template + typename transition_action_result::type + operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const + { + return evt.get_attribute(Index()); + } }; template struct State_Attribute_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename - ::boost::fusion::result_of::at_key::type type; - }; + template + struct state_action_result + { + typedef typename + ::boost::fusion::result_of::at_key::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename state_action_result::type - operator()(Event const&,FSM& fsm,STATE& ) - { + template + typename state_action_result::type + operator()(Event const&,FSM& fsm,STATE& ) + { return fsm.template get_state().get_attribute(Index()); - } + } }; template diff --git a/include/boost/msm/front/euml/container.hpp b/include/boost/msm/front/euml/container.hpp index f1e2362..5cdd48f 100644 --- a/include/boost/msm/front/euml/container.hpp +++ b/include/boost/msm/front/euml/container.hpp @@ -45,23 +45,23 @@ struct Front_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).front(); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).front(); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).front(); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).front(); + } }; struct front_tag {}; @@ -99,23 +99,23 @@ struct Back_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).back(); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).back(); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).back(); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).back(); + } }; struct back_tag {}; @@ -153,23 +153,23 @@ struct Begin_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).begin(); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).begin(); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).begin(); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).begin(); + } }; struct begin_tag {}; @@ -207,23 +207,23 @@ struct End_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).end(); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).end(); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).end(); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).end(); + } }; struct end_tag {}; struct End_Helper: proto::extends< proto::terminal::type, End_Helper, sm_domain> @@ -260,23 +260,23 @@ struct RBegin_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).rbegin(); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).rbegin(); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).rbegin(); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).rbegin(); + } }; struct rbegin_tag {}; @@ -314,23 +314,23 @@ struct REnd_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).rend(); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).rend(); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).rend(); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).rend(); + } }; struct rend_tag {}; struct REnd_Helper: proto::extends< proto::terminal::type, REnd_Helper, sm_domain> @@ -751,19 +751,19 @@ struct Capacity_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).capacity(); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).capacity(); @@ -804,19 +804,19 @@ struct Size_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).size(); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).size(); @@ -857,19 +857,19 @@ struct Max_Size_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).max_size(); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).max_size(); @@ -1053,17 +1053,17 @@ struct Insert_ < Container,Param1,Param2,void> // version for transition + second param not an iterator (meaning that, Container is not an associative container) template - typename ::boost::enable_if< + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, typename ::boost::mpl::not_< typename has_iterator_category< typename Param2::template transition_action_result::type >::type >::type >::type, - typename transition_action_result::type + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { @@ -1072,15 +1072,15 @@ struct Insert_ < Container,Param1,Param2,void> // version for transition + second param is an iterator (meaning that, Container is an associative container) template - typename ::boost::enable_if< + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, typename has_iterator_category< typename Param2::template transition_action_result::type >::type >::type, - typename transition_action_result::type + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { @@ -1088,18 +1088,18 @@ struct Insert_ < Container,Param1,Param2,void> } // version for state action + second param not an iterator (meaning that, Container is not an associative container) - template - typename ::boost::enable_if< + template + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, typename ::boost::mpl::not_< typename has_iterator_category< typename Param2::template state_action_result::type >::type >::type >::type, - typename state_action_result::type + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { @@ -1107,16 +1107,16 @@ struct Insert_ < Container,Param1,Param2,void> } // version for state action + second param is an iterator (meaning that, Container is an associative container) - template - typename ::boost::enable_if< + template + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, typename has_iterator_category< typename Param2::template state_action_result::type >::type >::type, - typename state_action_result::type + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { @@ -1148,19 +1148,19 @@ struct Insert_ < Container,Param1,void,void> typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state)); @@ -1238,19 +1238,19 @@ struct Erase_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Iterator1::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Iterator1::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).erase(Iterator1()(evt,fsm,src,tgt)); } template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Iterator1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Iterator1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).erase(Iterator1()(evt,fsm,state)); @@ -1274,19 +1274,19 @@ struct Erase_ tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Iterator1::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Iterator1::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).erase(Iterator1()(evt,fsm,src,tgt),Iterator2()(evt,fsm,src,tgt)); } template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Iterator1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Iterator1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).erase(Iterator1()(evt,fsm,state),Iterator2()(evt,fsm,state)); @@ -1515,19 +1515,19 @@ struct Splice_ : euml_action tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); @@ -2445,19 +2445,19 @@ struct Associative_Erase_ : euml_action tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); @@ -2488,15 +2488,15 @@ struct Associative_Erase_ < Container,Param1,void> // version for transition + param is an iterator template - typename ::boost::enable_if< + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, typename has_iterator_category< typename Param1::template transition_action_result::type >::type >::type, - void + void >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { @@ -2504,16 +2504,16 @@ struct Associative_Erase_ < Container,Param1,void> } // version for state action + param is an iterator - template - typename ::boost::enable_if< + template + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, typename has_iterator_category< typename Param1::template state_action_result::type >::type >::type, - void + void >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { @@ -2522,17 +2522,17 @@ struct Associative_Erase_ < Container,Param1,void> // version for transition + param not an iterator template - typename ::boost::enable_if< + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, typename ::boost::mpl::not_< typename has_iterator_category< typename Param1::template transition_action_result::type >::type >::type >::type, - typename transition_action_result::type + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { @@ -2540,18 +2540,18 @@ struct Associative_Erase_ < Container,Param1,void> } // version for state action + param not an iterator - template - typename ::boost::enable_if< + template + typename ::boost::enable_if< typename ::boost::mpl::and_< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, typename ::boost::mpl::not_< typename has_iterator_category< typename Param1::template state_action_result::type >::type >::type >::type, - typename state_action_result::type + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { @@ -2595,23 +2595,23 @@ struct Associative_Find_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).find(Param()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).find(Param()(evt,fsm,state)); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).find(Param()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).find(Param()(evt,fsm,state)); + } }; struct associative_find_tag {}; @@ -2649,19 +2649,19 @@ struct AssociativeCount_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).count(Param()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).count(Param()(evt,fsm,state)); @@ -2702,23 +2702,23 @@ struct Associative_Lower_Bound_ : euml_action typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).lower_bound(Param()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).lower_bound(Param()(evt,fsm,state)); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).lower_bound(Param()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).lower_bound(Param()(evt,fsm,state)); + } }; struct associative_lower_bound_tag {}; @@ -2757,23 +2757,23 @@ struct Associative_Upper_Bound_ : euml_action typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).upper_bound(Param()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).upper_bound(Param()(evt,fsm,state)); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).upper_bound(Param()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).upper_bound(Param()(evt,fsm,state)); + } }; struct associative_upper_bound_tag {}; @@ -2812,23 +2812,23 @@ struct First_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).first; - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).first; - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).first; + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).first; + } }; struct first_tag {}; @@ -2866,23 +2866,23 @@ struct Second_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).second; - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).second; - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).second; + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).second; + } }; struct second_tag {}; @@ -2928,23 +2928,23 @@ struct Associative_Equal_Range_ : euml_action typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T()(evt,fsm,src,tgt)).equal_range(Param()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T()(evt,fsm,state)).equal_range(Param()(evt,fsm,state)); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T()(evt,fsm,src,tgt)).equal_range(Param()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T()(evt,fsm,state)).equal_range(Param()(evt,fsm,state)); + } }; struct associative_equal_range_tag {}; @@ -3090,20 +3090,20 @@ struct StringCompare_ : euml_action tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3127,19 +3127,19 @@ struct StringCompare_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state)); @@ -3163,19 +3163,19 @@ struct StringCompare_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); @@ -3199,20 +3199,20 @@ struct StringCompare_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3251,20 +3251,20 @@ struct Append_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).append (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).append (Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3288,19 +3288,19 @@ struct Append_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).append(Param1()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).append(Param1()(evt,fsm,state)); @@ -3324,19 +3324,19 @@ struct Append_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).append(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).append(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); @@ -3374,20 +3374,20 @@ struct StringInsert_ : euml_action tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3411,19 +3411,19 @@ struct StringInsert_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); @@ -3446,20 +3446,20 @@ struct StringInsert_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3604,20 +3604,20 @@ struct StringAssign_ : euml_action typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).assign (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).assign (Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3642,19 +3642,19 @@ struct StringAssign_ < typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).assign(Param1()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).assign(Param1()(evt,fsm,state)); @@ -3678,19 +3678,19 @@ struct StringAssign_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).assign(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).assign(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); @@ -3727,20 +3727,20 @@ struct StringReplace_ : euml_action tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).replace (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).replace (Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3765,20 +3765,20 @@ struct StringReplace_ typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).replace(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), Param3()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).replace(Param1()(evt,fsm,state),Param2()(evt,fsm,state), @@ -3823,19 +3823,19 @@ struct CStr_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).c_str(); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).c_str(); @@ -3878,19 +3878,19 @@ struct StringData_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return (Container()(evt,fsm,src,tgt)).data(); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Container::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Container::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return (Container()(evt,fsm,state)).data(); diff --git a/include/boost/msm/front/euml/euml.hpp b/include/boost/msm/front/euml/euml.hpp index b7fb777..e4b586c 100644 --- a/include/boost/msm/front/euml/euml.hpp +++ b/include/boost/msm/front/euml/euml.hpp @@ -17,4 +17,4 @@ #include #include -#endif //BOOST_MSM_FRONT_EUML_EUML_H \ No newline at end of file +#endif //BOOST_MSM_FRONT_EUML_EUML_H diff --git a/include/boost/msm/front/euml/euml_typeof.hpp b/include/boost/msm/front/euml/euml_typeof.hpp index 6863fac..d9b8903 100644 --- a/include/boost/msm/front/euml/euml_typeof.hpp +++ b/include/boost/msm/front/euml/euml_typeof.hpp @@ -118,4 +118,4 @@ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::GreaterEqual_, 2) BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::EqualTo_, 2) BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::NotEqualTo_, 2) -#endif //BOOST_MSM_FRONT_EUML_TYPEOF_H \ No newline at end of file +#endif //BOOST_MSM_FRONT_EUML_TYPEOF_H diff --git a/include/boost/msm/front/euml/guard_grammar.hpp b/include/boost/msm/front/euml/guard_grammar.hpp index 6fa12e8..c0c4c4b 100644 --- a/include/boost/msm/front/euml/guard_grammar.hpp +++ b/include/boost/msm/front/euml/guard_grammar.hpp @@ -22,246 +22,246 @@ struct BuildActions; struct BuildGuardsCases { - // The primary template matches nothing: - template - struct case_ - : proto::not_ - {}; + // The primary template matches nothing: + template + struct case_ + : proto::not_ + {}; }; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::logical_or, Or_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::logical_and, And_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::logical_not, Not_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::less, Less_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::less_equal, LessEqual_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::greater, Greater_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::greater_equal, GreaterEqual_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< - proto::equal_to, - EqualTo_() + : proto::when< + proto::equal_to, + EqualTo_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< - proto::not_equal_to, - NotEqualTo_() + : proto::when< + proto::not_equal_to, + NotEqualTo_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::pre_inc, Pre_inc_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::dereference, Deref_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::pre_dec, Pre_dec_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::post_inc, Post_inc_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::post_dec, Post_dec_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::plus, Plus_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::minus, Minus_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::multiplies, Multiplies_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::divides, Divides_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::modulus, Modulus_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::bitwise_and, Bitwise_And_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::bitwise_or, Bitwise_Or_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::subscript, Subscript_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::plus_assign, Plus_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::minus_assign, Minus_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::multiplies_assign, Multiplies_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::divides_assign, Divides_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::modulus_assign, Modulus_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::shift_left_assign, ShiftLeft_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::shift_right_assign, ShiftRight_Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::shift_left, ShiftLeft_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::shift_right, ShiftRight_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::assign, Assign_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::bitwise_xor, Bitwise_Xor_() > {}; template<> struct BuildGuardsCases::case_ - : proto::when< + : proto::when< proto::negate, Unary_Minus_() > @@ -269,42 +269,42 @@ struct BuildGuardsCases::case_ template<> struct BuildGuardsCases::case_ - : proto::or_< - proto::when< - proto::function,BuildGuards,BuildGuards,BuildGuards >, + : proto::or_< + proto::when< + proto::function,BuildGuards,BuildGuards,BuildGuards >, If_Else_), - BuildGuards(proto::_child_c<2>), - BuildGuards(proto::_child_c<3>) >() - >, + BuildGuards(proto::_child_c<2>), + BuildGuards(proto::_child_c<3>) >() + >, proto::when< proto::function >, get_fct >() - >, + >, proto::when< proto::function,BuildActions >, get_fct,BuildActions(proto::_child_c<1>) >() - >, + >, proto::when< proto::function,BuildActions,BuildActions >, get_fct,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) >() - >, + >, proto::when< proto::function,BuildActions,BuildActions,BuildActions >, get_fct,BuildActions(proto::_child_c<1>) ,BuildActions(proto::_child_c<2>),BuildActions(proto::_child_c<3>) >() - >, + >, proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) >() - >, - proto::when< + >, + proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>),BuildActions(proto::_child_c<5>) >() - > + > #ifdef BOOST_MSVC ,proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >, @@ -312,18 +312,18 @@ struct BuildGuardsCases::case_ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) ,BuildActions(proto::_child_c<5>),BuildActions(proto::_child_c<6>) >() - > + > #endif > {}; template<> struct BuildGuardsCases::case_ - : proto::or_< + : proto::or_< proto::when < - proto::terminal, - get_action_name() - >, + proto::terminal, + get_action_name() + >, proto::when< proto::terminal, proto::_ @@ -340,7 +340,7 @@ struct BuildGuardsCases::case_ {}; struct BuildGuards - : proto::switch_ + : proto::switch_ {}; }}}} diff --git a/include/boost/msm/front/euml/operator.hpp b/include/boost/msm/front/euml/operator.hpp index 8c25df6..089e5b2 100644 --- a/include/boost/msm/front/euml/operator.hpp +++ b/include/boost/msm/front/euml/operator.hpp @@ -29,11 +29,11 @@ namespace boost { namespace msm { namespace front { namespace euml template struct Or_ : euml_action > { - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt) - { - return (T1()(evt,fsm,src,tgt) || T2()(evt,fsm,src,tgt)); - } + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt) + { + return (T1()(evt,fsm,src,tgt) || T2()(evt,fsm,src,tgt)); + } template bool operator()(Event const& evt,FSM& fsm,STATE& state) { @@ -43,11 +43,11 @@ struct Or_ : euml_action > template struct And_ : euml_action > { - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt) - { - return (T1()(evt,fsm,src,tgt) && T2()(evt,fsm,src,tgt)); - } + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt) + { + return (T1()(evt,fsm,src,tgt) && T2()(evt,fsm,src,tgt)); + } template bool operator()(Event const& evt,FSM& fsm,STATE& state) { @@ -57,11 +57,11 @@ struct And_ : euml_action > template struct Not_ : euml_action > { - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt) - { - return !(T1()(evt,fsm,src,tgt)); - } + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt) + { + return !(T1()(evt,fsm,src,tgt)); + } template bool operator()(Event const& evt,FSM& fsm,STATE& state) { @@ -89,32 +89,32 @@ struct If_Else_ tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Action1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - if (Condition()(evt,fsm,src,tgt)) + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Action1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + if (Condition()(evt,fsm,src,tgt)) { return Action1()(evt,fsm,src,tgt); } return Action2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Action1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Action1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const - { + { if (Condition()(evt,fsm,state)) { return Action1()(evt,fsm,state); } return Action2()(evt,fsm,state); - } + } }; template @@ -134,24 +134,24 @@ struct If_Else_ tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - if (Condition()(evt,fsm,src,tgt)) + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + if (Condition()(evt,fsm,src,tgt)) { return Action1()(evt,fsm,src,tgt); } return Action2()(evt,fsm,src,tgt); - } - template + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state )const - { + { if (Condition()(evt,fsm,state)) { return Action1()(evt,fsm,state); } return Action2()(evt,fsm,state); - } + } }; struct if_tag @@ -192,30 +192,30 @@ struct If_Then_ tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Action1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Action1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { if (Condition()(evt,fsm,src,tgt)) { return Action1()(evt,fsm,src,tgt); } - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Action1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Action1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const - { + { if (Condition()(evt,fsm,state)) { return Action1()(evt,fsm,state); } - } + } }; template @@ -235,22 +235,22 @@ struct If_Then_ tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { if (Condition()(evt,fsm,src,tgt)) { return Action1()(evt,fsm,src,tgt); } - } - template + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state )const - { + { if (Condition()(evt,fsm,state)) { return Action1()(evt,fsm,state); } - } + } }; struct if_then_tag { @@ -465,23 +465,23 @@ struct Deref_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return *(T()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return *(T()(evt,fsm,state)); - } + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return *(T()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return *(T()(evt,fsm,state)); + } }; template @@ -489,109 +489,109 @@ struct Pre_inc_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return ++T()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return ++T()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return ++T()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return ++T()(evt,fsm,state); + } }; template struct Pre_dec_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return --T()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return --T()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return --T()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return --T()(evt,fsm,state); + } }; template struct Post_inc_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename ::boost::remove_reference< - typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { - typedef typename ::boost::remove_reference< - typename get_result_type::type>::type type; - }; + template + struct state_action_result + { + typedef typename ::boost::remove_reference< + typename get_result_type2::type>::type type; + }; + template + struct transition_action_result + { + typedef typename ::boost::remove_reference< + typename get_result_type::type>::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T()(evt,fsm,src,tgt)++; - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T()(evt,fsm,state)++; + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T()(evt,fsm,src,tgt)++; + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T()(evt,fsm,state)++; } }; template @@ -599,804 +599,804 @@ struct Post_dec_ : euml_action > { using euml_action >::operator=; - template - struct state_action_result - { - typedef typename ::boost::remove_reference< - typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { - typedef typename ::boost::remove_reference< - typename get_result_type::type>::type type; - }; + template + struct state_action_result + { + typedef typename ::boost::remove_reference< + typename get_result_type2::type>::type type; + }; + template + struct transition_action_result + { + typedef typename ::boost::remove_reference< + typename get_result_type::type>::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T()(evt,fsm,src,tgt)--; - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T()(evt,fsm,state)--; - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T()(evt,fsm,src,tgt)--; + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T()(evt,fsm,state)--; + } }; template struct Plus_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)+T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)+T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)+T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)+T2()(evt,fsm,state); + } }; template struct Minus_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)-T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)-T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)-T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)-T2()(evt,fsm,state); + } }; template struct Multiplies_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)*T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)*T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)*T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)*T2()(evt,fsm,state); + } }; template struct Divides_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)/T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)/T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)/T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)/T2()(evt,fsm,state); + } }; template struct Modulus_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)%T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)%T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)%T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)%T2()(evt,fsm,state); + } }; template struct Bitwise_And_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)&T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)&T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)&T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)&T2()(evt,fsm,state); + } }; template struct Bitwise_Or_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)|T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)|T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)|T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)|T2()(evt,fsm,state); + } }; template struct Bitwise_Xor_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)^T2()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)^T2()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)^T2()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)^T2()(evt,fsm,state); + } }; template struct Subscript_ : euml_action > { - template - struct get_reference - { - typedef typename T::reference type; - }; - template - struct get_mapped_type - { + template + struct get_reference + { + typedef typename T::reference type; + }; + template + struct get_mapped_type + { typedef typename T::value_type::second_type& type; - }; + }; template struct state_action_result { - typedef typename ::boost::remove_reference< - typename get_result_type2::type>::type container_type; - typedef typename ::boost::mpl::eval_if< - typename has_key_type::type, - get_mapped_type, + typedef typename ::boost::remove_reference< + typename get_result_type2::type>::type container_type; + typedef typename ::boost::mpl::eval_if< + typename has_key_type::type, + get_mapped_type, ::boost::mpl::eval_if< typename ::boost::is_pointer::type, ::boost::add_reference::type >, - get_reference + get_reference > >::type type; }; template struct transition_action_result { - typedef typename ::boost::remove_reference< - typename get_result_type::type>::type container_type; - typedef typename ::boost::mpl::eval_if< - typename has_key_type::type, - get_mapped_type, + typedef typename ::boost::remove_reference< + typename get_result_type::type>::type container_type; + typedef typename ::boost::mpl::eval_if< + typename has_key_type::type, + get_mapped_type, ::boost::mpl::eval_if< typename ::boost::is_pointer::type, ::boost::add_reference::type >, - get_reference + get_reference > >::type type; }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return T1()(evt,fsm,src,tgt)[T2()(evt,fsm,src,tgt)]; - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return T1()(evt,fsm,state)[T2()(evt,fsm,state)]; - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return T1()(evt,fsm,src,tgt)[T2()(evt,fsm,src,tgt)]; + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return T1()(evt,fsm,state)[T2()(evt,fsm,state)]; + } }; template struct Plus_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)+=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)+=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)+=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)+=T2()(evt,fsm,state)); + } }; template struct Minus_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)-=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)-=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)-=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)-=T2()(evt,fsm,state)); + } }; template struct Multiplies_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)*=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)*=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)*=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)*=T2()(evt,fsm,state)); + } }; template struct Divides_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)/=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)/=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)/=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)/=T2()(evt,fsm,state)); + } }; template struct Modulus_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)%=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)%=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)%=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)%=T2()(evt,fsm,state)); + } }; template struct ShiftLeft_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)<<=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)<<=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)<<=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)<<=T2()(evt,fsm,state)); + } }; template struct ShiftRight_Assign_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)>>=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)>>=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)>>=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)>>=T2()(evt,fsm,state)); + } }; template struct ShiftLeft_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)< - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)< + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)< + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)< struct ShiftRight_ : euml_action > { - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)>>T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)>>T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)>>T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)>>T2()(evt,fsm,state)); + } }; template struct Assign_ : euml_action > { using euml_action< Assign_ >::operator=; - template - struct state_action_result - { - typedef typename get_result_type2::type type; - }; - template - struct transition_action_result - { - typedef typename get_result_type::type type; - }; + template + struct state_action_result + { + typedef typename get_result_type2::type type; + }; + template + struct transition_action_result + { + typedef typename get_result_type::type type; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt)=T2()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return (T1()(evt,fsm,state)=T2()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt)=T2()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return (T1()(evt,fsm,state)=T2()(evt,fsm,state)); + } }; template struct Unary_Plus_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return +T1()(evt,fsm,src,tgt); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return +T1()(evt,fsm,state); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return +T1()(evt,fsm,src,tgt); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return +T1()(evt,fsm,state); + } }; template struct Unary_Minus_ : euml_action > { - template - struct state_action_result - { + template + struct state_action_result + { typedef typename ::boost::remove_reference< typename get_result_type2::type>::type type; - }; - template - struct transition_action_result - { + }; + template + struct transition_action_result + { typedef typename ::boost::remove_reference< typename get_result_type::type>::type type; - }; + }; typedef ::boost::mpl::set tag_type; - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return -(T1()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { - return -(T1()(evt,fsm,state)); - } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return -(T1()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { + return -(T1()(evt,fsm,state)); + } }; template struct Less_ : euml_action > @@ -1413,12 +1413,12 @@ struct Less_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt) < T2()(evt,fsm,src,tgt)); - } - template + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt) < T2()(evt,fsm,src,tgt)); + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state)const { return (T1()(evt,fsm,state) < T2()(evt,fsm,state)); @@ -1439,12 +1439,12 @@ struct LessEqual_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt) <= T2()(evt,fsm,src,tgt)); - } - template + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt) <= T2()(evt,fsm,src,tgt)); + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state)const { return (T1()(evt,fsm,state) <= T2()(evt,fsm,state)); @@ -1465,12 +1465,12 @@ struct Greater_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt) > T2()(evt,fsm,src,tgt)); - } - template + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt) > T2()(evt,fsm,src,tgt)); + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state)const { return (T1()(evt,fsm,state) > T2()(evt,fsm,state)); @@ -1491,12 +1491,12 @@ struct GreaterEqual_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt) >= T2()(evt,fsm,src,tgt)); - } - template + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt) >= T2()(evt,fsm,src,tgt)); + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state)const { return (T1()(evt,fsm,state) >= T2()(evt,fsm,state)); @@ -1517,12 +1517,12 @@ struct EqualTo_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt) == T2()(evt,fsm,src,tgt)); - } - template + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt) == T2()(evt,fsm,src,tgt)); + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state)const { return (T1()(evt,fsm,state) == T2()(evt,fsm,state)); @@ -1543,12 +1543,12 @@ struct NotEqualTo_ : euml_action > }; typedef ::boost::mpl::set tag_type; - template - bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return (T1()(evt,fsm,src,tgt) != T2()(evt,fsm,src,tgt)); - } - template + template + bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return (T1()(evt,fsm,src,tgt) != T2()(evt,fsm,src,tgt)); + } + template bool operator()(Event const& evt,FSM& fsm,STATE& state)const { return (T1()(evt,fsm,state) != T2()(evt,fsm,state)); diff --git a/include/boost/msm/front/euml/state_grammar.hpp b/include/boost/msm/front/euml/state_grammar.hpp index 4b441d0..dff2173 100644 --- a/include/boost/msm/front/euml/state_grammar.hpp +++ b/include/boost/msm/front/euml/state_grammar.hpp @@ -39,7 +39,7 @@ namespace boost { namespace msm { namespace front { namespace euml template, + class Attributes= ::boost::fusion::vector<>, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = ::boost::msm::front::default_base_state> @@ -56,16 +56,16 @@ struct func_state : public ::boost::msm::front::detail::state_base - void on_entry(Event const& evt,FSM& fsm) - { - EntryFunctor()(evt,fsm,*this); - } - template - void on_exit(Event const& evt,FSM& fsm) - { - ExitFunctor()(evt,fsm,*this); - } + template + void on_entry(Event const& evt,FSM& fsm) + { + EntryFunctor()(evt,fsm,*this); + } + template + void on_exit(Event const& evt,FSM& fsm) + { + ExitFunctor()(evt,fsm,*this); + } }; // provides the typedefs and interface. Concrete states derive from it. @@ -73,7 +73,7 @@ template, + class Attributes= ::boost::fusion::vector<>, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = default_base_state> @@ -95,23 +95,23 @@ struct entry_func_state : public ::boost::msm::front::detail::state_base - void on_entry(Event const& evt,FSM& fsm) - { - EntryFunctor()(evt,fsm,*this); - } - template - void on_exit(Event const& evt,FSM& fsm) - { - ExitFunctor()(evt,fsm,*this); - } + template + void on_entry(Event const& evt,FSM& fsm) + { + EntryFunctor()(evt,fsm,*this); + } + template + void on_exit(Event const& evt,FSM& fsm) + { + ExitFunctor()(evt,fsm,*this); + } }; // provides the typedefs and interface. Concrete states derive from it. template, + class Attributes= ::boost::fusion::vector<>, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = default_base_state> @@ -130,16 +130,16 @@ struct explicit_entry_func_state : public ::boost::msm::front::detail::state_ba // deferred events typedef Defer deferred_events; - template - void on_entry(Event const& evt,FSM& fsm) - { - EntryFunctor()(evt,fsm,*this); - } - template - void on_exit(Event const& evt,FSM& fsm) - { - ExitFunctor()(evt,fsm,*this); - } + template + void on_entry(Event const& evt,FSM& fsm) + { + EntryFunctor()(evt,fsm,*this); + } + template + void on_exit(Event const& evt,FSM& fsm) + { + ExitFunctor()(evt,fsm,*this); + } }; // provides the typedefs and interface. Concrete states derive from it. @@ -147,7 +147,7 @@ template, + class Attributes= ::boost::fusion::vector<>, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = default_base_state> @@ -169,16 +169,16 @@ struct exit_func_state : public ::boost::msm::front::detail::state_base - void on_entry(Evt const& evt,FSM& fsm) - { - EntryFunctor()(evt,fsm,*this); - } - template - void on_exit(Evt const& evt,FSM& fsm) - { - ExitFunctor()(evt,fsm,*this); - } + template + void on_entry(Evt const& evt,FSM& fsm) + { + EntryFunctor()(evt,fsm,*this); + } + template + void on_exit(Evt const& evt,FSM& fsm) + { + ExitFunctor()(evt,fsm,*this); + } }; struct BuildActions; @@ -194,273 +194,273 @@ struct BuildActionSequence proto::comma, ActionSequence_(), - BuildActions(proto::_right)>()>() - >, + BuildActions(proto::_right)>()>() + >, proto::when < proto::comma, ActionSequence_(), - BuildActions(proto::_right) >() >() - > + BuildActions(proto::_right) >() >() + > > {}; struct BuildActionsCases { - // The primary template matches nothing: - template - struct case_ - : proto::not_ - {}; + // The primary template matches nothing: + template + struct case_ + : proto::not_ + {}; }; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::pre_inc, Pre_inc_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::pre_dec, Pre_dec_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::post_inc, Post_inc_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::post_dec, Post_dec_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::dereference, Deref_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::plus, Plus_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::minus, Minus_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::multiplies, Multiplies_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::divides, Divides_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::modulus, Modulus_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::bitwise_and, Bitwise_And_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::bitwise_or, Bitwise_Or_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::bitwise_xor, Bitwise_Xor_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::plus_assign, Plus_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::minus_assign, Minus_Assign_() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::multiplies_assign, Multiplies_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::divides_assign, Divides_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::modulus_assign, Modulus_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::shift_left_assign, ShiftLeft_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::shift_right_assign, ShiftRight_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::shift_left, ShiftLeft_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::shift_right, ShiftRight_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::assign, Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::subscript, Subscript_< BuildActions(proto::_left),BuildActions(proto::_right)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::unary_plus, Unary_Plus_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ - : proto::when< + : proto::when< proto::negate, Unary_Minus_< BuildActions(proto::_child)>() - > + > {}; template<> struct BuildActionsCases::case_ : proto::or_< proto::when< - proto::function,BuildGuards,BuildActionSequence,BuildActionSequence >, + proto::function,BuildGuards,BuildActionSequence,BuildActionSequence >, If_Else_), - BuildActionSequence(proto::_child_c<2>), - BuildActionSequence(proto::_child_c<3>) >() - >, + BuildActionSequence(proto::_child_c<2>), + BuildActionSequence(proto::_child_c<3>) >() + >, proto::when< - proto::function,BuildGuards,BuildActionSequence >, + proto::function,BuildGuards,BuildActionSequence >, If_Then_), - BuildActionSequence(proto::_child_c<2>)>() - >, - proto::when< - proto::function,BuildGuards,BuildActionSequence >, - While_Do_), - BuildActionSequence(proto::_child_c<2>) >() - >, - proto::when< - proto::function,BuildGuards,BuildActionSequence >, - Do_While_), - BuildActionSequence(proto::_child_c<2>) >() - >, + BuildActionSequence(proto::_child_c<2>)>() + >, proto::when< - proto::function, + proto::function,BuildGuards,BuildActionSequence >, + While_Do_), + BuildActionSequence(proto::_child_c<2>) >() + >, + proto::when< + proto::function,BuildGuards,BuildActionSequence >, + Do_While_), + BuildActionSequence(proto::_child_c<2>) >() + >, + proto::when< + proto::function, BuildActionSequence,BuildGuards,BuildActionSequence,BuildActionSequence>, For_Loop_), - BuildGuards(proto::_child_c<2>), - BuildActionSequence(proto::_child_c<3>), + BuildGuards(proto::_child_c<2>), + BuildActionSequence(proto::_child_c<3>), BuildActionSequence(proto::_child_c<4>) >() - >, + >, proto::or_< proto::when< proto::function,BuildActions >, get_fct,BuildActions(proto::_child_c<1>) >() - >, + >, proto::when< proto::function >, get_fct >() - >, + >, proto::when< proto::function,BuildActions,BuildActions >, get_fct,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) >() - >, + >, proto::when< proto::function,BuildActions,BuildActions,BuildActions >, get_fct,BuildActions(proto::_child_c<1>) ,BuildActions(proto::_child_c<2>),BuildActions(proto::_child_c<3>) >() - >, + >, proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) >() - >, + >, proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) ,BuildActions(proto::_child_c<5>) >() - > + > #ifdef BOOST_MSVC ,proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >, @@ -468,7 +468,7 @@ struct BuildActionsCases::case_ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) ,BuildActions(proto::_child_c<5>),BuildActions(proto::_child_c<6>) >() - > + > #endif > > @@ -496,11 +496,11 @@ struct BuildActionsCases::case_ proto::when< proto::terminal, get_fct() - > + > > {}; struct BuildActions - : proto::switch_ + : proto::switch_ {}; // attributes building @@ -677,8 +677,8 @@ BASE > build_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; @@ -703,12 +703,12 @@ typename boost::result_of::type > build_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; - return func_state(); + return func_state(); } template @@ -727,10 +727,10 @@ typename boost::result_of::type > build_state(Expr1 const& ,Expr2 const& ,Attr const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; - return func_state(); + return func_state(); } template @@ -748,9 +748,9 @@ typename ::boost::mpl::eval_if< > build_state(Expr1 const& ,Expr2 const& ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; - return func_state(); + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; + return func_state(); } template @@ -765,8 +765,8 @@ NoAction > build_state(Expr1 const& ) { - typedef typename boost::result_of::type entry_action; - return func_state(); + typedef typename boost::result_of::type entry_action; + return func_state(); } template inline @@ -777,7 +777,7 @@ NoAction > build_state() { - return func_state(); + return func_state(); } // provides the typedefs and interface. Concrete states derive from it. @@ -810,7 +810,7 @@ struct func_state_machine : public ::boost::msm::front::detail::state_base::type init_type; - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type config_type; @@ -1105,8 +1105,8 @@ BASE > build_terminate_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::TerminateFlag >::type flags_type; @@ -1134,8 +1134,8 @@ typename boost::result_of::type > build_terminate_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::TerminateFlag >::type flags_type; @@ -1162,10 +1162,10 @@ typename boost::result_of::type, > build_terminate_state(Expr1 const& ,Expr2 const& ,Attr const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; - return func_state >(); + return func_state >(); } template @@ -1185,9 +1185,9 @@ typename ::boost::mpl::eval_if< > build_terminate_state(Expr1 const& ,Expr2 const& ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; - return func_state::type entry_action; + typedef typename boost::result_of::type exit_action; + return func_state, ::boost::mpl::vector< ::boost::msm::TerminateFlag> >(); } @@ -1205,8 +1205,8 @@ NoAction, > build_terminate_state(Expr1 const& ) { - typedef typename boost::result_of::type entry_action; - return func_state,::boost::mpl::vector >(); + typedef typename boost::result_of::type entry_action; + return func_state,::boost::mpl::vector >(); } template inline @@ -1245,8 +1245,8 @@ BASE > build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; typedef typename ::boost::mpl::push_back< typename ::boost::mpl::push_back< @@ -1280,8 +1280,8 @@ typename boost::result_of::type > build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& ,Attr const&, Configure const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; typedef typename ::boost::mpl::push_back< @@ -1292,7 +1292,7 @@ build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& ,Attr >::type flags_type; typedef typename boost::result_of::type deferred_type; - return func_state(); + return func_state(); } template @@ -1312,10 +1312,10 @@ typename boost::result_of::type, > build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& ,Attr const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; - return func_state > >(); } @@ -1336,9 +1336,9 @@ typename ::boost::mpl::eval_if< > build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; - return func_state::type entry_action; + typedef typename boost::result_of::type exit_action; + return func_state, ::boost::mpl::vector< boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag > >(); } @@ -1357,8 +1357,8 @@ NoAction, > build_interrupt_state(EndInterruptEvent const&, Expr1 const&) { - typedef typename boost::result_of::type entry_action; - return func_state, + typedef typename boost::result_of::type entry_action; + return func_state, ::boost::mpl::vector > >(); } @@ -1397,8 +1397,8 @@ BASE > build_entry_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; @@ -1424,8 +1424,8 @@ typename boost::result_of::type > build_entry_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; @@ -1449,10 +1449,10 @@ typename boost::result_of::type > build_entry_state(Expr1 const& ,Expr2 const& ,Attr const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; - return entry_func_state(); + return entry_func_state(); } template @@ -1471,9 +1471,9 @@ typename ::boost::mpl::eval_if< > build_entry_state(Expr1 const& ,Expr2 const& ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; - return entry_func_state(); + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; + return entry_func_state(); } template @@ -1489,8 +1489,8 @@ NoAction > build_entry_state(Expr1 const& ) { - typedef typename boost::result_of::type entry_action; - return entry_func_state(); + typedef typename boost::result_of::type entry_action; + return entry_func_state(); } template @@ -1503,7 +1503,7 @@ NoAction > build_entry_state() { - return entry_func_state(); + return entry_func_state(); } template @@ -1526,8 +1526,8 @@ BASE > build_exit_state(Event const&,Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; @@ -1553,8 +1553,8 @@ typename boost::result_of::type > build_exit_state(Event const&,Expr1 const& ,Expr2 const& ,Attr const&, Configure const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; @@ -1578,10 +1578,10 @@ typename boost::result_of::type > build_exit_state(Event const&,Expr1 const& ,Expr2 const& ,Attr const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; - return exit_func_state(); + return exit_func_state(); } template @@ -1600,9 +1600,9 @@ typename ::boost::mpl::eval_if< > build_exit_state(Event const&,Expr1 const& ,Expr2 const& ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; - return exit_func_state(); + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; + return exit_func_state(); } template @@ -1618,8 +1618,8 @@ NoAction > build_exit_state(Event const&, Expr1 const& ) { - typedef typename boost::result_of::type entry_action; - return exit_func_state(); + typedef typename boost::result_of::type entry_action; + return exit_func_state(); } template @@ -1632,7 +1632,7 @@ NoAction > build_exit_state(Event const&) { - return exit_func_state(); + return exit_func_state(); } template @@ -1655,8 +1655,8 @@ BASE > build_explicit_entry_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; @@ -1682,8 +1682,8 @@ typename boost::result_of::type > build_explicit_entry_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; @@ -1707,10 +1707,10 @@ typename boost::result_of::type > build_explicit_entry_state(Expr1 const& ,Expr2 const& ,Attr const&) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; typedef typename boost::result_of::type attributes_type; - return explicit_entry_func_state(); + return explicit_entry_func_state(); } template @@ -1729,9 +1729,9 @@ typename ::boost::mpl::eval_if< > build_explicit_entry_state(Expr1 const& ,Expr2 const& ) { - typedef typename boost::result_of::type entry_action; - typedef typename boost::result_of::type exit_action; - return explicit_entry_func_state(); + typedef typename boost::result_of::type entry_action; + typedef typename boost::result_of::type exit_action; + return explicit_entry_func_state(); } template @@ -1747,8 +1747,8 @@ NoAction > build_explicit_entry_state(Expr1 const& ) { - typedef typename boost::result_of::type entry_action; - return explicit_entry_func_state(); + typedef typename boost::result_of::type entry_action; + return explicit_entry_func_state(); } template @@ -1761,7 +1761,7 @@ NoAction > build_explicit_entry_state() { - return explicit_entry_func_state(); + return explicit_entry_func_state(); } diff --git a/include/boost/msm/front/euml/stl.hpp b/include/boost/msm/front/euml/stl.hpp index 6d61990..313d7cb 100644 --- a/include/boost/msm/front/euml/stl.hpp +++ b/include/boost/msm/front/euml/stl.hpp @@ -14,4 +14,4 @@ #include #include -#endif //BOOST_MSM_FRONT_EUML_STL_H \ No newline at end of file +#endif //BOOST_MSM_FRONT_EUML_STL_H diff --git a/include/boost/msm/front/euml/stt_grammar.hpp b/include/boost/msm/front/euml/stt_grammar.hpp index 713374f..7dc14b2 100644 --- a/include/boost/msm/front/euml/stt_grammar.hpp +++ b/include/boost/msm/front/euml/stt_grammar.hpp @@ -75,8 +75,8 @@ struct BuildNextStates proto::comma, ::boost::mpl::push_back< BuildNextStates(proto::_left), - BuildEntry(proto::_right) >() - > + BuildEntry(proto::_right) >() + > > {}; @@ -141,7 +141,7 @@ struct BuildEvent , proto::when< proto::divides,BuildActionSequence >, TempRow() > + BuildActionSequence(proto::_right) >() > // event [ guard ] , proto::when< proto::subscript,BuildGuards >, @@ -166,7 +166,7 @@ struct BuildSource , proto::when< proto::divides, TempRow() > + BuildActionSequence(proto::_right) >() > // == source [ guard ] , proto::when< proto::subscript, diff --git a/include/boost/msm/front/euml/transformation.hpp b/include/boost/msm/front/euml/transformation.hpp index f396fdd..4a30dcd 100644 --- a/include/boost/msm/front/euml/transformation.hpp +++ b/include/boost/msm/front/euml/transformation.hpp @@ -87,23 +87,23 @@ struct BackInserter_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return std::back_inserter(T()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return std::back_inserter(T()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { return std::back_inserter(T()(evt,fsm,state)); - } + } }; struct back_inserter_tag {}; @@ -141,23 +141,23 @@ struct FrontInserter_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return std::front_inserter(T()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return std::front_inserter(T()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { return std::front_inserter(T()(evt,fsm,state)); - } + } }; struct front_inserter_tag {}; @@ -195,23 +195,23 @@ struct Inserter_ : euml_action > typedef ::boost::mpl::set tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,action_tag>::type, - typename transition_action_result::type >::type - operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const - { - return std::inserter(T()(evt,fsm,src,tgt),Pos()(evt,fsm,src,tgt)); - } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename T::tag_type,state_action_tag>::type, - typename state_action_result::type >::type - operator()(Event const& evt,FSM& fsm,STATE& state )const - { + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,action_tag>::type, + typename transition_action_result::type >::type + operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const + { + return std::inserter(T()(evt,fsm,src,tgt),Pos()(evt,fsm,src,tgt)); + } + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename T::tag_type,state_action_tag>::type, + typename state_action_result::type >::type + operator()(Event const& evt,FSM& fsm,STATE& state )const + { return std::inserter(T()(evt,fsm,state),Pos()(evt,fsm,state)); - } + } }; struct inserter_tag {}; @@ -252,20 +252,20 @@ struct Transform_ tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Param1::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Param1::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return std::transform(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt), Param4()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Param1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Param1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return std::transform(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state), @@ -291,20 +291,20 @@ struct Transform_ tag_type; template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Param1::tag_type,action_tag>::type, - typename transition_action_result::type >::type + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Param1::tag_type,action_tag>::type, + typename transition_action_result::type >::type operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { return std::transform (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt), Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt)); } - template - typename ::boost::enable_if< - typename ::boost::mpl::has_key< - typename Param1::tag_type,state_action_tag>::type, - typename state_action_result::type >::type + template + typename ::boost::enable_if< + typename ::boost::mpl::has_key< + typename Param1::tag_type,state_action_tag>::type, + typename state_action_result::type >::type operator()(Event const& evt,FSM& fsm,STATE& state )const { return std::transform (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state), diff --git a/include/boost/msm/front/functor_row.hpp b/include/boost/msm/front/functor_row.hpp index eabd4af..139e8f5 100644 --- a/include/boost/msm/front/functor_row.hpp +++ b/include/boost/msm/front/functor_row.hpp @@ -165,7 +165,7 @@ namespace boost { namespace msm { namespace front template struct get_row_target { - typedef typename TGT::Target type; + typedef typename TGT::Target type; }; template diff --git a/include/boost/msm/front/internal_row.hpp b/include/boost/msm/front/internal_row.hpp index f167add..4165008 100644 --- a/include/boost/msm/front/internal_row.hpp +++ b/include/boost/msm/front/internal_row.hpp @@ -19,15 +19,15 @@ namespace boost { namespace msm { namespace front { - template< - class Event + template< + class Event , typename CalledForAction , void (CalledForAction::*action)(Event const&) - > - struct a_internal - { + > + struct a_internal + { typedef sm_a_i_row_tag row_type_tag; - typedef Event Evt; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -37,19 +37,19 @@ namespace boost { namespace msm { namespace front (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } - }; + }; - template< + template< class Event , typename CalledForAction , void (CalledForAction::*action)(Event const&) , typename CalledForGuard , bool (CalledForGuard::*guard)(Event const&) - > - struct internal - { + > + struct internal + { typedef sm_i_row_tag row_type_tag; - typedef Event Evt; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -68,16 +68,16 @@ namespace boost { namespace msm { namespace front (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } - }; - template< - class Event + }; + template< + class Event , typename CalledForGuard , bool (CalledForGuard::*guard)(Event const&) - > - struct g_internal - { + > + struct g_internal + { typedef sm_g_i_row_tag row_type_tag; - typedef Event Evt; + typedef Event Evt; template static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -88,13 +88,13 @@ namespace boost { namespace msm { namespace front ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } }; - template< - class Event - > - struct _internal - { + template< + class Event + > + struct _internal + { typedef sm__i_row_tag row_type_tag; - typedef Event Evt; + typedef Event Evt; }; }}} diff --git a/include/boost/msm/front/row2.hpp b/include/boost/msm/front/row2.hpp index fbc7d74..d87b713 100644 --- a/include/boost/msm/front/row2.hpp +++ b/include/boost/msm/front/row2.hpp @@ -19,32 +19,32 @@ namespace boost { namespace msm { namespace front { - template< - typename T1 - , class Event - , typename T2 - > - struct _row2 - { + template< + typename T1 + , class Event + , typename T2 + > + struct _row2 + { typedef _row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; - }; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; + }; - template< - typename T1 - , class Event - , typename T2 + template< + typename T1 + , class Event + , typename T2 , typename CalledForAction - , void (CalledForAction::*action)(Event const&) - > - struct a_row2 - { + , void (CalledForAction::*action)(Event const&) + > + struct a_row2 + { typedef a_row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -54,23 +54,23 @@ namespace boost { namespace msm { namespace front (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } - }; + }; - template< - typename T1 - , class Event - , typename T2 + template< + typename T1 + , class Event + , typename T2 , typename CalledForAction , void (CalledForAction::*action)(Event const&) , typename CalledForGuard , bool (CalledForGuard::*guard)(Event const&) - > - struct row2 - { + > + struct row2 + { typedef row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -89,20 +89,20 @@ namespace boost { namespace msm { namespace front (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } - }; - template< - typename T1 - , class Event - , typename T2 + }; + template< + typename T1 + , class Event + , typename T2 , typename CalledForGuard , bool (CalledForGuard::*guard)(Event const&) - > - struct g_row2 - { + > + struct g_row2 + { typedef g_row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; template static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -114,18 +114,18 @@ namespace boost { namespace msm { namespace front } }; // internal transitions - template< - typename T1 - , class Event + template< + typename T1 + , class Event , typename CalledForAction , void (CalledForAction::*action)(Event const&) - > - struct a_irow2 - { + > + struct a_irow2 + { typedef a_irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -135,22 +135,22 @@ namespace boost { namespace msm { namespace front (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } - }; + }; - template< - typename T1 - , class Event + template< + typename T1 + , class Event , typename CalledForAction , void (CalledForAction::*action)(Event const&) , typename CalledForGuard , bool (CalledForGuard::*guard)(Event const&) - > - struct irow2 - { + > + struct irow2 + { typedef irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) @@ -169,19 +169,19 @@ namespace boost { namespace msm { namespace front (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); } - }; - template< - typename T1 - , class Event + }; + template< + typename T1 + , class Event , typename CalledForGuard , bool (CalledForGuard::*guard)(Event const&) - > - struct g_irow2 - { + > + struct g_irow2 + { typedef g_irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; template static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) diff --git a/include/boost/msm/front/state_machine_def.hpp b/include/boost/msm/front/state_machine_def.hpp index c881c2b..8078285 100644 --- a/include/boost/msm/front/state_machine_def.hpp +++ b/include/boost/msm/front/state_machine_def.hpp @@ -26,61 +26,61 @@ namespace boost { namespace msm { namespace front template struct state_machine_def : public boost::msm::front::detail::state_base { - // tags - // default: no flag - typedef ::boost::mpl::vector0<> flag_list; - //default: no deferred events - typedef ::boost::mpl::vector0<> deferred_events; + // tags + // default: no flag + typedef ::boost::mpl::vector0<> flag_list; + //default: no deferred events + typedef ::boost::mpl::vector0<> deferred_events; // customization (message queue, exceptions) - typedef ::boost::mpl::vector0<> configuration; + typedef ::boost::mpl::vector0<> configuration; typedef BaseState BaseAllStates; - template< - typename T1 - , class Event - , typename T2 - , void (Derived::*action)(Event const&) - > - struct a_row - { + template< + typename T1 + , class Event + , typename T2 + , void (Derived::*action)(Event const&) + > + struct a_row + { typedef a_row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&, AllStates&) { // in this front-end, we don't need to know source and target states (fsm.*action)(evt); } - }; + }; - template< - typename T1 - , class Event - , typename T2 - > - struct _row - { + template< + typename T1 + , class Event + , typename T2 + > + struct _row + { typedef _row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; - }; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; + }; - template< - typename T1 - , class Event - , typename T2 - , void (Derived::*action)(Event const&) - , bool (Derived::*guard)(Event const&) - > - struct row - { + template< + typename T1 + , class Event + , typename T2 + , void (Derived::*action)(Event const&) + , bool (Derived::*guard)(Event const&) + > + struct row + { typedef row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { @@ -93,19 +93,19 @@ struct state_machine_def : public boost::msm::front::detail::state_base - struct g_row - { + }; + template< + typename T1 + , class Event + , typename T2 + , bool (Derived::*guard)(Event const&) + > + struct g_row + { typedef g_row_tag row_type_tag; - typedef T1 Source; - typedef T2 Target; - typedef Event Evt; + typedef T1 Source; + typedef T2 Target; + typedef Event Evt; template static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { @@ -114,37 +114,37 @@ struct state_machine_def : public boost::msm::front::detail::state_base - struct a_irow - { + template< + typename T1 + , class Event + , void (Derived::*action)(Event const&) + > + struct a_irow + { typedef a_irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { // in this front-end, we don't need to know source and target states (fsm.*action)(evt); } - }; + }; - template< - typename T1 - , class Event - , void (Derived::*action)(Event const&) - , bool (Derived::*guard)(Event const&) - > - struct irow - { + template< + typename T1 + , class Event + , void (Derived::*action)(Event const&) + , bool (Derived::*guard)(Event const&) + > + struct irow + { typedef irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; template static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { @@ -157,18 +157,18 @@ struct state_machine_def : public boost::msm::front::detail::state_base - struct g_irow - { + }; + template< + typename T1 + , class Event + , bool (Derived::*guard)(Event const&) + > + struct g_irow + { typedef g_irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; template static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { @@ -177,16 +177,16 @@ struct state_machine_def : public boost::msm::front::detail::state_base - struct _irow - { + template< + typename T1 + , class Event + > + struct _irow + { typedef _irow_tag row_type_tag; - typedef T1 Source; - typedef T1 Target; - typedef Event Evt; + typedef T1 Source; + typedef T1 Target; + typedef Event Evt; }; protected: // Default no-transition handler. Can be replaced in the Derived SM class.