diff DEPENDENCIES/generic/include/boost/msm/front/euml/common.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/msm/front/euml/common.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/msm/front/euml/common.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -951,7 +951,7 @@
     }
     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 @@
 
 #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 @@
 
 #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 @@
 
 
 #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 @@
 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 @@
         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 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