// Copyright 2008 Christophe Henry // henry UNDERSCORE christophe AT hotmail DOT com // This is an extended version of the state machine available in the boost::mpl library // Distributed under the same license as the original. // Copyright for the original version: // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed // under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MSM_FRONT_EUML_STATE_GRAMMAR_H #define BOOST_MSM_FRONT_EUML_STATE_GRAMMAR_H #include #include #include #include #include #include #include #include #include #include #include BOOST_MPL_HAS_XXX_TRAIT_DEF(attribute_tag) BOOST_MPL_HAS_XXX_TRAIT_DEF(flag_create_tag) BOOST_MPL_HAS_XXX_TRAIT_DEF(defer_create_tag) BOOST_MPL_HAS_XXX_TRAIT_DEF(control_configure_tag) namespace proto = boost::proto; namespace boost { namespace msm { namespace front { namespace euml { // provides the typedefs and interface. Concrete states derive from it. template, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = ::boost::msm::front::default_base_state> struct func_state : public ::boost::msm::front::detail::state_base, euml_state > { func_state(){} // grammar testing BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); typedef StateNameTag state_name_tag; // flags typedef Flags flag_list; // 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); } }; // provides the typedefs and interface. Concrete states derive from it. template, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = default_base_state> struct entry_func_state : public ::boost::msm::front::detail::state_base, euml_state > { entry_func_state(){} // grammar testing BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); typedef StateNameTag state_name_tag; // tags typedef int pseudo_entry; enum {zone_index=ZoneIndex}; typedef int explicit_entry_state; // flags typedef Flags flag_list; // 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); } }; // provides the typedefs and interface. Concrete states derive from it. template, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = default_base_state> struct explicit_entry_func_state : public ::boost::msm::front::detail::state_base, public ::boost::msm::front::explicit_entry, euml_state > { explicit_entry_func_state(){} // grammar testing BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); typedef StateNameTag state_name_tag; // flags typedef Flags flag_list; // 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); } }; // provides the typedefs and interface. Concrete states derive from it. template, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class BASE = default_base_state> struct exit_func_state : public ::boost::msm::front::detail::state_base, euml_state > { exit_func_state(){} // grammar testing BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); typedef StateNameTag state_name_tag; // tags typedef Event event; typedef BASE Base; typedef int pseudo_exit; // flags typedef Flags flag_list; // deferred events typedef Defer deferred_events; 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; struct BuildGuards; struct BuildActionSequence : proto::or_< proto::when < BuildActions, ActionSequence_()>() >, proto::when < proto::comma, ActionSequence_(), BuildActions(proto::_right)>()>() >, proto::when < proto::comma, ActionSequence_(), BuildActions(proto::_right) >() >() > > {}; struct BuildActionsCases { // The primary template matches nothing: template struct case_ : proto::not_ {}; }; template<> struct BuildActionsCases::case_ : proto::when< proto::pre_inc, Pre_inc_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::pre_dec, Pre_dec_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::post_inc, Post_inc_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::post_dec, Post_dec_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::dereference, Deref_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::plus, Plus_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::minus, Minus_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::multiplies, Multiplies_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::divides, Divides_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::modulus, Modulus_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::bitwise_and, Bitwise_And_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::bitwise_or, Bitwise_Or_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::bitwise_xor, Bitwise_Xor_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::plus_assign, Plus_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::minus_assign, Minus_Assign_() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::multiplies_assign, Multiplies_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::divides_assign, Divides_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::modulus_assign, Modulus_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::shift_left_assign, ShiftLeft_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::shift_right_assign, ShiftRight_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::shift_left, ShiftLeft_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::shift_right, ShiftRight_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::assign, Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::subscript, Subscript_< BuildActions(proto::_left),BuildActions(proto::_right)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::unary_plus, Unary_Plus_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::when< proto::negate, Unary_Minus_< BuildActions(proto::_child)>() > {}; template<> struct BuildActionsCases::case_ : proto::or_< proto::when< proto::function,BuildGuards,BuildActionSequence,BuildActionSequence >, If_Else_), BuildActionSequence(proto::_child_c<2>), BuildActionSequence(proto::_child_c<3>) >() >, proto::when< 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>) >() >, proto::when< proto::function, BuildActionSequence,BuildGuards,BuildActionSequence,BuildActionSequence>, For_Loop_), 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 >, 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>),BuildActions(proto::_child_c<6>) >() > #endif > > {}; template<> struct BuildActionsCases::case_ : proto::or_< proto::when< proto::terminal, get_action_name() >, proto::when< proto::terminal, proto::_ >, proto::when< proto::terminal, proto::_ >, proto::when< proto::terminal, proto::_ >, proto::when< proto::terminal, get_fct() >, proto::when< proto::terminal, proto::_child > > {}; struct BuildActions : proto::switch_ {}; // attributes building #define BOOST_MSM_EUML_DECLARE_ATTRIBUTE(attr_type,attr_name) \ struct attr_name ## _ \ : proto::extends< proto::terminal::type, attr_name ## _, sm_domain> \ {typedef attr_name ## _ action_name; \ typedef ::boost::fusion::pair attribute_type; \ attr_name ## _ (){} \ }; \ attr_name ## _ const attr_name; struct make_attributes_tag { typedef int attribute_tag; }; template struct get_attribute_type { typedef typename T::attribute_type type; }; template struct transform_to_fusion_pair { typedef typename ::boost::mpl::fold< Seq,::boost::mpl::vector<>, ::boost::mpl::push_back< ::boost::mpl::placeholders::_1, get_attribute_type< ::boost::mpl::placeholders::_2> > >::type type; }; template struct attribute { BOOST_PROTO_BASIC_EXTENDS( proto::terminal::type , attribute , sm_domain ) typedef ::boost::fusion::pair attribute_type; }; attribute<> const attributes_ = {{}}; attribute<> const no_attributes_ = {{}}; struct BuildAttributesHelper : proto::make< ::boost::mpl::pop_front< proto::fold_tree< proto::_ , ::boost::fusion::vector<>() , ::boost::mpl::push_back, proto::_value, get_attribute_type > >() > > > {}; struct BuildAttributes : proto::make< ::boost::mpl::if_< has_attribute_tag< ::boost::mpl::deref< ::boost::mpl::prior< ::boost::mpl::end< BuildAttributesHelper > > > >, ::boost::fusion::result_of::as_map< ::boost::mpl::pop_back< BuildAttributesHelper > >, ::boost::fusion::result_of::as_map< BuildAttributesHelper > > > {}; // helper to build a mpl::vector from a << list struct BuildMplVectorHelper : proto::make< ::boost::mpl::pop_front< proto::fold_tree< proto::_ , ::boost::mpl::vector0<>() , ::boost::mpl::push_back() > > > {}; // flags building struct BuildFlags : proto::make< ::boost::mpl::remove_if< BuildMplVectorHelper, ::boost::mpl::not_< ::boost::is_same, flag_tag > > > > {}; struct control_configure_tag {}; // configuration building struct make_configure_tag { typedef int control_configure_tag; }; template struct configure { typedef not_euml_tag euml_tag_type; BOOST_PROTO_BASIC_EXTENDS( proto::terminal::type , configure , sm_domain ) }; configure<> const configure_ = {{}}; configure<> const no_configure_ = {{}}; struct BuildConfigure : proto::make< ::boost::mpl::remove_if< BuildMplVectorHelper, ::boost::mpl::not_< ::boost::is_same, config_tag > > > > {}; struct BuildDeferred : proto::make< ::boost::mpl::remove_if< BuildMplVectorHelper, ::boost::mpl::not_< ::boost::is_same, event_tag > > > > {}; template struct define_init { typedef int defer_create_tag; BOOST_PROTO_BASIC_EXTENDS( proto::terminal::type , define_init , sm_domain ) }; define_init<> const init_ = {{}}; struct BuildInit : proto::make< ::boost::mpl::pop_front< proto::fold_tree< proto::_ , ::boost::mpl::vector0<>() , ::boost::mpl::push_back() > > > {}; template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, 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 attributes_type; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, 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 attributes_type; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, 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 attributes_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > 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(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, NoAction > build_state(Expr1 const& ) { typedef typename boost::result_of::type entry_action; return func_state(); } template inline func_state< StateNameTag, NoAction, NoAction > build_state() { return func_state(); } // provides the typedefs and interface. Concrete states derive from it. template, class Flags = ::boost::mpl::vector0<>, class Defer = ::boost::mpl::vector0<>, class Configuration = ::boost::mpl::vector0<>, class NoTransitionFunctor = NoAction, class OnExceptionFunctor = NoAction, class BASE = ::boost::msm::front::default_base_state> struct func_state_machine : public ::boost::msm::front::detail::state_base, euml_state > { func_state_machine(){} // grammar testing BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); BOOST_MPL_ASSERT_NOT(( boost::is_same )); // flags typedef StateNameTag state_name_tag; typedef Flags flag_list; // deferred events typedef Defer deferred_events; // customization (message queue, exceptions) typedef Configuration configuration; typedef BASE BaseAllStates; typedef STT transition_table; // the initial state of the player SM. Must be defined typedef Init initial_state; 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); } protected: // Default no-transition handler. Can be replaced in the Derived SM class. template void no_transition(Event const& evt,FSM& fsm,int state) { NoTransitionFunctor()(evt,fsm,state); } // default exception handler. Can be replaced in the Derived SM class. template void exception_caught (Event const& evt,FSM& fsm,std::exception& e) { OnExceptionFunctor()(evt,fsm,e); } }; template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type > build_sm(STT ,Init) { typedef typename boost::result_of::type init_type; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > build_sm(STT ,Init , Expr1 const&) { typedef typename boost::result_of::type entry_action; typedef typename boost::result_of::type init_type; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > build_sm(STT ,Init , Expr1 const& ,Expr2 const& ) { typedef typename boost::result_of::type init_type; typedef typename boost::result_of::type entry_action; typedef typename boost::result_of::type exit_action; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type > build_sm(STT ,Init , Expr1 const& ,Expr2 const& ,Attr const&) { typedef typename boost::result_of::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 attributes_type; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type > build_sm(STT ,Init , Expr1 const& ,Expr2 const& , Attr const&, Configure const& ) { typedef typename boost::result_of::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 attributes_type; typedef typename boost::result_of::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type config_type; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > build_sm(STT ,Init , Expr1 const& ,Expr2 const& ,Attr const&, Configure const&, Expr3 const& ) { typedef typename boost::result_of::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 no_transition_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; typedef typename boost::result_of::type config_type; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > build_sm(STT ,Init , Expr1 const& ,Expr2 const& , Attr const&, Configure const&, Expr3 const&, Expr4 const& ) { typedef typename boost::result_of::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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type config_type; typedef typename boost::result_of::type no_transition_action; typedef typename boost::result_of::type on_exception_action; typedef typename boost::result_of::type attributes_type; return func_state_machine(); } template inline func_state_machine< StateNameTag, STT, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, BASE > build_sm(STT ,Init , Expr1 const& ,Expr2 const& ,Attr const& , Configure const&, Expr3 const&, Expr4 const& , BASE ) { typedef typename boost::result_of::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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type config_type; typedef typename boost::result_of::type no_transition_action; typedef typename boost::result_of::type on_exception_action; typedef typename boost::result_of::type attributes_type; return func_state_machine(); } template inline ::boost::msm::front::detail::inherit_attributes::type> build_attributes (Expr const&) { return ::boost::msm::front::detail::inherit_attributes::type> (); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::TerminateFlag>::type, typename boost::result_of::type, 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::mpl::push_back< typename boost::result_of::type, ::boost::msm::TerminateFlag >::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::TerminateFlag>::type, 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::mpl::push_back< typename boost::result_of::type, ::boost::msm::TerminateFlag >::type flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, ::boost::mpl::vector > 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 attributes_type; return func_state >(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, ::boost::fusion::vector<>, ::boost::mpl::vector > 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, ::boost::mpl::vector< ::boost::msm::TerminateFlag> >(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, NoAction, ::boost::fusion::vector<>, ::boost::mpl::vector > build_terminate_state(Expr1 const& ) { typedef typename boost::result_of::type entry_action; return func_state,::boost::mpl::vector >(); } template inline func_state< StateNameTag, NoAction, NoAction, ::boost::fusion::vector<>, ::boost::mpl::vector > build_terminate_state() { return func_state,::boost::mpl::vector >(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename ::boost::mpl::push_back< typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::InterruptedFlag>::type, boost::msm::EndInterruptFlag >::type, typename boost::result_of::type, 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 attributes_type; typedef typename ::boost::mpl::push_back< typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::InterruptedFlag>::type, boost::msm::EndInterruptFlag >::type flags_type; typedef typename boost::result_of::type deferred_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename ::boost::mpl::push_back< typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::InterruptedFlag>::type, boost::msm::EndInterruptFlag >::type, 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 attributes_type; typedef typename ::boost::mpl::push_back< typename ::boost::mpl::push_back< typename boost::result_of::type, ::boost::msm::InterruptedFlag>::type, boost::msm::EndInterruptFlag >::type flags_type; typedef typename boost::result_of::type deferred_type; return func_state(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, ::boost::mpl::vector > > 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 attributes_type; return func_state > >(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, ::boost::fusion::vector<>, ::boost::mpl::vector > > 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, ::boost::mpl::vector< boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag > >(); } template inline func_state< StateNameTag, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, NoAction, ::boost::fusion::vector<>, ::boost::mpl::vector > > build_interrupt_state(EndInterruptEvent const&, Expr1 const&) { typedef typename boost::result_of::type entry_action; return func_state, ::boost::mpl::vector > >(); } template inline func_state< StateNameTag, NoAction, NoAction, ::boost::fusion::vector<>, ::boost::mpl::vector > > build_interrupt_state(EndInterruptEvent const&) { return func_state, ::boost::mpl::vector > >(); } template inline entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, 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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return entry_func_state(); } template inline entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, 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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return entry_func_state(); } template inline entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, 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 attributes_type; return entry_func_state(); } template inline entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > 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(); } template inline entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, NoAction > build_entry_state(Expr1 const& ) { typedef typename boost::result_of::type entry_action; return entry_func_state(); } template inline entry_func_state< StateNameTag, ZoneIndex, NoAction, NoAction > build_entry_state() { return entry_func_state(); } template inline exit_func_state< StateNameTag, Event, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, 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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return exit_func_state(); } template inline exit_func_state< StateNameTag, Event, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, 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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return exit_func_state(); } template inline exit_func_state< StateNameTag, Event, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, 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 attributes_type; return exit_func_state(); } template inline exit_func_state< StateNameTag, Event, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > 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(); } template inline exit_func_state< StateNameTag, Event, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, NoAction > build_exit_state(Event const&, Expr1 const& ) { typedef typename boost::result_of::type entry_action; return exit_func_state(); } template inline exit_func_state< StateNameTag, Event, NoAction, NoAction > build_exit_state(Event const&) { return exit_func_state(); } template inline explicit_entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, typename boost::result_of::type, 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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return explicit_entry_func_state(); } template inline explicit_entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename boost::result_of::type, typename boost::result_of::type, 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 flags_type; typedef typename boost::result_of::type deferred_type; typedef typename boost::result_of::type attributes_type; return explicit_entry_func_state(); } template inline explicit_entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, 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 attributes_type; return explicit_entry_func_state(); } template inline explicit_entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type > 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(); } template inline explicit_entry_func_state< StateNameTag, ZoneIndex, typename ::boost::mpl::eval_if< typename proto::matches::type, boost::result_of, make_invalid_type>::type, NoAction > build_explicit_entry_state(Expr1 const& ) { typedef typename boost::result_of::type entry_action; return explicit_entry_func_state(); } template inline explicit_entry_func_state< StateNameTag, ZoneIndex, NoAction, NoAction > build_explicit_entry_state() { return explicit_entry_func_state(); } }}}} #endif //BOOST_MSM_FRONT_EUML_STATE_GRAMMAR_H