Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72697 - trunk/boost/msm/front/euml
From: christophe.j.henry_at_[hidden]
Date: 2011-06-20 15:19:24


Author: chenry
Date: 2011-06-20 15:19:23 EDT (Mon, 20 Jun 2011)
New Revision: 72697
URL: http://svn.boost.org/trac/boost/changeset/72697

Log:
- process_(event_) now allowed
- added reprocess_
Text files modified:
   trunk/boost/msm/front/euml/common.hpp | 202 ++++++++++++++++++++++++++++++++++++++++
   1 files changed, 202 insertions(+), 0 deletions(-)

Modified: trunk/boost/msm/front/euml/common.hpp
==============================================================================
--- trunk/boost/msm/front/euml/common.hpp (original)
+++ trunk/boost/msm/front/euml/common.hpp 2011-06-20 15:19:23 EDT (Mon, 20 Jun 2011)
@@ -1334,6 +1334,37 @@
         (Param3()(evt,fsm,state)).process_event(ToProcessEvt());
     }
 };
+
+//version for process_(event_)
+template <>
+struct Process_ <GetEvent_<void>,void,void,void,void>
+ : euml_action<Process_<GetEvent_<void>, void, void, void, void > >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& )const
+ {
+ fsm.process_event(evt);
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& )const
+ {
+ fsm.process_event(evt);
+ }
+};
+
 struct process_tag {};
 struct Process_Helper: proto::extends< proto::terminal<process_tag>::type, Process_Helper, sm_domain>
 {
@@ -1351,6 +1382,177 @@
 };
 Process_Helper const process_ = Process_Helper();
 
+template <class Param1, class Param2, class Param3, class Param4>
+struct Reprocess_ : euml_action<Reprocess_<Param1, Param2, Param3, Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Param1()(evt,fsm,src,tgt)).process_event(evt);
+ (Param2()(evt,fsm,src,tgt)).process_event(evt);
+ (Param3()(evt,fsm,src,tgt)).process_event(evt);
+ (Param4()(evt,fsm,src,tgt)).process_event(evt);
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(evt);
+ (Param2()(evt,fsm,state)).process_event(evt);
+ (Param3()(evt,fsm,state)).process_event(evt);
+ (Param4()(evt,fsm,state)).process_event(evt);
+ }
+};
+template <>
+struct Reprocess_ <void,void,void,void>
+ : euml_action<Reprocess_<void, void, void, void > >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& )const
+ {
+ fsm.process_event(evt);
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& )const
+ {
+ fsm.process_event(evt);
+ }
+};
+
+template <class Param1>
+struct Reprocess_ <Param1,void,void,void>
+ : euml_action<Reprocess_<Param1, void, void, void> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Param1()(evt,fsm,src,tgt)).process_event(evt);
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(evt);
+ }
+};
+
+template <class Param1, class Param2>
+struct Reprocess_ <Param1,Param2,void,void>
+ : euml_action<Reprocess_<Param1, Param2, void, void> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Param1()(evt,fsm,src,tgt)).process_event(evt);
+ (Param2()(evt,fsm,src,tgt)).process_event(evt);
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(evt);
+ (Param2()(evt,fsm,state)).process_event(evt);
+ }
+};
+
+template <class Param1, class Param2, class Param3>
+struct Reprocess_ <Param1,Param2,Param3,void>
+ : euml_action<Reprocess_<Param1, Param2, Param3, void> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Param1()(evt,fsm,src,tgt)).process_event(evt);
+ (Param2()(evt,fsm,src,tgt)).process_event(evt);
+ (Param3()(evt,fsm,src,tgt)).process_event(evt);
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(evt);
+ (Param2()(evt,fsm,state)).process_event(evt);
+ (Param3()(evt,fsm,state)).process_event(evt);
+ }
+};
+struct reprocess_tag {};
+struct Reprocess_Helper: proto::extends< proto::terminal<reprocess_tag>::type, Reprocess_Helper, sm_domain>
+{
+ Reprocess_Helper(){}
+ using proto::extends< proto::terminal<reprocess_tag>::type, Reprocess_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Reprocess_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+Reprocess_Helper const reprocess_ = Reprocess_Helper();
+
 template <class ToProcessEvt,class Value,class Param1, class Param2, class Param3>
 struct Process2_ : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, Param3> >
 {


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