summaryrefslogtreecommitdiff
path: root/boost/msm/front/euml/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/msm/front/euml/common.hpp')
-rw-r--r--boost/msm/front/euml/common.hpp50
1 files changed, 40 insertions, 10 deletions
diff --git a/boost/msm/front/euml/common.hpp b/boost/msm/front/euml/common.hpp
index f9a9cc46fa..fff03d6dca 100644
--- a/boost/msm/front/euml/common.hpp
+++ b/boost/msm/front/euml/common.hpp
@@ -951,7 +951,7 @@ struct Fsm_ : euml_action<Fsm_<Index> >
}
template <class EVT,class FSM,class SourceState,class TargetState>
typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
- operator()(EVT const& evt ,FSM& fsm,SourceState& ,TargetState&)const
+ operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const
{
return fsm.get_attribute(Index());
}
@@ -2455,7 +2455,7 @@ Exit_Pt_Helper const exit_pt_ = Exit_Pt_Helper();
#define BOOST_MSM_EUML_ACTION(instance_name) \
struct instance_name ## _impl; \
- struct instance_name ## _helper : msm::front::euml::euml_action<instance_name ## _impl> \
+ struct instance_name ## _helper : boost::msm::front::euml::euml_action<instance_name ## _impl> \
{ \
instance_name ## _helper(){} \
typedef instance_name ## _impl action_name; \
@@ -2465,7 +2465,7 @@ Exit_Pt_Helper const exit_pt_ = Exit_Pt_Helper();
#define BOOST_MSM_EUML_DECLARE_ACTION(instance_name) \
struct instance_name ; \
- struct instance_name ## _helper : msm::front::euml::euml_action<instance_name > \
+ struct instance_name ## _helper : boost::msm::front::euml::euml_action<instance_name > \
{ \
instance_name ## _helper(){} \
typedef instance_name action_name; \
@@ -2474,13 +2474,13 @@ Exit_Pt_Helper const exit_pt_ = Exit_Pt_Helper();
#define BOOST_MSM_EUML_EVENT(instance_name) \
- struct instance_name ## _helper : msm::front::euml::euml_event<instance_name ## _helper>{ \
+ struct instance_name ## _helper : boost::msm::front::euml::euml_event<instance_name ## _helper>{ \
instance_name ## _helper(){} \
instance_name ## _helper const& operator()() const {return *this;} }; \
static instance_name ## _helper instance_name;
// an event matching any event
-struct kleene_ : msm::front::euml::euml_event<kleene_>, public boost::any
+struct kleene_ : boost::msm::front::euml::euml_event<kleene_>, public boost::any
{
kleene_() : boost::any(){}
template<typename ValueType>
@@ -2489,7 +2489,7 @@ struct kleene_ : msm::front::euml::euml_event<kleene_>, public boost::any
static kleene_ kleene;
#define BOOST_MSM_EUML_DECLARE_EVENT(instance_name) \
- struct instance_name : msm::front::euml::euml_event<instance_name >{ \
+ struct instance_name : boost::msm::front::euml::euml_event<instance_name >{ \
instance_name(){} \
instance_name const& operator()() const {return *this;} };
@@ -2527,10 +2527,12 @@ static kleene_ kleene;
BOOST_PP_CAT(instance,_helper) operator() \
(BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1, ~ ))const{ \
return BOOST_PP_CAT(instance,_helper) (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE2, ~ ));}
+
+#if defined(FUSION_MAX_MAP_SIZE)
-#define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \
+#define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \
struct instance_name ## _helper : \
- msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \
+ boost::msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \
{ \
template <class T,int checked_size> struct size_helper \
{ \
@@ -2552,16 +2554,44 @@ static kleene_ kleene;
}; \
static instance_name ## _helper instance_name;
+#else
+
+#define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \
+ struct instance_name ## _helper : \
+ boost::msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \
+ { \
+ template <class T,int checked_size> struct size_helper \
+ { \
+ typedef typename ::boost::mpl::less_equal< \
+ typename ::boost::fusion::result_of::size<T>::type, \
+ ::boost::mpl::int_<checked_size> >::type type; \
+ }; \
+ BOOST_PP_CAT(instance_name,_helper()) : attributes_name(){} \
+ typedef attributes_name::attributes_type attribute_map; \
+ typedef ::boost::fusion::result_of::as_vector<attribute_map>::type attribute_vec; \
+ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \
+ MSM_EUML_EVENT_HELPER_CONSTRUCTORS, (instance_name,attributes_name)) \
+ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \
+ MSM_EUML_EVENT_INSTANCE_HELPER_ATTRIBUTE_MAP, ~) \
+ BOOST_PP_CAT(instance_name,_helper) operator()(){ \
+ return BOOST_PP_CAT(instance_name,_helper)();} \
+ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \
+ MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL, instance_name) \
+ }; \
+ static instance_name ## _helper instance_name;
+
+#endif
+
#define BOOST_MSM_EUML_EVENT_NAME(instance_name) instance_name ## _helper
#define BOOST_MSM_EUML_FLAG_NAME(instance_name) instance_name ## _helper
#define BOOST_MSM_EUML_FLAG(instance_name) \
- struct instance_name ## _helper : msm::front::euml::euml_flag<instance_name ## _helper>{}; \
+ struct instance_name ## _helper : boost::msm::front::euml::euml_flag<instance_name ## _helper>{}; \
static instance_name ## _helper instance_name;
#define BOOST_MSM_EUML_DECLARE_FLAG(instance_name) \
- struct instance_name : msm::front::euml::euml_flag<instance_name >{};
+ struct instance_name : boost::msm::front::euml::euml_flag<instance_name >{};
#define BOOST_MSM_EUML_STATE_NAME(instance_name) instance_name ## _helper