Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65689 - trunk/boost/msm/front/euml
From: christophe.j.henry_at_[hidden]
Date: 2010-09-29 16:24:34


Author: chenry
Date: 2010-09-29 16:24:32 EDT (Wed, 29 Sep 2010)
New Revision: 65689
URL: http://svn.boost.org/trac/boost/changeset/65689

Log:
added possibility to use normal functors in an eUML state grammar
Text files modified:
   trunk/boost/msm/front/euml/common.hpp | 36 ++++++++++++------------------------
   trunk/boost/msm/front/euml/guard_grammar.hpp | 32 ++++++++++++++++++++------------
   trunk/boost/msm/front/euml/state_grammar.hpp | 18 +++++++++++-------
   3 files changed, 43 insertions(+), 43 deletions(-)

Modified: trunk/boost/msm/front/euml/common.hpp
==============================================================================
--- trunk/boost/msm/front/euml/common.hpp (original)
+++ trunk/boost/msm/front/euml/common.hpp 2010-09-29 16:24:32 EDT (Wed, 29 Sep 2010)
@@ -374,6 +374,7 @@
 };
 NoAction const no_action;
 
+struct fsm_artefact_tag {};
 template <class Index=void>
 struct GetSource_ : euml_action<GetSource_<Index> >
 {
@@ -409,8 +410,7 @@
         return src;
     }
 };
-struct get_source_tag {};
-struct GetSource_Helper: proto::extends< proto::terminal<get_source_tag>::type, GetSource_Helper, sm_domain>
+struct GetSource_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetSource_Helper, sm_domain>
 {
     GetSource_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -460,8 +460,7 @@
         return tgt;
     }
 };
-struct get_target_tag {};
-struct GetTarget_Helper: proto::extends< proto::terminal<get_target_tag>::type, GetTarget_Helper, sm_domain>
+struct GetTarget_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetTarget_Helper, sm_domain>
 {
     GetTarget_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -513,8 +512,7 @@
         return state;
     }
 };
-struct get_state_tag {};
-struct GetState_Helper: proto::extends< proto::terminal<get_state_tag>::type, GetState_Helper, sm_domain>
+struct GetState_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetState_Helper, sm_domain>
 {
     GetState_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -589,8 +587,7 @@
         return evt;
     }
 };
-struct get_event_tag {};
-struct GetEvent_Helper: proto::extends< proto::terminal<get_event_tag>::type, GetEvent_Helper, sm_domain>
+struct GetEvent_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetEvent_Helper, sm_domain>
 {
     GetEvent_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -665,8 +662,7 @@
         return fsm;
     }
 };
-struct get_fsm_tag {};
-struct GetFsm_Helper: proto::extends< proto::terminal<get_fsm_tag>::type, GetFsm_Helper, sm_domain>
+struct GetFsm_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetFsm_Helper, sm_domain>
 {
     GetFsm_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -737,11 +733,10 @@
     }
 };
 
-struct substate_tag {};
-struct SubState_Helper: proto::extends< proto::terminal<substate_tag>::type, SubState_Helper, sm_domain>
+struct SubState_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, SubState_Helper, sm_domain>
 {
     SubState_Helper(){}
- using proto::extends< proto::terminal<substate_tag>::type, SubState_Helper, sm_domain>::operator=;
+ using proto::extends< proto::terminal<fsm_artefact_tag>::type, SubState_Helper, sm_domain>::operator=;
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
 #ifdef BOOST_MSVC
  ,class Arg6
@@ -801,10 +796,7 @@
     }
 };
 
-struct get_attribute_tag
-{
-};
-struct GetAttribute_Helper: proto::extends< proto::terminal<get_attribute_tag>::type, GetAttribute_Helper, sm_domain>
+struct GetAttribute_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetAttribute_Helper, sm_domain>
 {
     GetAttribute_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -1556,10 +1548,7 @@
     }
 };
 
-struct get_flag_tag
-{
-};
-struct Get_Flag_Helper: proto::extends< proto::terminal<get_flag_tag>::type, Get_Flag_Helper, sm_domain>
+struct Get_Flag_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, Get_Flag_Helper, sm_domain>
 {
     Get_Flag_Helper(){}
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
@@ -1584,11 +1573,10 @@
         fsm.defer_event(evt);
     }
 };
-struct defer_event_tag {};
-struct Defer_Helper : proto::extends< proto::terminal<defer_event_tag>::type, Defer_Helper, sm_domain>
+struct Defer_Helper : proto::extends< proto::terminal<fsm_artefact_tag>::type, Defer_Helper, sm_domain>
 {
     Defer_Helper(){}
- using proto::extends< proto::terminal<defer_event_tag>::type, Defer_Helper, sm_domain>::operator=;
+ using proto::extends< proto::terminal<fsm_artefact_tag>::type, Defer_Helper, sm_domain>::operator=;
     template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
 #ifdef BOOST_MSVC
  ,class Arg6

Modified: trunk/boost/msm/front/euml/guard_grammar.hpp
==============================================================================
--- trunk/boost/msm/front/euml/guard_grammar.hpp (original)
+++ trunk/boost/msm/front/euml/guard_grammar.hpp 2010-09-29 16:24:32 EDT (Wed, 29 Sep 2010)
@@ -321,21 +321,29 @@
 struct BuildGuardsCases::case_<proto::tag::terminal>
     : proto::or_<
         proto::when <
- proto::terminal<action_tag>,
- get_action_name<proto::_ >()
- >,
+ proto::terminal<action_tag>,
+ get_action_name<proto::_ >()
+ >,
         proto::when<
- proto::terminal<state_tag>,
- proto::_
- >,
+ proto::terminal<state_tag>,
+ proto::_
+ >,
         proto::when<
- proto::terminal<flag_tag>,
- proto::_
- >,
+ proto::terminal<flag_tag>,
+ proto::_
+ >,
         proto::when<
- proto::terminal<event_tag>,
- proto::_
- >
+ proto::terminal<event_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<fsm_artefact_tag>,
+ get_fct<proto::_ >()
+ >,
+ proto::when<
+ proto::terminal<proto::_>,
+ proto::_child
+ >
>
 {};
 

Modified: trunk/boost/msm/front/euml/state_grammar.hpp
==============================================================================
--- trunk/boost/msm/front/euml/state_grammar.hpp (original)
+++ trunk/boost/msm/front/euml/state_grammar.hpp 2010-09-29 16:24:32 EDT (Wed, 29 Sep 2010)
@@ -484,23 +484,27 @@
         proto::when<
             proto::terminal<action_tag>,
             get_action_name<proto::_ >()
- >,
+ >,
         proto::when<
             proto::terminal<state_tag>,
             proto::_
- >,
+ >,
         proto::when<
             proto::terminal<flag_tag>,
             proto::_
- >,
+ >,
         proto::when<
             proto::terminal<event_tag>,
             proto::_
- >,
+ >,
         proto::when<
- proto::terminal<proto::_>,
- get_fct<proto::_ >()
- >
+ proto::terminal<fsm_artefact_tag>,
+ get_fct<proto::_ >()
+ >,
+ proto::when<
+ proto::terminal<proto::_>,
+ proto::_child
+ >
>
 {};
 struct BuildActions


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk