Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76293 - in branches/release/boost/msm: . back front front/detail front/euml mpl_graph
From: christophe.j.henry_at_[hidden]
Date: 2012-01-03 15:58:21


Author: chenry
Date: 2012-01-03 15:58:19 EST (Tue, 03 Jan 2012)
New Revision: 76293
URL: http://svn.boost.org/trac/boost/changeset/76293

Log:
merged rev. 75641,75859 (bugfixes: incorrect setting of current state at start(), continued processing after deferring)
Properties modified:
   branches/release/boost/msm/ (props changed)
   branches/release/boost/msm/active_state_switching_policies.hpp (props changed)
   branches/release/boost/msm/back/ (props changed)
   branches/release/boost/msm/back/args.hpp (props changed)
   branches/release/boost/msm/back/bind_helpers.hpp (props changed)
   branches/release/boost/msm/back/common_types.hpp (props changed)
   branches/release/boost/msm/back/copy_policies.hpp (props changed)
   branches/release/boost/msm/back/default_compile_policy.hpp (props changed)
   branches/release/boost/msm/back/dispatch_table.hpp (contents, props changed)
   branches/release/boost/msm/back/favor_compile_time.hpp (contents, props changed)
   branches/release/boost/msm/back/fold_to_list.hpp (props changed)
   branches/release/boost/msm/back/history_policies.hpp (props changed)
   branches/release/boost/msm/back/metafunctions.hpp (props changed)
   branches/release/boost/msm/back/mpl_graph_fsm_check.hpp (props changed)
   branches/release/boost/msm/back/no_fsm_check.hpp (props changed)
   branches/release/boost/msm/back/queue_container_circular.hpp (props changed)
   branches/release/boost/msm/back/queue_container_deque.hpp (props changed)
   branches/release/boost/msm/back/state_machine.hpp (contents, props changed)
   branches/release/boost/msm/back/tools.hpp (props changed)
   branches/release/boost/msm/common.hpp (props changed)
   branches/release/boost/msm/front/ (props changed)
   branches/release/boost/msm/front/common_states.hpp (props changed)
   branches/release/boost/msm/front/completion_event.hpp (props changed)
   branches/release/boost/msm/front/detail/ (props changed)
   branches/release/boost/msm/front/detail/common_states.hpp (props changed)
   branches/release/boost/msm/front/detail/row2_helper.hpp (props changed)
   branches/release/boost/msm/front/euml/ (props changed)
   branches/release/boost/msm/front/euml/algorithm.hpp (props changed)
   branches/release/boost/msm/front/euml/common.hpp (props changed)
   branches/release/boost/msm/front/euml/container.hpp (props changed)
   branches/release/boost/msm/front/euml/euml.hpp (props changed)
   branches/release/boost/msm/front/euml/euml_typeof.hpp (props changed)
   branches/release/boost/msm/front/euml/guard_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/iteration.hpp (props changed)
   branches/release/boost/msm/front/euml/operator.hpp (props changed)
   branches/release/boost/msm/front/euml/phoenix_placeholders.hpp (props changed)
   branches/release/boost/msm/front/euml/querying.hpp (props changed)
   branches/release/boost/msm/front/euml/state_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/stl.hpp (props changed)
   branches/release/boost/msm/front/euml/stt_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/transformation.hpp (props changed)
   branches/release/boost/msm/front/functor_row.hpp (props changed)
   branches/release/boost/msm/front/internal_row.hpp (props changed)
   branches/release/boost/msm/front/row2.hpp (props changed)
   branches/release/boost/msm/front/state_machine_def.hpp (props changed)
   branches/release/boost/msm/front/states.hpp (props changed)
   branches/release/boost/msm/mpl_graph/ (props changed)
   branches/release/boost/msm/msm_grammar.hpp (props changed)
   branches/release/boost/msm/proto_config.hpp (props changed)
   branches/release/boost/msm/row_tags.hpp (props changed)
Text files modified:
   branches/release/boost/msm/back/dispatch_table.hpp | 2 +-
   branches/release/boost/msm/back/favor_compile_time.hpp | 2 +-
   branches/release/boost/msm/back/state_machine.hpp | 6 ++++++
   3 files changed, 8 insertions(+), 2 deletions(-)

Modified: branches/release/boost/msm/back/dispatch_table.hpp
==============================================================================
--- branches/release/boost/msm/back/dispatch_table.hpp (original)
+++ branches/release/boost/msm/back/dispatch_table.hpp 2012-01-03 15:58:19 EST (Tue, 03 Jan 2012)
@@ -70,7 +70,7 @@
                  // try the first guard
                  typedef typename ::boost::mpl::front<Sequence>::type first_row;
                  HandledEnum res = first_row::execute(fsm,region_index,state,evt);
- if (HANDLED_TRUE!=res)
+ if (HANDLED_TRUE!=res && HANDLED_DEFERRED!=res)
                  {
                     // if the first rejected, move on to the next one
                     HandledEnum sub_res =

Modified: branches/release/boost/msm/back/favor_compile_time.hpp
==============================================================================
--- branches/release/boost/msm/back/favor_compile_time.hpp (original)
+++ branches/release/boost/msm/back/favor_compile_time.hpp 2012-01-03 15:58:19 EST (Tue, 03 Jan 2012)
@@ -93,7 +93,7 @@
         {
             HandledEnum res = HANDLED_FALSE;
             typename std::deque<cell>::const_iterator it = one_state.begin();
- while (it != one_state.end() && res != HANDLED_TRUE)
+ while (it != one_state.end() && (res != HANDLED_TRUE && res != HANDLED_DEFERRED ))
             {
                 HandledEnum handled = (*it)(fsm,region,state,evt);
                 // reject is considered as erasing an error (HANDLED_FALSE)

Modified: branches/release/boost/msm/back/state_machine.hpp
==============================================================================
--- branches/release/boost/msm/back/state_machine.hpp (original)
+++ branches/release/boost/msm/back/state_machine.hpp 2012-01-03 15:58:19 EST (Tue, 03 Jan 2012)
@@ -1191,6 +1191,9 @@
     // start the state machine (calls entry of the initial state)
     void start()
     {
+ // reinitialize our list of currently active states with the ones defined in Derived::initial_state
+ ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap<mpl::placeholders::_1> >
+ (init_states(m_states));
         // call on_entry on this SM
         (static_cast<Derived*>(this))->on_entry(fsm_initial_event(),*this);
         ::boost::mpl::for_each<initial_states, boost::msm::wrap<mpl::placeholders::_1> >
@@ -1204,6 +1207,9 @@
     template <class Event>
     void start(Event const& incomingEvent)
     {
+ // reinitialize our list of currently active states with the ones defined in Derived::initial_state
+ ::boost::mpl::for_each< seq_initial_states, ::boost::msm::wrap<mpl::placeholders::_1> >
+ (init_states(m_states));
         // call on_entry on this SM
         (static_cast<Derived*>(this))->on_entry(incomingEvent,*this);
         ::boost::mpl::for_each<initial_states, boost::msm::wrap<mpl::placeholders::_1> >


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