Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67790 - in branches/release/boost/msm: . back front front/euml mpl_graph mpl_graph/detail
From: christophe.j.henry_at_[hidden]
Date: 2011-01-08 12:39:07


Author: chenry
Date: 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
New Revision: 67790
URL: http://svn.boost.org/trac/boost/changeset/67790

Log:
merged revisions 66490-67658
Added:
   branches/release/boost/msm/back/mpl_graph_fsm_check.hpp
      - copied, changed from r66605, /trunk/boost/msm/back/mpl_graph_fsm_check.hpp
   branches/release/boost/msm/back/no_fsm_check.hpp
      - copied, changed from r66605, /trunk/boost/msm/back/no_fsm_check.hpp
   branches/release/boost/msm/back/queue_container_circular.hpp
      - copied unchanged from r67385, /trunk/boost/msm/back/queue_container_circular.hpp
   branches/release/boost/msm/back/queue_container_deque.hpp
      - copied unchanged from r67385, /trunk/boost/msm/back/queue_container_deque.hpp
   branches/release/boost/msm/mpl_graph/
      - copied from r66605, /trunk/boost/msm/mpl_graph/
   branches/release/boost/msm/mpl_graph/adjacency_list_graph.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/adjacency_list_graph.hpp
   branches/release/boost/msm/mpl_graph/breadth_first_search.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/breadth_first_search.hpp
   branches/release/boost/msm/mpl_graph/depth_first_search.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/depth_first_search.hpp
   branches/release/boost/msm/mpl_graph/detail/
      - copied from r66605, /trunk/boost/msm/mpl_graph/detail/
   branches/release/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp
   branches/release/boost/msm/mpl_graph/detail/as_mpl_map.hpp
      - copied unchanged from r66605, /trunk/boost/msm/mpl_graph/detail/as_mpl_map.hpp
   branches/release/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp
   branches/release/boost/msm/mpl_graph/detail/incidence_list_graph.ipp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/detail/incidence_list_graph.ipp
   branches/release/boost/msm/mpl_graph/incidence_list_graph.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/incidence_list_graph.hpp
   branches/release/boost/msm/mpl_graph/mpl_graph.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/mpl_graph.hpp
   branches/release/boost/msm/mpl_graph/mpl_utils.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/mpl_utils.hpp
   branches/release/boost/msm/mpl_graph/search_colors.hpp
      - copied, changed from r66605, /trunk/boost/msm/mpl_graph/search_colors.hpp
Properties modified:
   branches/release/boost/msm/ (props changed)
Text files modified:
   branches/release/boost/msm/back/default_compile_policy.hpp | 1
   branches/release/boost/msm/back/favor_compile_time.hpp | 1
   branches/release/boost/msm/back/history_policies.hpp | 3
   branches/release/boost/msm/back/metafunctions.hpp | 202 +++++++++++++++++++++++++++
   branches/release/boost/msm/back/mpl_graph_fsm_check.hpp | 10 +
   branches/release/boost/msm/back/no_fsm_check.hpp | 4
   branches/release/boost/msm/back/state_machine.hpp | 296 ++++++++++++++++++++++++++++++++-------
   branches/release/boost/msm/front/euml/common.hpp | 2
   branches/release/boost/msm/front/euml/state_grammar.hpp | 1
   branches/release/boost/msm/front/functor_row.hpp | 39 ++++
   branches/release/boost/msm/front/internal_row.hpp | 7
   branches/release/boost/msm/front/row2.hpp | 13 +
   branches/release/boost/msm/front/state_machine_def.hpp | 13 +
   branches/release/boost/msm/mpl_graph/adjacency_list_graph.hpp | 8
   branches/release/boost/msm/mpl_graph/breadth_first_search.hpp | 10
   branches/release/boost/msm/mpl_graph/depth_first_search.hpp | 10
   branches/release/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp | 8
   branches/release/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp | 8
   branches/release/boost/msm/mpl_graph/detail/incidence_list_graph.ipp | 8
   branches/release/boost/msm/mpl_graph/incidence_list_graph.hpp | 8
   branches/release/boost/msm/mpl_graph/mpl_graph.hpp | 10
   branches/release/boost/msm/mpl_graph/mpl_utils.hpp | 8
   branches/release/boost/msm/mpl_graph/search_colors.hpp | 10
   23 files changed, 559 insertions(+), 121 deletions(-)

Modified: branches/release/boost/msm/back/default_compile_policy.hpp
==============================================================================
--- branches/release/boost/msm/back/default_compile_policy.hpp (original)
+++ branches/release/boost/msm/back/default_compile_policy.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -17,6 +17,7 @@
 {
 struct favor_runtime_speed
 {
+ typedef int compile_policy;
     typedef ::boost::mpl::true_ add_forwarding_rows;
 };
 

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 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -63,6 +63,7 @@
 
 struct favor_compile_time
 {
+ typedef int compile_policy;
     typedef ::boost::mpl::false_ add_forwarding_rows;
 };
 

Modified: branches/release/boost/msm/back/history_policies.hpp
==============================================================================
--- branches/release/boost/msm/back/history_policies.hpp (original)
+++ branches/release/boost/msm/back/history_policies.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -152,6 +152,7 @@
 
 struct NoHistory
 {
+ typedef int history_policy;
     template <int NumberOfRegions>
     struct apply
     {
@@ -160,6 +161,7 @@
 };
 struct AlwaysHistory
 {
+ typedef int history_policy;
     template <int NumberOfRegions>
     struct apply
     {
@@ -169,6 +171,7 @@
 template <class Events>
 struct ShallowHistory
 {
+ typedef int history_policy;
     template <int NumberOfRegions>
     struct apply
     {

Modified: branches/release/boost/msm/back/metafunctions.hpp
==============================================================================
--- branches/release/boost/msm/back/metafunctions.hpp (original)
+++ branches/release/boost/msm/back/metafunctions.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -38,10 +38,18 @@
 #include <boost/mpl/insert_range.hpp>
 #include <boost/mpl/front.hpp>
 #include <boost/mpl/logical.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/copy_if.hpp>
+#include <boost/mpl/back_inserter.hpp>
+#include <boost/mpl/transform.hpp>
 
 #include <boost/type_traits/is_same.hpp>
 #include <boost/utility/enable_if.hpp>
 
+// mpl_graph graph implementation and depth first search
+#include <boost/msm/mpl_graph/incidence_list_graph.hpp>
+#include <boost/msm/mpl_graph/depth_first_search.hpp>
+
 BOOST_MPL_HAS_XXX_TRAIT_DEF(explicit_creation)
 BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_entry)
 BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_exit)
@@ -58,6 +66,14 @@
 
 namespace boost { namespace msm { namespace back
 {
+template <typename Sequence, typename Range>
+struct set_insert_range
+{
+ typedef typename ::boost::mpl::fold<
+ Range,Sequence,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >
+ >::type type;
+};
 
 // returns the current state type of a transition
 template <class Transition>
@@ -168,6 +184,7 @@
 };
 
 // builds a mpl::vector of initial states
+//TODO remove duplicate from get_initial_states
 template <class region>
 struct get_regions_as_sequence
 {
@@ -314,7 +331,7 @@
         ::boost::mpl::bool_<true>, ::boost::mpl::bool_<false>
>::type type;
 };
-// says if a state is an exit pseudo state
+// says if a state is an entry pseudo state or an explicit entry
 template <class State>
 struct is_direct_entry
 {
@@ -374,7 +391,7 @@
         ::boost::mpl::if_<
                  ::boost::mpl::has_key<states, ::boost::mpl::placeholders::_2>,
                  ::boost::mpl::placeholders::_1,
- ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end<mpl::placeholders::_1>,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end< ::boost::mpl::placeholders::_1>,
                              not_a_row< get_wrapped_state< ::boost::mpl::placeholders::_2> > >
>
>::type with_init;
@@ -629,6 +646,187 @@
 {
     typedef typename StateType::initial_event type;
 };
+
+template <class TransitionTable, class InitState>
+struct build_one_orthogonal_region
+{
+ template<typename Row>
+ struct row_to_incidence :
+ ::boost::mpl::vector<
+ ::boost::mpl::pair<
+ typename Row::next_state_type,
+ typename Row::transition_event>,
+ typename Row::current_state_type,
+ typename Row::next_state_type
+ > {};
+
+ template <class Seq, class Elt>
+ struct transition_incidence_list_helper
+ {
+ typedef typename ::boost::mpl::push_back< Seq, row_to_incidence< Elt > >::type type;
+ };
+
+ typedef typename ::boost::mpl::fold<
+ TransitionTable,
+ ::boost::mpl::vector<>,
+ transition_incidence_list_helper< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>
+ >::type transition_incidence_list;
+
+ typedef ::boost::msm::mpl_graph::incidence_list_graph<transition_incidence_list>
+ transition_graph;
+
+ struct preordering_dfs_visitor :
+ ::boost::msm::mpl_graph::dfs_default_visitor_operations
+ {
+ template<typename Node, typename Graph, typename State>
+ struct discover_vertex :
+ ::boost::mpl::insert<State, Node>
+ {};
+ };
+
+ typedef typename mpl::first<
+ typename ::boost::msm::mpl_graph::depth_first_search<
+ transition_graph,
+ preordering_dfs_visitor,
+ ::boost::mpl::set<>,
+ InitState
+ >::type
+ >::type type;
+};
+
+template <class Fsm>
+struct find_entry_states
+{
+ typedef typename ::boost::mpl::copy<
+ typename Fsm::substate_list,
+ ::boost::mpl::inserter<
+ ::boost::mpl::set0<>,
+ ::boost::mpl::if_<
+ has_explicit_entry_state< ::boost::mpl::placeholders::_2 >,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>,
+ ::boost::mpl::placeholders::_1
+ >
+ >
+ >::type type;
+};
+
+template <class Set1, class Set2>
+struct is_common_element
+{
+ typedef typename ::boost::mpl::fold<
+ Set1, ::boost::mpl::false_,
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key<
+ Set2,
+ ::boost::mpl::placeholders::_2
+ >,
+ ::boost::mpl::true_,
+ ::boost::mpl::placeholders::_1
+ >
+ >::type type;
+};
+
+template <class EntryRegion, class AllRegions>
+struct add_entry_region
+{
+ typedef typename ::boost::mpl::transform<
+ AllRegions,
+ ::boost::mpl::if_<
+ is_common_element<EntryRegion, ::boost::mpl::placeholders::_1>,
+ set_insert_range< ::boost::mpl::placeholders::_1, EntryRegion>,
+ ::boost::mpl::placeholders::_1
+ >
+ >::type type;
+};
+
+// build a vector of regions states (as a set)
+// one set of states for every region
+template <class Fsm, class InitStates>
+struct build_orthogonal_regions
+{
+ typedef typename
+ ::boost::mpl::fold<
+ InitStates, ::boost::mpl::vector0<>,
+ ::boost::mpl::push_back<
+ ::boost::mpl::placeholders::_1,
+ build_one_orthogonal_region< typename Fsm::stt, ::boost::mpl::placeholders::_2 > >
+ >::type without_entries;
+
+ typedef typename
+ ::boost::mpl::fold<
+ typename find_entry_states<Fsm>::type, ::boost::mpl::vector0<>,
+ ::boost::mpl::push_back<
+ ::boost::mpl::placeholders::_1,
+ build_one_orthogonal_region< typename Fsm::stt, ::boost::mpl::placeholders::_2 > >
+ >::type only_entries;
+
+ typedef typename ::boost::mpl::fold<
+ only_entries , without_entries,
+ add_entry_region< ::boost::mpl::placeholders::_2, ::boost::mpl::placeholders::_1>
+ >::type type;
+};
+
+template <class GraphAsSeqOfSets, class StateType>
+struct find_region_index
+{
+ typedef typename
+ ::boost::mpl::fold<
+ GraphAsSeqOfSets, ::boost::mpl::pair< ::boost::mpl::int_< -1 > /*res*/, ::boost::mpl::int_<0> /*counter*/ >,
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key< ::boost::mpl::placeholders::_2, StateType >,
+ ::boost::mpl::pair<
+ ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
+ ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > >
+ >,
+ ::boost::mpl::pair<
+ ::boost::mpl::first< ::boost::mpl::placeholders::_1 >,
+ ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > >
+ >
+ >
+ >::type result_pair;
+ typedef typename ::boost::mpl::first<result_pair>::type type;
+ enum {value = type::value};
+};
+
+template <class Fsm>
+struct check_regions_orthogonality
+{
+ typedef typename build_orthogonal_regions< Fsm,typename Fsm::initial_states>::type regions;
+
+ typedef typename ::boost::mpl::fold<
+ regions, ::boost::mpl::int_<0>,
+ ::boost::mpl::plus< ::boost::mpl::placeholders::_1 , ::boost::mpl::size< ::boost::mpl::placeholders::_2> >
+ >::type number_of_states_in_regions;
+
+ typedef typename ::boost::mpl::fold<
+ regions,mpl::set0<>,
+ set_insert_range<
+ ::boost::mpl::placeholders::_1,
+ ::boost::mpl::placeholders::_2 >
+ >::type one_big_states_set;
+
+ enum {states_in_regions_raw = number_of_states_in_regions::value};
+ enum {cumulated_states_in_regions_raw = ::boost::mpl::size<one_big_states_set>::value};
+};
+
+template <class Fsm>
+struct check_no_unreachable_state
+{
+ typedef typename check_regions_orthogonality<Fsm>::one_big_states_set states_in_regions;
+
+ typedef typename set_insert_range<
+ states_in_regions,
+ typename ::boost::mpl::eval_if<
+ typename has_explicit_creation<Fsm>::type,
+ get_explicit_creation<Fsm>,
+ ::boost::mpl::vector0<>
+ >::type
+ >::type with_explicit_creation;
+
+ enum {states_in_fsm = ::boost::mpl::size< typename Fsm::substate_list >::value};
+ enum {cumulated_states_in_regions = ::boost::mpl::size< with_explicit_creation >::value};
+};
+
 // helper to find out if a SM has an active exit state and is therefore waiting for exiting
 template <class StateType,class OwnerFct,class FSM>
 inline

Copied: branches/release/boost/msm/back/mpl_graph_fsm_check.hpp (from r66605, /trunk/boost/msm/back/mpl_graph_fsm_check.hpp)
==============================================================================
--- /trunk/boost/msm/back/mpl_graph_fsm_check.hpp (original)
+++ branches/release/boost/msm/back/mpl_graph_fsm_check.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -30,6 +30,16 @@
                                        ::boost::msm::back::check_regions_orthogonality<Fsm>::cumulated_states_in_regions_raw );
 
         }
+ // checks that all states are reachable or created using the explicit_creation typedef
+ // using the mpl_graph library (part of metagraph)
+ template <class Fsm>
+ static void check_unreachable_states()
+ {
+ BOOST_MPL_ASSERT_RELATION( ::boost::msm::back::check_no_unreachable_state<Fsm>::states_in_fsm,
+ ==,
+ ::boost::msm::back::check_no_unreachable_state<Fsm>::cumulated_states_in_regions );
+
+ }
     };
 
 } } }//boost::msm::back

Copied: branches/release/boost/msm/back/no_fsm_check.hpp (from r66605, /trunk/boost/msm/back/no_fsm_check.hpp)
==============================================================================
--- /trunk/boost/msm/back/no_fsm_check.hpp (original)
+++ branches/release/boost/msm/back/no_fsm_check.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -25,6 +25,10 @@
         static void check_orthogonality()
         {
         }
+ template <class Fsm>
+ static void check_unreachable_states()
+ {
+ }
     };
 
 } } }//boost::msm::back

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 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -13,7 +13,6 @@
 
 #include <exception>
 #include <vector>
-#include <queue>
 #include <functional>
 #include <numeric>
 #include <utility>
@@ -22,6 +21,7 @@
 
 #include <boost/mpl/contains.hpp>
 #include <boost/mpl/deref.hpp>
+#include <boost/mpl/assert.hpp>
 
 #include <boost/fusion/container/vector/convert.hpp>
 #include <boost/fusion/include/as_vector.hpp>
@@ -50,6 +50,8 @@
 
 #include <boost/serialization/base_object.hpp>
 
+#include <boost/parameter.hpp>
+
 #include <boost/msm/row_tags.hpp>
 #include <boost/msm/back/fold_to_list.hpp>
 #include <boost/msm/back/metafunctions.hpp>
@@ -59,6 +61,8 @@
 #include <boost/msm/back/args.hpp>
 #include <boost/msm/back/default_compile_policy.hpp>
 #include <boost/msm/back/dispatch_table.hpp>
+#include <boost/msm/back/no_fsm_check.hpp>
+#include <boost/msm/back/queue_container_deque.hpp>
 
 BOOST_MPL_HAS_XXX_TRAIT_DEF(accept_sig)
 BOOST_MPL_HAS_XXX_TRAIT_DEF(no_automatic_create)
@@ -66,6 +70,10 @@
 BOOST_MPL_HAS_XXX_TRAIT_DEF(direct_entry)
 BOOST_MPL_HAS_XXX_TRAIT_DEF(initial_event)
 BOOST_MPL_HAS_XXX_TRAIT_DEF(do_serialize)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(history_policy)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(fsm_check)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(compile_policy)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(queue_container_policy)
 
 #ifndef BOOST_MSM_CONSTRUCTOR_ARG_SIZE
 #define BOOST_MSM_CONSTRUCTOR_ARG_SIZE 5 // default max number of arguments for constructors
@@ -89,26 +97,87 @@
 const boost::msm::back::dispatch_table<Fsm,Stt, Event,CompilePolicy>
 dispatch_table<Fsm,Stt, Event,CompilePolicy>::instance;
 
+BOOST_PARAMETER_TEMPLATE_KEYWORD(front_end)
+BOOST_PARAMETER_TEMPLATE_KEYWORD(history_policy)
+BOOST_PARAMETER_TEMPLATE_KEYWORD(compile_policy)
+BOOST_PARAMETER_TEMPLATE_KEYWORD(fsm_check_policy)
+BOOST_PARAMETER_TEMPLATE_KEYWORD(queue_container_policy)
+
+typedef ::boost::parameter::parameters<
+ ::boost::parameter::required< ::boost::msm::back::tag::front_end >
+ , ::boost::parameter::optional<
+ ::boost::parameter::deduced< ::boost::msm::back::tag::history_policy>, has_history_policy< ::boost::mpl::_ >
+ >
+ , ::boost::parameter::optional<
+ ::boost::parameter::deduced< ::boost::msm::back::tag::compile_policy>, has_compile_policy< ::boost::mpl::_ >
+ >
+ , ::boost::parameter::optional<
+ ::boost::parameter::deduced< ::boost::msm::back::tag::fsm_check_policy>, has_fsm_check< ::boost::mpl::_ >
+ >
+ , ::boost::parameter::optional<
+ ::boost::parameter::deduced< ::boost::msm::back::tag::queue_container_policy>,
+ has_queue_container_policy< ::boost::mpl::_ >
+ >
+> state_machine_signature;
+
+
 
 // library-containing class for state machines. Pass the actual FSM class as
 // the Concrete parameter.
-template<class Derived,class HistoryPolicy=NoHistory,class CompilePolicy=favor_runtime_speed>
-class state_machine : public Derived
+// A0=Derived,A1=NoHistory,A2=CompilePolicy,A3=FsmCheckPolicy >
+template <
+ class A0
+ , class A1 = parameter::void_
+ , class A2 = parameter::void_
+ , class A3 = parameter::void_
+ , class A4 = parameter::void_
+>
+class state_machine : //public Derived
+ public ::boost::parameter::binding<
+ typename state_machine_signature::bind<A0,A1,A2,A3,A4>::type, ::boost::msm::back::tag::front_end
+ >::type
 {
+public:
+ // Create ArgumentPack
+ typedef typename
+ state_machine_signature::bind<A0,A1,A2,A3,A4>::type
+ state_machine_args;
+
+ // Extract first logical parameter.
+ typedef typename ::boost::parameter::binding<
+ state_machine_args, ::boost::msm::back::tag::front_end>::type Derived;
+
+ typedef typename ::boost::parameter::binding<
+ state_machine_args, ::boost::msm::back::tag::history_policy, NoHistory >::type HistoryPolicy;
+
+ typedef typename ::boost::parameter::binding<
+ state_machine_args, ::boost::msm::back::tag::compile_policy, favor_runtime_speed >::type CompilePolicy;
+
+ typedef typename ::boost::parameter::binding<
+ state_machine_args, ::boost::msm::back::tag::fsm_check_policy, no_fsm_check >::type FsmCheckPolicy;
+
+ typedef typename ::boost::parameter::binding<
+ state_machine_args, ::boost::msm::back::tag::queue_container_policy,
+ queue_container_deque >::type QueueContainerPolicy;
+
 private:
- typedef boost::msm::back::state_machine<Derived,
- HistoryPolicy,CompilePolicy> library_sm;
+
+ typedef boost::msm::back::state_machine<
+ A0,A1,A2,A3,A4> library_sm;
 
     typedef ::boost::function<
         execute_return ()> transition_fct;
     typedef ::boost::function<
         execute_return () > deferred_fct;
- typedef std::deque<deferred_fct > deferred_events_queue_t;
- typedef std::queue<transition_fct > events_queue_t;
- typedef bool (*flag_handler)(library_sm&);
+ typedef typename QueueContainerPolicy::
+ template In<deferred_fct>::type deferred_events_queue_t;
+ typedef typename QueueContainerPolicy::
+ template In<transition_fct>::type events_queue_t;
+
+ typedef bool (*flag_handler)(library_sm const&);
 
     // all state machines are friend with each other to allow embedding any of them in another fsm
- template <class ,class , class
+ template <class ,class , class, class, class
> friend class boost::msm::back::state_machine;
 
     // helper to add, if needed, visitors to all states
@@ -168,14 +237,14 @@
         visitors m_state_visitors;
     };
 
- template <class StateType,class Enable=void>
+ template <class StateType,class Enable=int>
     struct deferred_msg_queue_helper
     {
     };
     template <class StateType>
     struct deferred_msg_queue_helper<StateType,
         typename ::boost::enable_if<
- typename ::boost::msm::back::has_fsm_deferred_events<StateType>::type >::type>
+ typename ::boost::msm::back::has_fsm_deferred_events<StateType>::type,int >::type>
     {
     public:
         deferred_msg_queue_helper():m_deferred_events_queue(){}
@@ -351,7 +420,7 @@
                 (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),evt,fsm);
 
             // then call the action method
- ROW::action_call(fsm,evt,
+ HandledEnum res = ROW::action_call(fsm,evt,
                              ::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),
                              ::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),
                              fsm.m_substate_list);
@@ -360,7 +429,7 @@
             convert_event_and_execute_entry<next_state_type,T2>
                 (::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),evt,fsm);
             fsm.m_states[region_index]=next_state;
- return HANDLED_TRUE;
+ return res;
         }
     };
 
@@ -483,7 +552,7 @@
                 (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),evt,fsm);
 
             // then call the action method
- ROW::action_call(fsm,evt,
+ HandledEnum res = ROW::action_call(fsm,evt,
                             ::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),
                             ::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),
                             fsm.m_substate_list);
@@ -493,7 +562,7 @@
                 (::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),evt,fsm);
 
             fsm.m_states[region_index]=next_state;
- return HANDLED_TRUE;
+ return res;
         }
     };
 
@@ -587,11 +656,11 @@
             }
 
             // call the action method
- ROW::action_call(fsm,evt,
+ HandledEnum res = ROW::action_call(fsm,evt,
                              ::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),
                              ::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),
                              fsm.m_substate_list);
- return HANDLED_TRUE;
+ return res;
         }
     };
 
@@ -645,18 +714,18 @@
         typedef T2 next_state_type;
 
         // Take the transition action and return the next state.
- static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt)
+ static HandledEnum execute(library_sm& fsm, int , int state, transition_event const& evt)
         {
             BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
             BOOST_ASSERT(state == (current_state));
 
             // call the action method
- ROW::action_call(fsm,evt,
+ HandledEnum res = ROW::action_call(fsm,evt,
                             ::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),
                             ::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),
                             fsm.m_substate_list);
 
- return HANDLED_TRUE;
+ return res;
         }
     };
     // row simply ignoring the event
@@ -701,7 +770,7 @@
             return false;
         }
         // Take the transition action and return the next state.
- static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt)
+ static HandledEnum execute(library_sm& fsm, int , int state, transition_event const& evt)
         {
             if (!check_guard(fsm,evt))
             {
@@ -710,11 +779,11 @@
             }
 
             // then call the action method
- ROW::action_call(fsm,evt,
+ HandledEnum res = ROW::action_call(fsm,evt,
                 ::boost::fusion::at_key<StateType>(fsm.m_substate_list),
                 ::boost::fusion::at_key<StateType>(fsm.m_substate_list),
                 fsm.m_substate_list);
- return HANDLED_TRUE;
+ return res;
         }
     };
     template<
@@ -728,14 +797,14 @@
         typedef typename ROW::Evt transition_event;
 
         // Take the transition action and return the next state.
- static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt)
+ static HandledEnum execute(library_sm& fsm, int, int, transition_event const& evt)
         {
             // then call the action method
- ROW::action_call(fsm,evt,
+ HandledEnum res = ROW::action_call(fsm,evt,
                 ::boost::fusion::at_key<StateType>(fsm.m_substate_list),
                 ::boost::fusion::at_key<StateType>(fsm.m_substate_list),
                 fsm.m_substate_list);
- return HANDLED_TRUE;
+ return res;
         }
     };
     template<
@@ -759,7 +828,7 @@
             return false;
         }
         // Take the transition action and return the next state.
- static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt)
+ static HandledEnum execute(library_sm& fsm, int, int, transition_event const& evt)
         {
             if (!check_guard(fsm,evt))
             {
@@ -1001,7 +1070,7 @@
                 ret_handled = HANDLED_TRUE;
             }
 
- // process completion transitions BEFORE any other event in the pool (UML Standard 2.3 §15.3.14)
+ // process completion transitions BEFORE any other event in the pool (UML Standard 2.3 §15.3.14)
             handle_eventless_transitions_helper<library_sm> eventless_helper(this,(handled == HANDLED_TRUE));
             eventless_helper.process_completion_event();
 
@@ -1016,6 +1085,73 @@
         }
     }
 
+ template <class EventType>
+ void enqueue_event_helper(EventType const& evt, ::boost::mpl::false_ const &)
+ {
+ execute_return (library_sm::*pf) (EventType const& evt) =
+ &library_sm::process_event;
+
+ transition_fct f = ::boost::bind(pf,this,evt);
+ m_events_queue.m_events_queue.push_back(f);
+ }
+ template <class EventType>
+ void enqueue_event_helper(EventType const& evt, ::boost::mpl::true_ const &)
+ {
+ // no queue
+ }
+
+ void execute_queued_events_helper(::boost::mpl::false_ const &)
+ {
+ transition_fct to_call = m_events_queue.m_events_queue.front();
+ m_events_queue.m_events_queue.pop_front();
+ to_call();
+ }
+ void execute_queued_events_helper(::boost::mpl::true_ const &)
+ {
+ // no queue required
+ }
+
+ // enqueues an event in the message queue
+ // call execute_queued_events to process all queued events.
+ // Be careful if you do this during event processing, the event will be processed immediately
+ // and not kept in the queue
+ template <class EventType>
+ void enqueue_event(EventType const& evt)
+ {
+ enqueue_event_helper<EventType>(evt, typename is_no_message_queue<library_sm>::type());
+ }
+
+ // empty the queue and process events
+ void execute_queued_events()
+ {
+ execute_queued_events_helper(typename is_no_message_queue<library_sm>::type());
+ }
+
+ typename events_queue_t::size_type get_message_queue_size() const
+ {
+ return m_events_queue.m_events_queue.size();
+ }
+
+ events_queue_t& get_message_queue()
+ {
+ return m_events_queue.m_events_queue;
+ }
+
+ const events_queue_t& get_message_queue() const
+ {
+ return m_events_queue.m_events_queue;
+ }
+
+ deferred_events_queue_t& get_deferred_queue()
+ {
+ return m_deferred_events_queue;
+ }
+
+ const deferred_events_queue_t& get_deferred_queue() const
+ {
+ return m_deferred_events_queue;
+ }
+
     // Getter that returns the current state of the FSM
     const int* current_state() const
     {
@@ -1092,11 +1228,18 @@
     // return the state whose id is passed or 0 if not found
     // caution if you need this, you probably need polymorphic states
     // complexity: O(number of states)
- const BaseState* get_state_by_id(int id) const
+ BaseState* get_state_by_id(int id)
     {
         const BaseState* result_state=0;
         ::boost::mpl::for_each<state_list,
             ::boost::msm::wrap< ::boost::mpl::placeholders::_1> > (get_state_id_helper(id,&result_state,this));
+ return const_cast<BaseState*>(result_state);
+ }
+ const BaseState* get_state_by_id(int id) const
+ {
+ const BaseState* result_state=0;
+ ::boost::mpl::for_each<state_list,
+ ::boost::msm::wrap< ::boost::mpl::placeholders::_1> > (get_state_id_helper(id,&result_state,this));
         return result_state;
     }
     // true if the sm is used in another sm
@@ -1104,6 +1247,15 @@
     {
         return m_is_included;
     }
+ // get the history policy class
+ concrete_history& get_history()
+ {
+ return m_history;
+ }
+ concrete_history const& get_history() const
+ {
+ return m_history;
+ }
     // get a state
     // as a pointer
     template <class State>
@@ -1123,7 +1275,7 @@
 
     // checks if a flag is active using the BinaryOp as folding function
     template <class Flag,class BinaryOp>
- bool is_flag_active()
+ bool is_flag_active() const
     {
         flag_handler* flags_entries = get_entries_for_flag<Flag>();
 
@@ -1134,11 +1286,11 @@
                     ::boost::bind(::boost::msm::back::deref<flag_handler>(),
                         ::boost::bind(::boost::msm::back::plus2<flag_handler*,int>(),
                         flags_entries, _2)),
- ::boost::ref(*this)), _1));
+ ::boost::cref(*this)), _1));
     }
     // checks if a flag is active using no binary op if 1 region, or OR if > 1 regions
     template <class Flag>
- bool is_flag_active()
+ bool is_flag_active() const
     {
         return FlagHelper<Flag,(nr_regions::value>1)>::helper(*this,get_entries_for_flag<Flag>());
     }
@@ -1213,7 +1365,7 @@
      }
 
      // Construct with the default initial states
- state_machine<Derived,HistoryPolicy,CompilePolicy >()
+ state_machine<A0,A1,A2,A3,A4 >()
          :Derived()
          ,m_events_queue()
          ,m_deferred_events_queue()
@@ -1231,8 +1383,8 @@
          fill_states(this);
      }
      template <class Expr>
- state_machine<Derived,HistoryPolicy,CompilePolicy >
- (Expr const& expr,typename ::boost::enable_if<typename ::boost::proto::is_expr<Expr>::type >::type* dummy=0)
+ state_machine<A0,A1,A2,A3,A4 >
+ (Expr const& expr,typename ::boost::enable_if<typename ::boost::proto::is_expr<Expr>::type >::type* =0)
          :Derived()
          ,m_events_queue()
          ,m_deferred_events_queue()
@@ -1259,9 +1411,9 @@
 #define MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB(z, n, unused) ARG ## n t ## n
 #define MSM_CONSTRUCTOR_HELPER_EXECUTE(z, n, unused) \
         template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
- state_machine<Derived,HistoryPolicy,CompilePolicy \
+ state_machine<A0,A1,A2,A3,A4 \
>(BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ), \
- typename ::boost::disable_if<typename ::boost::proto::is_expr<ARG0>::type >::type* dummy=0 ) \
+ typename ::boost::disable_if<typename ::boost::proto::is_expr<ARG0>::type >::type* =0 ) \
         :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \
          ,m_events_queue() \
          ,m_deferred_events_queue() \
@@ -1277,9 +1429,9 @@
          fill_states(this); \
      } \
         template <class Expr,BOOST_PP_ENUM_PARAMS(n, class ARG)> \
- state_machine<Derived,HistoryPolicy,CompilePolicy \
+ state_machine<A0,A1,A2,A3,A4 \
>(Expr const& expr,BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ), \
- typename ::boost::enable_if<typename ::boost::proto::is_expr<Expr>::type >::type* dummy=0 ) \
+ typename ::boost::enable_if<typename ::boost::proto::is_expr<Expr>::type >::type* =0 ) \
         :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \
          ,m_events_queue() \
          ,m_deferred_events_queue() \
@@ -1318,7 +1470,7 @@
          }
         return *this;
      }
- state_machine<Derived,HistoryPolicy,CompilePolicy>
+ state_machine<A0,A1,A2,A3,A4>
          (library_sm const& rhs)
          : Derived(rhs)
      {
@@ -1369,7 +1521,7 @@
         {
             // event has to be put into the queue
             transition_fct f = ::boost::bind(pf,this,evt);
- m_events_queue.m_events_queue.push(f);
+ m_events_queue.m_events_queue.push_back(f);
             return false;
         }
         // event can be handled, processing
@@ -1407,7 +1559,7 @@
     }
     // handling of deferred events
     // if none is found in the SM, take the following empty main version
- template <class StateType, class Enable = void>
+ template <class StateType, class Enable = int>
     struct handle_defer_helper
     {
         handle_defer_helper(deferred_msg_queue_helper<library_sm>& ){}
@@ -1422,7 +1574,7 @@
     // otherwise the standard version handling the deferred events
     template <class StateType>
     struct handle_defer_helper
- <StateType, typename enable_if< typename ::boost::msm::back::has_fsm_deferred_events<StateType>::type >::type>
+ <StateType, typename enable_if< typename ::boost::msm::back::has_fsm_deferred_events<StateType>::type,int >::type>
     {
         handle_defer_helper(deferred_msg_queue_helper<library_sm>& a_queue):
             events_queue(a_queue),next_deferred_event(){}
@@ -1622,7 +1774,7 @@
     template <class Flag,bool orthogonalStates>
     struct FlagHelper
     {
- static bool helper(library_sm& sm,flag_handler* )
+ static bool helper(library_sm const& sm,flag_handler* )
         {
             // by default we use OR to accumulate the flags
             return sm.is_flag_active<Flag,Flag_OR>();
@@ -1631,7 +1783,7 @@
     template <class Flag>
     struct FlagHelper<Flag,false>
     {
- static bool helper(library_sm& sm,flag_handler* flags_entries)
+ static bool helper(library_sm const& sm,flag_handler* flags_entries)
         {
             // just one active state, so we can call operator[] with 0
             return flags_entries[sm.current_state()[0]](sm);
@@ -1642,15 +1794,15 @@
     template <class StateType,class Flag>
     struct FlagHandler
     {
- static bool flag_true(library_sm& )
+ static bool flag_true(library_sm const& )
         {
             return true;
         }
- static bool flag_false(library_sm& )
+ static bool flag_false(library_sm const& )
         {
             return false;
         }
- static bool forward(library_sm& fsm)
+ static bool forward(library_sm const& fsm)
         {
             return ::boost::fusion::at_key<StateType>(fsm.m_substate_list).template is_flag_active<Flag>();
         }
@@ -1708,7 +1860,7 @@
     };
     // maintains for every flag a static array containing the flag value for every state
     template <class Flag>
- flag_handler* get_entries_for_flag()
+ flag_handler* get_entries_for_flag() const
     {
         BOOST_STATIC_CONSTANT(int, max_state = (mpl::size<state_list>::value));
 
@@ -1882,7 +2034,7 @@
          }
          template <class StateType>
          typename ::boost::disable_if<typename has_accept_sig<StateType>::type,void >::type
- visitor_helper(int id) const
+ visitor_helper(int) const
          {
              // nothing to do
          }
@@ -1990,8 +2142,31 @@
      void start(Event const& incomingEvent)
      {
          region_start_helper< ::boost::mpl::int_<0> >::do_start(this,incomingEvent);
+ // give a chance to handle an anonymous (eventless) transition
+ handle_eventless_transitions_helper<library_sm> eventless_helper(this,true);
+ eventless_helper.process_completion_event();
      }
 
+ template <class StateType>
+ struct find_region_id
+ {
+ template <int region,int Dummy=0>
+ struct In
+ {
+ enum {region_index=region};
+ };
+ // if the user provides no region, find it!
+ template<int Dummy>
+ struct In<-1,Dummy>
+ {
+ typedef typename build_orthogonal_regions<
+ library_sm,
+ typename Derived::initial_state
+ >::type all_regions;
+ enum {region_index= find_region_index<all_regions,StateType>::value };
+ };
+ enum {region_index = In<StateType::zone_index>::region_index };
+ };
      // helper used to set the correct state as active state upon entry into a fsm
      struct direct_event_start_helper
      {
@@ -2020,10 +2195,10 @@
          {
              (static_cast<Derived*>(self))->on_entry(evt,fsm);
              int state_id = get_state_id<stt,typename EventType::active_state::wrapped_entry>::value;
- BOOST_STATIC_ASSERT(EventType::active_state::zone_index >= 0);
- BOOST_STATIC_ASSERT(EventType::active_state::zone_index <= nr_regions::value);
+ BOOST_STATIC_ASSERT(find_region_id<typename EventType::active_state::wrapped_entry>::region_index >= 0);
+ BOOST_STATIC_ASSERT(find_region_id<typename EventType::active_state::wrapped_entry>::region_index <= nr_regions::value);
              // just set the correct zone, the others will be default/history initialized
- self->m_states[EventType::active_state::zone_index] = state_id;
+ self->m_states[find_region_id<typename EventType::active_state::wrapped_entry>::region_index] = state_id;
              self->start(evt.m_event);
          }
 
@@ -2059,7 +2234,7 @@
              (static_cast<Derived*>(self))->on_entry(evt,fsm);
              int state_id = get_state_id<stt,typename EventType::active_state::wrapped_entry>::value;
              // given region starts with the entry pseudo state as active state
- self->m_states[EventType::active_state::zone_index] = state_id;
+ self->m_states[find_region_id<typename EventType::active_state::wrapped_entry>::region_index] = state_id;
              self->start(evt.m_event);
              // and we process the transition in the zone of the newly active state
              // (entry pseudo states are, according to UML, a state connecting 1 transition outside to 1 inside
@@ -2077,9 +2252,9 @@
              void operator()( ::boost::msm::wrap<StateType> const& )
              {
                  int state_id = get_state_id<stt,typename StateType::wrapped_entry>::value;
- BOOST_STATIC_ASSERT(StateType::zone_index >= 0);
- BOOST_STATIC_ASSERT(StateType::zone_index <= nr_regions::value);
- helper_self->m_states[StateType::zone_index] = state_id;
+ BOOST_STATIC_ASSERT(find_region_id<typename StateType::wrapped_entry>::region_index >= 0);
+ BOOST_STATIC_ASSERT(find_region_id<typename StateType::wrapped_entry>::region_index <= nr_regions::value);
+ helper_self->m_states[find_region_id<typename StateType::wrapped_entry>::region_index] = state_id;
              }
          private:
              library_sm* helper_self;
@@ -2183,7 +2358,7 @@
         if (!m_events_queue.m_events_queue.empty())
         {
             transition_fct to_call = m_events_queue.m_events_queue.front();
- m_events_queue.m_events_queue.pop();
+ m_events_queue.m_events_queue.pop_front();
             to_call();
         }
     }
@@ -2268,6 +2443,11 @@
     template <class ContainingSM>
     void fill_states(ContainingSM* containing_sm=0)
     {
+ // checks that regions are truly orthogonal
+ FsmCheckPolicy::template check_orthogonality<library_sm>();
+ // checks that all states are reachable
+ FsmCheckPolicy::template check_unreachable_states<library_sm>();
+
         BOOST_STATIC_CONSTANT(int, max_state = (mpl::size<state_list>::value));
         // allocate the place without reallocation
         m_visitors.fill_visitors(max_state);

Modified: branches/release/boost/msm/front/euml/common.hpp
==============================================================================
--- branches/release/boost/msm/front/euml/common.hpp (original)
+++ branches/release/boost/msm/front/euml/common.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -351,7 +351,7 @@
         return true;
     }
     template <class EVT,class FSM,class SourceState,class TargetState>
- bool operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
+ bool operator()(EVT const& ,FSM& ,SourceState& ,TargetState&)const
     {
         // does nothing
         return true;

Modified: branches/release/boost/msm/front/euml/state_grammar.hpp
==============================================================================
--- branches/release/boost/msm/front/euml/state_grammar.hpp (original)
+++ branches/release/boost/msm/front/euml/state_grammar.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -18,6 +18,7 @@
 
 #include <boost/mpl/remove_if.hpp>
 #include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/assert.hpp>
 
 #include <boost/msm/row_tags.hpp>
 #include <boost/msm/front/common_states.hpp>

Modified: branches/release/boost/msm/front/functor_row.hpp
==============================================================================
--- branches/release/boost/msm/front/functor_row.hpp (original)
+++ branches/release/boost/msm/front/functor_row.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -15,17 +15,36 @@
 
 #include <boost/mpl/set.hpp>
 #include <boost/mpl/for_each.hpp>
+#include <boost/mpl/has_xxx.hpp>
 
 #include <boost/typeof/typeof.hpp>
 
+#include <boost/msm/back/common_types.hpp>
 #include <boost/msm/row_tags.hpp>
 #include <boost/msm/common.hpp>
 #include <boost/msm/front/completion_event.hpp>
 
 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
 
+BOOST_MPL_HAS_XXX_TRAIT_DEF(deferring_action)
+
 namespace boost { namespace msm { namespace front
 {
+ template <class Func,class Enable=void>
+ struct get_functor_return_value
+ {
+ static const ::boost::msm::back::HandledEnum value = ::boost::msm::back::HANDLED_TRUE;
+ };
+ template <class Func>
+ struct get_functor_return_value<Func,
+ typename ::boost::enable_if<
+ typename has_deferring_action<Func>::type
+ >::type
+ >
+ {
+ static const ::boost::msm::back::HandledEnum value = ::boost::msm::back::HANDLED_DEFERRED;
+ };
+
     template <class SOURCE,class EVENT,class TARGET,class ACTION=none,class GUARD=none>
     struct Row
     {
@@ -37,10 +56,11 @@
         // action plus guard
         typedef row_tag row_type_tag;
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
         {
             // create functor, call it
             Action()(evt,fsm,src,tgt);
+ return get_functor_return_value<Action>::value;
         }
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt,AllStates&)
@@ -72,10 +92,11 @@
         // no guard
         typedef a_row_tag row_type_tag;
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
         {
             // create functor, call it
             Action()(evt,fsm,src,tgt);
+ return get_functor_return_value<Action>::value;
         }
     };
     template<class SOURCE,class EVENT,class TARGET,class GUARD>
@@ -107,10 +128,11 @@
         // no guard
         typedef a_irow_tag row_type_tag;
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
         {
             // create functor, call it
             Action()(evt,fsm,src,tgt);
+ return get_functor_return_value<Action>::value;
         }
     };
     template<class SOURCE,class EVENT,class GUARD>
@@ -141,10 +163,11 @@
         // action + guard
         typedef irow_tag row_type_tag;
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
         {
             // create functor, call it
             Action()(evt,fsm,src,tgt);
+ return get_functor_return_value<Action>::value;
         }
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
@@ -179,10 +202,11 @@
         // action plus guard
         typedef sm_i_row_tag row_type_tag;
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
         {
             // create functor, call it
             Action()(evt,fsm,src,tgt);
+ return get_functor_return_value<Action>::value;
         }
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
@@ -201,10 +225,11 @@
         // no guard
         typedef sm_a_i_row_tag row_type_tag;
         template <class EVT,class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&)
         {
             // create functor, call it
             Action()(evt,fsm,src,tgt);
+ return get_functor_return_value<Action>::value;
         }
     };
     template<class EVENT,class GUARD>
@@ -304,6 +329,8 @@
     // functor pre-defined for basic functionality
     struct Defer
     {
+ // mark as deferring to avoid stack overflows in certain conditions
+ typedef int deferring_action;
         template <class EVT,class FSM,class SourceState,class TargetState>
         void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& ) const
         {

Modified: branches/release/boost/msm/front/internal_row.hpp
==============================================================================
--- branches/release/boost/msm/front/internal_row.hpp (original)
+++ branches/release/boost/msm/front/internal_row.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -14,6 +14,7 @@
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/fusion/include/at_key.hpp>
+#include <boost/msm/back/common_types.hpp>
 #include <boost/msm/row_tags.hpp>
 #include <boost/msm/front/detail/row2_helper.hpp>
 
@@ -29,13 +30,14 @@
         typedef sm_a_i_row_tag row_type_tag;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
                                 AllStates& all_states)
         {
             // in this front-end, we don't need to know source and target states
             ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
                 (fsm,evt,src,tgt,all_states,
                 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
+ return ::boost::msm::back::HANDLED_TRUE;
         }
     };
 
@@ -51,13 +53,14 @@
         typedef sm_i_row_tag row_type_tag;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
                                 AllStates& all_states)
         {
             // in this front-end, we don't need to know source and target states
             ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
                 (fsm,evt,src,tgt,all_states,
                 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
+ return ::boost::msm::back::HANDLED_TRUE;
         }
         template <class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,

Modified: branches/release/boost/msm/front/row2.hpp
==============================================================================
--- branches/release/boost/msm/front/row2.hpp (original)
+++ branches/release/boost/msm/front/row2.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -14,6 +14,7 @@
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/fusion/include/at_key.hpp>
+#include <boost/msm/back/common_types.hpp>
 #include <boost/msm/row_tags.hpp>
 #include <boost/msm/front/detail/row2_helper.hpp>
 
@@ -46,13 +47,14 @@
         typedef T2 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
                                 AllStates& all_states)
         {
             // in this front-end, we don't need to know source and target states
             ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::template call_helper
                 (fsm,evt,src,tgt,all_states,
                 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
+ return ::boost::msm::back::HANDLED_TRUE;
         }
     };
 
@@ -72,13 +74,14 @@
         typedef T2 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState, class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
                                 AllStates& all_states)
         {
             // in this front-end, we don't need to know source and target states
             ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
                 (fsm,evt,src,tgt,all_states,
                 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
+ return ::boost::msm::back::HANDLED_TRUE;
         }
         template <class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
@@ -127,13 +130,14 @@
         typedef T1 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
                                 AllStates& all_states)
         {
             // in this front-end, we don't need to know source and target states
             ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
                 (fsm,evt,src,tgt,all_states,
                 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
+ return ::boost::msm::back::HANDLED_TRUE;
         }
     };
 
@@ -152,13 +156,14 @@
         typedef T1 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
                                 AllStates& all_states)
         {
             // in this front-end, we don't need to know source and target states
             ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
                 (fsm,evt,src,tgt,all_states,
                 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
+ return ::boost::msm::back::HANDLED_TRUE;
         }
         template <class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,

Modified: branches/release/boost/msm/front/state_machine_def.hpp
==============================================================================
--- branches/release/boost/msm/front/state_machine_def.hpp (original)
+++ branches/release/boost/msm/front/state_machine_def.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -19,6 +19,7 @@
 #include <boost/mpl/vector.hpp>
 
 #include <boost/msm/row_tags.hpp>
+#include <boost/msm/back/common_types.hpp>
 #include <boost/msm/front/states.hpp>
 #include <boost/msm/front/completion_event.hpp>
 #include <boost/msm/front/common_states.hpp>
@@ -51,10 +52,11 @@
         typedef T2 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&, AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&, AllStates&)
         {
             // in this front-end, we don't need to know source and target states
             (fsm.*action)(evt);
+ return ::boost::msm::back::HANDLED_TRUE;
         }
     };
 
@@ -85,10 +87,11 @@
         typedef T2 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState, class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
         {
             // in this front-end, we don't need to know source and target states
             (fsm.*action)(evt);
+ return ::boost::msm::back::HANDLED_TRUE;
         }
         template <class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
@@ -129,10 +132,11 @@
         typedef T1 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
         {
             // in this front-end, we don't need to know source and target states
             (fsm.*action)(evt);
+ return ::boost::msm::back::HANDLED_TRUE;
         }
     };
 
@@ -149,10 +153,11 @@
         typedef T1 Target;
         typedef Event Evt;
         template <class FSM,class SourceState,class TargetState,class AllStates>
- static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
+ static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)
         {
             // in this front-end, we don't need to know source and target states
             (fsm.*action)(evt);
+ return ::boost::msm::back::HANDLED_TRUE;
         }
         template <class FSM,class SourceState,class TargetState,class AllStates>
         static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&)

Copied: branches/release/boost/msm/mpl_graph/adjacency_list_graph.hpp (from r66605, /trunk/boost/msm/mpl_graph/adjacency_list_graph.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/adjacency_list_graph.hpp (original)
+++ branches/release/boost/msm/mpl_graph/adjacency_list_graph.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,8 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED
 
 // graph implementation based on an adjacency list
 // sequence< pair< source_vertex, sequence< pair<edge, target_vertex> > > >
@@ -19,7 +19,7 @@
 #include <boost/msm/mpl_graph/detail/adjacency_list_graph.ipp>
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
    
 template<typename AdjacencyList>
@@ -32,4 +32,4 @@
 }
 }
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/breadth_first_search.hpp (from r66605, /trunk/boost/msm/mpl_graph/breadth_first_search.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/breadth_first_search.hpp (original)
+++ branches/release/boost/msm/mpl_graph/breadth_first_search.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,8 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED
 
 #include <boost/msm/mpl_graph/mpl_graph.hpp>
 
@@ -19,7 +19,7 @@
 #include "search_colors.hpp"
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 
 // bfs takes a visitor which has all the bgl-like metafunctions encapsulated in an
@@ -160,8 +160,8 @@
 {};
 
 } // namespace mpl_graph
-} // namespace metagraph
+} // namespace msm
 } // namespace boost
 
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/depth_first_search.hpp (from r66605, /trunk/boost/msm/mpl_graph/depth_first_search.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/depth_first_search.hpp (original)
+++ branches/release/boost/msm/mpl_graph/depth_first_search.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,8 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED
 
 #include <boost/msm/mpl_graph/mpl_graph.hpp>
 
@@ -16,7 +16,7 @@
 #include "search_colors.hpp"
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 
 // dfs takes a visitor which has all the bgl-like metafunctions encapsulated in an
@@ -115,8 +115,8 @@
 {};
 
 } // namespace mpl_graph
-} // namespace metagraph
+} // namespace msm
 } // namespace boost
 
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp (from r66605, /trunk/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp (original)
+++ branches/release/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,8 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED
 
 // implementation of a graph declared in adjacency list format
 // sequence< pair< source_vertex, sequence< pair<edge, target_vertex> > > >
@@ -21,7 +21,7 @@
 #include <boost/mpl/push_back.hpp>
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 namespace detail {
     
@@ -124,5 +124,5 @@
 }
 }
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED
 

Copied: branches/release/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp (from r66605, /trunk/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp (original)
+++ branches/release/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,14 +2,14 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED
 
 // forward definitions of the producer metafunctions that need to be specialized for
 // each graph representation
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 namespace detail {
     
@@ -38,5 +38,5 @@
 }
 }
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED
 

Copied: branches/release/boost/msm/mpl_graph/detail/incidence_list_graph.ipp (from r66605, /trunk/boost/msm/mpl_graph/detail/incidence_list_graph.ipp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/detail/incidence_list_graph.ipp (original)
+++ branches/release/boost/msm/mpl_graph/detail/incidence_list_graph.ipp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,9 +2,9 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED
 
-#define BOOST_METAGRAPH_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED
 
 // these metafunctions provide the metadata structures needed by the public interface
 // in mpl_graph.hpp
@@ -40,7 +40,7 @@
 
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 namespace detail {
 
@@ -103,4 +103,4 @@
 }
 }
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/incidence_list_graph.hpp (from r66605, /trunk/boost/msm/mpl_graph/incidence_list_graph.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/incidence_list_graph.hpp (original)
+++ branches/release/boost/msm/mpl_graph/incidence_list_graph.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,8 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED
 
 // graph implementation based on a an mpl sequence of sequences <Edge,Source,Target>
 
@@ -18,7 +18,7 @@
 #include <boost/msm/mpl_graph/detail/incidence_list_graph.ipp>
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
    
 template<typename EdgeSequence>
@@ -31,4 +31,4 @@
 }
 }
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/mpl_graph.hpp (from r66605, /trunk/boost/msm/mpl_graph/mpl_graph.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/mpl_graph.hpp (original)
+++ branches/release/boost/msm/mpl_graph/mpl_graph.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -9,8 +9,8 @@
 // (See accompanying file LICENSEmpl::_1_0.txt or copy at
 // http://www.boost.org/LICENSEmpl::_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
 
 #include <boost/msm/mpl_graph/detail/graph_implementation_interface.ipp>
 
@@ -25,7 +25,7 @@
 #include <boost/mpl/back_inserter.hpp>
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 
 // Boost Graph concepts, MPL style
@@ -108,7 +108,7 @@
 // source and target are defined in IncidenceGraph
 
 } // mpl_graph
-} // metagraph
+} // msm
 } // boost
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/mpl_utils.hpp (from r66605, /trunk/boost/msm/mpl_graph/mpl_utils.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/mpl_utils.hpp (original)
+++ branches/release/boost/msm/mpl_graph/mpl_utils.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,8 +2,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED
 
 #include <boost/mpl/fold.hpp>
 #include <boost/mpl/map.hpp>
@@ -15,7 +15,7 @@
 #include <boost/mpl/and.hpp>
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 namespace mpl_utils {
     
@@ -59,4 +59,4 @@
 }
 }
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED

Copied: branches/release/boost/msm/mpl_graph/search_colors.hpp (from r66605, /trunk/boost/msm/mpl_graph/search_colors.hpp)
==============================================================================
--- /trunk/boost/msm/mpl_graph/search_colors.hpp (original)
+++ branches/release/boost/msm/mpl_graph/search_colors.hpp 2011-01-08 12:38:57 EST (Sat, 08 Jan 2011)
@@ -2,11 +2,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_METAGRAPH_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED
-#define BOOST_METAGRAPH_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED
+#ifndef BOOST_MSM_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED
+#define BOOST_MSM_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED
 
 namespace boost {
-namespace metagraph {
+namespace msm {
 namespace mpl_graph {
 
 namespace search_colors {
@@ -32,8 +32,8 @@
 
 
 } // namespace mpl_graph
-} // namespace metagraph
+} // namespace msm
 } // namespace boost
 
 
-#endif // BOOST_METAGRAPH_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED
+#endif // BOOST_MSM_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED


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