|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59586 - sandbox/msm/boost/msm/front
From: christophe.j.henry_at_[hidden]
Date: 2010-02-08 15:46:55
Author: chenry
Date: 2010-02-08 15:46:54 EST (Mon, 08 Feb 2010)
New Revision: 59586
URL: http://svn.boost.org/trac/boost/changeset/59586
Log:
more internal rows
Text files modified:
sandbox/msm/boost/msm/front/functor_row.hpp | 21 ++++++++++++++++++++-
sandbox/msm/boost/msm/front/internal_row.hpp | 10 +++++++++-
sandbox/msm/boost/msm/front/state_machine_def.hpp | 13 ++++++++++++-
3 files changed, 41 insertions(+), 3 deletions(-)
Modified: sandbox/msm/boost/msm/front/functor_row.hpp
==============================================================================
--- sandbox/msm/boost/msm/front/functor_row.hpp (original)
+++ sandbox/msm/boost/msm/front/functor_row.hpp 2010-02-08 15:46:54 EST (Mon, 08 Feb 2010)
@@ -151,6 +151,17 @@
return Guard()(evt,fsm,src,tgt);
}
};
+ template<class SOURCE,class EVENT>
+ struct Row<SOURCE,EVENT,none,none,none>
+ {
+ typedef SOURCE Source;
+ typedef EVENT Evt;
+ typedef Source Target;
+ typedef none Action;
+ typedef none Guard;
+ // no action, no guard
+ typedef _irow_tag row_type_tag;
+ };
template<class TGT>
struct get_row_target
{
@@ -209,7 +220,15 @@
return Guard()(evt,fsm,src,tgt);
}
};
-
+ template<class EVENT>
+ struct Internal<EVENT,none,none>
+ {
+ typedef EVENT Evt;
+ typedef none Action;
+ typedef none Guard;
+ // no action, no guard
+ typedef sm__i_row_tag row_type_tag;
+ };
struct state_tag{};
struct event_tag{};
struct action_tag{};
Modified: sandbox/msm/boost/msm/front/internal_row.hpp
==============================================================================
--- sandbox/msm/boost/msm/front/internal_row.hpp (original)
+++ sandbox/msm/boost/msm/front/internal_row.hpp 2010-02-08 15:46:54 EST (Mon, 08 Feb 2010)
@@ -88,7 +88,15 @@
::boost::mpl::bool_< ::boost::is_base_of<CalledForGuard,FSM>::type::value>());
}
};
-
+ template<
+ class Event
+ , typename CalledForGuard
+ >
+ struct _internal
+ {
+ typedef sm__i_row_tag row_type_tag;
+ typedef Event Evt;
+ };
}}}
#endif //BOOST_MSM_INTERNAL_ROW_HPP
Modified: sandbox/msm/boost/msm/front/state_machine_def.hpp
==============================================================================
--- sandbox/msm/boost/msm/front/state_machine_def.hpp (original)
+++ sandbox/msm/boost/msm/front/state_machine_def.hpp 2010-02-08 15:46:54 EST (Mon, 08 Feb 2010)
@@ -174,7 +174,18 @@
return (fsm.*guard)(evt);
}
};
-
+ // internal row withou action or guard. Does nothing except forcing the event to be ignored.
+ template<
+ typename T1
+ , class Event
+ >
+ struct _irow
+ {
+ typedef _irow_tag row_type_tag;
+ typedef T1 Source;
+ typedef T1 Target;
+ typedef Event Evt;
+ };
protected:
// Default no-transition handler. Can be replaced in the Derived SM class.
template <class FSM,class Event>
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