Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57528 - in sandbox/msm: boost/msm boost/msm/back boost/msm/front boost/msm/front/euml libs/msm/doc libs/msm/doc/index-Dateien
From: christophe.j.henry_at_[hidden]
Date: 2009-11-09 17:25:14


Author: chenry
Date: 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
New Revision: 57528
URL: http://svn.boost.org/trac/boost/changeset/57528

Log:
V2.0
Added:
   sandbox/msm/boost/msm/back/
   sandbox/msm/boost/msm/back/args.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/bind_helpers.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/common_types.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/copy_policies.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/dispatch_table.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/history_policies.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/metafunctions.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/state_machine.hpp (contents, props changed)
   sandbox/msm/boost/msm/back/tools.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/
   sandbox/msm/boost/msm/front/automatic_event.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/common_states.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/
   sandbox/msm/boost/msm/front/euml/algorithm.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/common.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/container.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/euml.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/euml_typeof.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/guard_grammar.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/iteration.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/operator.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/querying.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/state_grammar.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/stl.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/stt_grammar.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/euml/transformation.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/functor_row.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/state_machine_def.hpp (contents, props changed)
   sandbox/msm/boost/msm/front/states.hpp (contents, props changed)
   sandbox/msm/boost/msm/row_tags.hpp (contents, props changed)
   sandbox/msm/libs/msm/doc/AnnexA.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/Anonymous.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/AnonymousTutorial.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/AnonymousTutorialEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/AnonymousTutorialWithFunctors.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/CompilerStressTestEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/CompositeTutorial.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/CompositeTutorial.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/CompositeTutorialEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/DirectEntryAndConflicts.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/DirectEntryEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/EumlSimple.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/Flags.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/FlagsTutorial.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/FlagsTutorialEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/HarelWithEntry.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/History.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/HistoryEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/HistoryTutorial.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/MsmComposite.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/MsmSession_Handout.pdf (contents, props changed)
   sandbox/msm/libs/msm/doc/MsmSimple.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/Orthogonal-deferred.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/OrthogonalDeferredEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SC Composite.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SC Simple.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SM-2Arg.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SimpleTimer.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SimpleTutorial.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SimpleTutorial.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/SimpleTutorialEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/SimpleWithFunctors.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/Timer.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/Transition.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/alarm.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/clock.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/entry tutorial.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/iPodSearch.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/iPodSearch.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/iPodSearchEuml.cpp (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/
   sandbox/msm/libs/msm/doc/index-Dateien/colorschememapping.xml (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/filelist.xml (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image001.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image003.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image005.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image007.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image009.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image011.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image013.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image015.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image017.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image019.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image021.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image023.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image025.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image027.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image028.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image029.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image030.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image031.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image032.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image033.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image034.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image035.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image036.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image037.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image038.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/image039.jpg (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/item0032.xml (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/props0033.xml (contents, props changed)
   sandbox/msm/libs/msm/doc/index-Dateien/themedata.thmx (contents, props changed)
   sandbox/msm/libs/msm/doc/index.htm (contents, props changed)
   sandbox/msm/libs/msm/doc/logging_functors.h (contents, props changed)
Removed:
   sandbox/msm/boost/msm/args.hpp
   sandbox/msm/boost/msm/bind_helpers.hpp
   sandbox/msm/boost/msm/common_types.hpp
   sandbox/msm/boost/msm/copy_policies.hpp
   sandbox/msm/boost/msm/dispatch_table.hpp
   sandbox/msm/boost/msm/history_policies.hpp
   sandbox/msm/boost/msm/metafunctions.hpp
   sandbox/msm/boost/msm/state_machine.hpp
   sandbox/msm/boost/msm/states.hpp
   sandbox/msm/boost/msm/tools.hpp
   sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp
   sandbox/msm/libs/msm/doc/SM-0arg.cpp
   sandbox/msm/libs/msm/doc/SM-1arg.cpp
   sandbox/msm/libs/msm/doc/SM-3arg.cpp
   sandbox/msm/libs/msm/doc/SM.cpp
   sandbox/msm/libs/msm/doc/index.html
   sandbox/msm/libs/msm/doc/index_html_166e0165.jpg
   sandbox/msm/libs/msm/doc/index_html_2cb96cb.jpg
   sandbox/msm/libs/msm/doc/index_html_2cffc008.jpg
   sandbox/msm/libs/msm/doc/index_html_55a3569b.jpg
   sandbox/msm/libs/msm/doc/index_html_573c91b1.jpg
   sandbox/msm/libs/msm/doc/index_html_583f47ba.jpg
   sandbox/msm/libs/msm/doc/index_html_632a9e9a.jpg
   sandbox/msm/libs/msm/doc/index_html_64d3c88c.jpg
   sandbox/msm/libs/msm/doc/index_html_757a2a53.jpg
   sandbox/msm/libs/msm/doc/index_html_m15cfca99.jpg
   sandbox/msm/libs/msm/doc/index_html_m23e6b7d5.jpg
   sandbox/msm/libs/msm/doc/index_html_m26c048b0.jpg
   sandbox/msm/libs/msm/doc/index_html_m2ed87c03.jpg
   sandbox/msm/libs/msm/doc/index_html_m312ff8f2.jpg
   sandbox/msm/libs/msm/doc/index_html_m6fc8a34.jpg
   sandbox/msm/libs/msm/doc/index_html_m73d8a201.jpg
   sandbox/msm/libs/msm/doc/index_html_m743a147d.jpg

Deleted: sandbox/msm/boost/msm/args.hpp
==============================================================================
--- sandbox/msm/boost/msm/args.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,65 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_ARGS_H
-#define BOOST_MSM_ARGS_H
-
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/arithmetic/sub.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/control/expr_if.hpp>
-#include <boost/preprocessor/punctuation/comma.hpp>
-#include <boost/preprocessor/arithmetic/add.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/comparison/less.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/function.hpp>
-
-#ifndef BOOST_MSM_VISITOR_ARG_SIZE
-#define BOOST_MSM_VISITOR_ARG_SIZE 2 // default max number of arguments
-#endif
-
-namespace boost { namespace msm
-{
-struct none {};
-#define MSM_ARGS_PRINT(z, n, data) data
-#define MSM_ARGS_NONE_PRINT(z, n, data) class data ## n = none \
- BOOST_PP_COMMA_IF( BOOST_PP_LESS(n, BOOST_PP_DEC(BOOST_MSM_VISITOR_ARG_SIZE) ) )
-
-#define MSM_VISITOR_MAIN_ARGS(n) \
- template <class RES, \
- BOOST_PP_REPEAT(BOOST_MSM_VISITOR_ARG_SIZE, MSM_ARGS_NONE_PRINT, ARG)> \
- struct args \
- { \
- typedef ::boost::function<RES(BOOST_PP_ENUM_PARAMS(n, ARG))> type; \
- enum {args_number=n}; \
- };
-
-#define MSM_VISITOR_ARGS(z, n, unused) \
- template <class RES BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, class ARG)> \
- struct args<RES, \
- BOOST_PP_ENUM_PARAMS(n,ARG) \
- BOOST_PP_COMMA_IF(n) \
- BOOST_PP_ENUM(BOOST_PP_SUB(BOOST_MSM_VISITOR_ARG_SIZE,n), MSM_ARGS_PRINT, none) \
- > \
- { \
- typedef ::boost::function<RES(BOOST_PP_ENUM_PARAMS(n, ARG))> type; \
- enum {args_number=n}; \
- };
-MSM_VISITOR_MAIN_ARGS(BOOST_MSM_VISITOR_ARG_SIZE)
-BOOST_PP_REPEAT(BOOST_MSM_VISITOR_ARG_SIZE, MSM_VISITOR_ARGS, ~)
-
-#undef MSM_VISITOR_ARGS
-#undef MSM_ARGS_PRINT
-
-}}
-
-#endif //BOOST_MSM_ARGS_H
-

Added: sandbox/msm/boost/msm/back/args.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/args.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,68 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_ARGS_H
+#define BOOST_MSM_BACK_ARGS_H
+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/control/expr_if.hpp>
+#include <boost/preprocessor/punctuation/comma.hpp>
+#include <boost/preprocessor/arithmetic/add.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/less.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/function.hpp>
+
+#ifndef BOOST_MSM_VISITOR_ARG_SIZE
+#define BOOST_MSM_VISITOR_ARG_SIZE 2 // default max number of arguments
+#endif
+
+namespace boost { namespace msm { namespace back
+{
+struct none {};
+#define MSM_ARGS_TYPEDEF_SUB(z, n, unused) typedef ARG ## n argument ## n ;
+#define MSM_ARGS_PRINT(z, n, data) data
+#define MSM_ARGS_NONE_PRINT(z, n, data) class data ## n = none \
+ BOOST_PP_COMMA_IF( BOOST_PP_LESS(n, BOOST_PP_DEC(BOOST_MSM_VISITOR_ARG_SIZE) ) )
+
+#define MSM_VISITOR_MAIN_ARGS(n) \
+ template <class RES, \
+ BOOST_PP_REPEAT(BOOST_MSM_VISITOR_ARG_SIZE, MSM_ARGS_NONE_PRINT, ARG)> \
+ struct args \
+ { \
+ typedef ::boost::function<RES(BOOST_PP_ENUM_PARAMS(n, ARG))> type; \
+ enum {args_number=n}; \
+ BOOST_PP_REPEAT(n, MSM_ARGS_TYPEDEF_SUB, ~ ) \
+ };
+
+#define MSM_VISITOR_ARGS(z, n, unused) \
+ template <class RES BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, class ARG)> \
+ struct args<RES, \
+ BOOST_PP_ENUM_PARAMS(n,ARG) \
+ BOOST_PP_COMMA_IF(n) \
+ BOOST_PP_ENUM(BOOST_PP_SUB(BOOST_MSM_VISITOR_ARG_SIZE,n), MSM_ARGS_PRINT, none) \
+ > \
+ { \
+ typedef ::boost::function<RES(BOOST_PP_ENUM_PARAMS(n, ARG))> type; \
+ enum {args_number=n}; \
+ BOOST_PP_REPEAT(n, MSM_ARGS_TYPEDEF_SUB, ~ ) \
+ };
+MSM_VISITOR_MAIN_ARGS(BOOST_MSM_VISITOR_ARG_SIZE)
+BOOST_PP_REPEAT(BOOST_MSM_VISITOR_ARG_SIZE, MSM_VISITOR_ARGS, ~)
+
+#undef MSM_VISITOR_ARGS
+#undef MSM_ARGS_PRINT
+
+}}}
+
+#endif //BOOST_MSM_BACK_ARGS_H
+

Added: sandbox/msm/boost/msm/back/bind_helpers.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/bind_helpers.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,39 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_BIND_HELPERS_H
+#define BOOST_MSM_BACK_BIND_HELPERS_H
+
+#include <functional>
+
+namespace boost { namespace msm { namespace back
+{
+ // helper to replace std::plus as the lack of implicit conversion makes it not usable in one of our bind
+ template<class _Ty,class _Tz>
+ struct plus2
+ : public std::binary_function<_Ty, _Tz, _Ty>
+ { // functor for operator+
+ _Ty operator()( _Ty _Left, _Tz _Right) const
+ { // apply operator+ to operands
+ return (_Left + _Right);
+ }
+ };
+ // helper to dereference a pointer to a function pointer
+ template <class T>
+ struct deref
+ {
+ typedef T& result_type;
+ T& operator()(T* f) const
+ {
+ return *f;
+ }
+ };
+} } }//boost::msm::back
+#endif //BOOST_MSM_BACK_BIND_HELPERS_H

Added: sandbox/msm/boost/msm/back/common_types.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/common_types.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,37 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_COMMON_TYPES_H
+#define BOOST_MSM_COMMON_TYPES_H
+
+#include <boost/tuple/tuple.hpp>
+
+namespace boost { namespace msm { namespace back
+{
+// used for disable_if
+template <int> struct dummy { dummy(int) {} };
+// return value for transition handling
+typedef enum
+{
+ HANDLED_FALSE=0,
+ HANDLED_TRUE =1,
+ HANDLED_GUARD_REJECT=2
+} HandledEnum;
+
+typedef HandledEnum execute_return;
+
+// wrapper for mpl::for_each as showed in the C++ Template Metaprogramming ch. 9
+template <class T>
+struct wrap{};
+
+}}}
+
+#endif //BOOST_MSM_COMMON_TYPES_H
+

Added: sandbox/msm/boost/msm/back/copy_policies.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/copy_policies.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,30 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_COPY_POLICIES_H
+#define BOOST_MSM_BACK_COPY_POLICIES_H
+
+#include <boost/noncopyable.hpp>
+
+namespace boost { namespace msm { namespace back
+{
+ // deactivates copy
+ struct NoCopy : ::boost::noncopyable
+ {
+ };
+
+ // allows deep copy
+ struct DeepCopy
+ {
+ };
+} } }//boost::msm::back
+
+
+#endif //BOOST_MSM_BACK_COPY_POLICIES_H

Added: sandbox/msm/boost/msm/back/dispatch_table.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/dispatch_table.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,254 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_DISPATCH_TABLE_H
+#define BOOST_MSM_BACK_DISPATCH_TABLE_H
+
+#include <utility>
+
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/greater.hpp>
+#include <boost/mpl/filter_view.hpp>
+#include <boost/mpl/pop_front.hpp>
+#include <boost/mpl/for_each.hpp>
+
+#include <boost/msm/back/metafunctions.hpp>
+#include <boost/msm/back/common_types.hpp>
+
+namespace boost { namespace msm { namespace back
+{
+
+// Generates a singleton runtime lookup table that maps current state
+// to a function that makes the SM take its transition on the given
+// Event type.
+template <class Fsm,class Stt, class Event>
+struct dispatch_table
+{
+ private:
+ // This is a table of these function pointers.
+ typedef std::pair<int,HandledEnum> (*cell)(Fsm&, int,Event const&);
+ typedef bool (*guard)(Fsm&, Event const&);
+
+ // class used to build a chain (or sequence) of transitions for a given event and start state
+ // (like an UML diamond). Allows transition conflicts.
+ template< typename Seq,typename AnEvent,typename State >
+ struct chain_row
+ {
+ typedef State current_state_type;
+ typedef AnEvent event;
+
+ // helper for building a disable/enable_if-controlled execute function
+ struct execute_helper
+ {
+ template <class Sequence>
+ static
+ typename ::boost::enable_if<typename ::boost::mpl::empty<Sequence>::type,std::pair<int,HandledEnum> >::type
+ execute(Fsm& , int state, Event const& ,
+ ::boost::msm::back::dummy<0> = 0)
+ {
+ // if at least one guard rejected, this will be ignored, otherwise will generate an error
+ return std::make_pair(state,HANDLED_FALSE);
+ }
+
+ template <class Sequence>
+ static
+ typename ::boost::disable_if<typename ::boost::mpl::empty<Sequence>::type,std::pair<int,HandledEnum> >::type
+ execute(Fsm& fsm, int state, Event const& evt,
+ ::boost::msm::back::dummy<1> = 0)
+ {
+ // try the first guard
+ typedef typename ::boost::mpl::front<Sequence>::type first_row;
+ std::pair<int,HandledEnum> res = first_row::execute(fsm,state,evt);
+ if (HANDLED_TRUE!=res.second)
+ {
+ // if the first rejected, move on to the next one
+ std::pair<int,HandledEnum> sub_res =
+ execute<typename ::boost::mpl::pop_front<Sequence>::type>(fsm,state,evt);
+ // if at least one guards rejects, the event will not generate a call to no_transition
+ HandledEnum handled = ((HANDLED_GUARD_REJECT==sub_res.second) ||
+ (HANDLED_GUARD_REJECT==res.second))?
+ HANDLED_GUARD_REJECT:sub_res.second;
+ return std::make_pair(sub_res.first,handled);
+ }
+ return res;
+ }
+ };
+ // Take the transition action and return the next state.
+ static std::pair<int,HandledEnum> execute(Fsm& fsm, int state, Event const& evt)
+ {
+ // forward to helper
+ return execute_helper::template execute<Seq>(fsm,state,evt);
+ }
+ };
+ // nullary metafunction whose only job is to prevent early evaluation of _1
+ template< typename Entry >
+ struct make_chain_row_from_map_entry
+ {
+ typedef chain_row<typename Entry::second,Event,
+ typename Entry::first > type;
+ };
+ // Compute the maximum state value in the sm so we know how big
+ // to make the table
+ typedef typename generate_state_set<Stt>::type state_list;
+ BOOST_STATIC_CONSTANT(int, max_state = ( ::boost::mpl::size<state_list>::value));
+
+ // A function object for use with mpl::for_each that stuffs
+ // transitions into cells.
+ struct init_cell
+ {
+ init_cell(dispatch_table* self_)
+ : self(self_)
+ {}
+
+ // Cell initializer function object, used with mpl::for_each
+ template <class Transition>
+ typename ::boost::enable_if<typename has_not_real_row_tag<Transition>::type,void >::type
+ operator()(Transition const&,boost::msm::back::dummy<0> = 0) const
+ {
+ // version for not real rows. No problem because irrelevant for process_event
+ }
+ template <class Transition>
+ typename ::boost::disable_if<typename has_not_real_row_tag<Transition>::type,void >::type
+ operator()(Transition const&,boost::msm::back::dummy<1> = 0) const
+ {
+ typedef typename create_stt<Fsm>::type stt;
+ BOOST_STATIC_CONSTANT(int, state_id =
+ (get_state_id<stt,typename Transition::current_state_type>::value));
+ self->entries[state_id] = &Transition::execute;
+ }
+
+ dispatch_table* self;
+ };
+
+ // Cell default-initializer function object, used with mpl::for_each
+ // initializes with call_no_transition, defer_transition or default_eventless_transition
+ // variant for non-anonymous transitions
+ template <class EventType,class Enable=void>
+ struct default_init_cell
+ {
+ default_init_cell(dispatch_table* self_,cell* tofill_entries_)
+ : self(self_),tofill_entries(tofill_entries_)
+ {}
+ template <class State>
+ typename ::boost::enable_if<typename has_state_delayed_event<State,Event>::type,void>::type
+ operator()(boost::msm::back::wrap<State> const&,boost::msm::back::dummy<0> = 0)
+ {
+ typedef typename create_stt<Fsm>::type stt;
+ BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
+ cell call_no_transition = &Fsm::defer_transition;
+ tofill_entries[state_id] = call_no_transition;
+ }
+ template <class State>
+ typename ::boost::disable_if<typename has_state_delayed_event<State,Event>::type,void >::type
+ operator()(boost::msm::back::wrap<State> const&,boost::msm::back::dummy<0> = 0)
+ {
+ typedef typename create_stt<Fsm>::type stt;
+ BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
+ cell call_no_transition = &Fsm::call_no_transition;
+ tofill_entries[state_id] = call_no_transition;
+ }
+
+ dispatch_table* self;
+ cell* tofill_entries;
+ };
+
+ // variant for anonymous transitions
+ template <class EventType>
+ struct default_init_cell<EventType,
+ typename ::boost::enable_if<
+ typename is_automatic_event<EventType>::type>::type>
+ {
+ default_init_cell(dispatch_table* self_,cell* tofill_entries_)
+ : self(self_),tofill_entries(tofill_entries_)
+ {}
+
+ // this event is an automatic one (not a real one, just one for use in event-less transitions)
+ // Note this event cannot be used as deferred!
+ template <class State>
+ void operator()(boost::msm::back::wrap<State> const&)
+ {
+ typedef typename create_stt<Fsm>::type stt;
+ BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
+ cell call_no_transition = &Fsm::default_eventless_transition;
+ tofill_entries[state_id] = call_no_transition;
+ }
+
+ dispatch_table* self;
+ cell* tofill_entries;
+ };
+
+ public:
+ // initialize the dispatch table for a given Event and Fsm
+ dispatch_table()
+ {
+ // Initialize cells for no transition
+ ::boost::mpl::for_each<typename generate_state_set<Stt>::type,
+ boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (default_init_cell<Event>(this,entries));
+
+ // build chaining rows for rows coming from the same state and the current event
+ // first we build a map of sequence for every source
+ // in reverse order so that the frow's are handled first (UML priority)
+ typedef typename ::boost::mpl::reverse_fold<
+ // filter on event
+ ::boost::mpl::filter_view
+ <Stt, ::boost::is_same<transition_event< ::boost::mpl::placeholders::_>, Event> >,
+ // build a map
+ ::boost::mpl::map<>,
+ ::boost::mpl::if_<
+ // if we already have a row on this source state
+ ::boost::mpl::has_key< ::boost::mpl::placeholders::_1,
+ transition_source_type< ::boost::mpl::placeholders::_2> >,
+ // insert a new element in the value type
+ ::boost::mpl::insert<
+ ::boost::mpl::placeholders::_1,
+ ::boost::mpl::pair<transition_source_type< ::boost::mpl::placeholders::_2>,
+ ::boost::mpl::push_back<
+ ::boost::mpl::at< ::boost::mpl::placeholders::_1,
+ transition_source_type< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::placeholders::_2 >
+ > >,
+ // first row on this source state, make a vector with 1 element
+ ::boost::mpl::insert<
+ ::boost::mpl::placeholders::_1,
+ ::boost::mpl::pair<transition_source_type< ::boost::mpl::placeholders::_2>,
+ make_vector< ::boost::mpl::placeholders::_2> > >
+ >
+ >::type map_of_row_seq;
+ // and then build chaining rows for all source states having more than 1 row
+ typedef typename ::boost::mpl::fold<
+ map_of_row_seq,::boost::mpl::vector0<>,
+ ::boost::mpl::if_<
+ ::boost::mpl::greater< ::boost::mpl::size<
+ ::boost::mpl::second< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::int_<1> >,
+ // we need row chaining
+ ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
+ make_chain_row_from_map_entry< ::boost::mpl::placeholders::_2> >,
+ // just one row, no chaining, we rebuild the row like it was before
+ ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
+ get_first_element_pair_second< ::boost::mpl::placeholders::_2> >
+ > >::type chained_rows;
+ // Go back and fill in cells for matching transitions.
+ ::boost::mpl::for_each<chained_rows>(init_cell(this));
+ }
+
+ // The singleton instance.
+ static const dispatch_table instance;
+
+ public: // data members
+ cell entries[max_state];
+};
+
+}}} // boost::msm::back
+
+
+#endif //BOOST_MSM_BACK_DISPATCH_TABLE_H
+

Added: sandbox/msm/boost/msm/back/history_policies.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/history_policies.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,163 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_HISTORY_POLICIES_H
+#define BOOST_MSM_BACK_HISTORY_POLICIES_H
+
+#include <boost/mpl/contains.hpp>
+
+namespace boost { namespace msm { namespace back
+{
+
+// policy classes
+
+// Default: no history used
+template <int NumberOfRegions>
+class NoHistoryImpl
+{
+public:
+ NoHistoryImpl(){}
+ ~NoHistoryImpl(){}
+ void set_initial_states(int* const initial_states)
+ {
+ for (int i=0;i<NumberOfRegions;++i)
+ m_initialStates[i] = initial_states[i];
+ }
+ void history_exit(int* const )
+ {
+ // ignore
+ }
+ // returns the state where the state machine should be at start
+ template <class Event>
+ int* const history_entry(Event const& )
+ {
+ // always come back to the original state
+ return m_initialStates;
+ }
+ NoHistoryImpl<NumberOfRegions>& operator=(NoHistoryImpl<NumberOfRegions> const& rhs)
+ {
+ for (int i=0; i<NumberOfRegions;++i)
+ {
+ m_initialStates[i] = rhs.m_initialStates[i];
+ }
+ return *this;
+ }
+private:
+ int m_initialStates[NumberOfRegions];
+};
+
+// not UML standard. Always activates history, no matter which event generated the transition
+template <int NumberOfRegions>
+class AlwaysHistoryImpl
+{
+public:
+ AlwaysHistoryImpl(){}
+ ~AlwaysHistoryImpl(){}
+ void set_initial_states(int* const initial_states)
+ {
+ for (int i=0;i<NumberOfRegions;++i)
+ m_initialStates[i] = initial_states[i];
+ }
+ void history_exit(int* const current_states)
+ {
+ for (int i=0;i<NumberOfRegions;++i)
+ m_initialStates[i] = current_states[i];
+ }
+ // returns the state where the state machine should be at start
+ template <class Event>
+ int* const history_entry(Event const& )
+ {
+ // always load back the last active state
+ return m_initialStates;
+ }
+ AlwaysHistoryImpl<NumberOfRegions>& operator=(AlwaysHistoryImpl<NumberOfRegions> const& rhs)
+ {
+ for (int i=0; i<NumberOfRegions;++i)
+ {
+ m_initialStates[i] = rhs.m_initialStates[i];
+ }
+ return *this;
+ }
+private:
+ int m_initialStates[NumberOfRegions];
+};
+
+// UML Shallow history. For deep history, just use this policy for all the contained state machines
+template <class Events,int NumberOfRegions>
+class ShallowHistoryImpl
+{
+public:
+ ShallowHistoryImpl(){}
+ ~ShallowHistoryImpl(){}
+ void set_initial_states(int* const initial_states)
+ {
+ for (int i=0;i<NumberOfRegions;++i)
+ {
+ m_currentStates[i] = initial_states[i];
+ m_initialStates[i] = initial_states[i];
+ }
+ }
+ void history_exit(int* const current_states)
+ {
+ for (int i=0;i<NumberOfRegions;++i)
+ m_currentStates[i] = current_states[i];
+ }
+ // returns the state where the state machine should be at start
+ template <class Event>
+ int* const history_entry(Event const&)
+ {
+ if ( ::boost::mpl::contains<Events,Event>::value)
+ {
+ return m_currentStates;
+ }
+ // not one of our events, no history
+ return m_initialStates;
+ }
+ ShallowHistoryImpl<Events,NumberOfRegions>& operator=(ShallowHistoryImpl<Events,NumberOfRegions> const& rhs)
+ {
+ for (int i=0; i<NumberOfRegions;++i)
+ {
+ m_initialStates[i] = rhs.m_initialStates[i];
+ m_currentStates[i] = rhs.m_currentStates[i];
+ }
+ return *this;
+ }
+private:
+ int m_initialStates[NumberOfRegions];
+ int m_currentStates[NumberOfRegions];
+};
+
+struct NoHistory
+{
+ template <int NumberOfRegions>
+ struct apply
+ {
+ typedef NoHistoryImpl<NumberOfRegions> type;
+ };
+};
+struct AlwaysHistory
+{
+ template <int NumberOfRegions>
+ struct apply
+ {
+ typedef AlwaysHistoryImpl<NumberOfRegions> type;
+ };
+};
+template <class Events>
+struct ShallowHistory
+{
+ template <int NumberOfRegions>
+ struct apply
+ {
+ typedef ShallowHistoryImpl<Events,NumberOfRegions> type;
+ };
+};
+} } }//boost::msm::back
+#endif //BOOST_MSM_BACK_HISTORY_POLICIES_H

Added: sandbox/msm/boost/msm/back/metafunctions.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/metafunctions.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,625 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_METAFUNCTIONS_H
+#define BOOST_MSM_BACK_METAFUNCTIONS_H
+
+#include <boost/mpl/set.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/map.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/count_if.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/insert.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/map.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/transform.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/insert_range.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/logical.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace mpl = boost::mpl;
+BOOST_MPL_HAS_XXX_TRAIT_DEF(explicit_creation)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_entry)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_exit)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(concrete_exit_state)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(composite_tag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(not_real_row_tag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(event_blocking_flag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(explicit_entry_state)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(automatic_event)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(no_exception_thrown)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(no_message_queue)
+
+namespace boost { namespace msm { namespace back
+{
+
+// returns the current state type of a transition
+template <class Transition>
+struct transition_source_type
+{
+ typedef typename Transition::current_state_type type;
+};
+
+// returns the target state type of a transition
+template <class Transition>
+struct transition_target_type
+{
+ typedef typename Transition::next_state_type type;
+};
+
+// helper functions for generate_state_ids
+// create a pair of a state and a passed id for source and target states
+template <class Id,class Transition>
+struct make_pair_source_state_id
+{
+ typedef typename ::boost::mpl::pair<typename Transition::current_state_type,Id> type;
+};
+template <class Id,class Transition>
+struct make_pair_target_state_id
+{
+ typedef typename ::boost::mpl::pair<typename Transition::next_state_type,Id> type;
+};
+
+// iterates through a transition table and automatically generates ids starting at 0
+// first the source states, transition up to down
+// then the target states, up to down
+template <class stt>
+struct generate_state_ids
+{
+ typedef typename
+ ::boost::mpl::fold<
+ stt,::boost::mpl::pair< ::boost::mpl::map< >, ::boost::mpl::int_<0> >,
+ ::boost::mpl::pair<
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ transition_source_type< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ ::boost::mpl::insert< ::boost::mpl::first<mpl::placeholders::_1>,
+ make_pair_source_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
+ ::boost::mpl::placeholders::_2> >
+ >,
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ transition_source_type< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
+ ::boost::mpl::next< ::boost::mpl::second<mpl::placeholders::_1 > >
+ >
+ > //pair
+ >::type source_state_ids;
+ typedef typename ::boost::mpl::first<source_state_ids>::type source_state_map;
+ typedef typename ::boost::mpl::second<source_state_ids>::type highest_state_id;
+
+
+ typedef typename
+ ::boost::mpl::fold<
+ stt,::boost::mpl::pair<source_state_map,highest_state_id >,
+ ::boost::mpl::pair<
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ transition_target_type< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ ::boost::mpl::insert< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ make_pair_target_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
+ ::boost::mpl::placeholders::_2> >
+ >,
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
+ transition_target_type< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
+ ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > >
+ >
+ > //pair
+ >::type all_state_ids;
+ typedef typename ::boost::mpl::first<all_state_ids>::type type;
+};
+
+// returns the id of a given state
+template <class stt,class State>
+struct get_state_id
+{
+ typedef typename ::boost::mpl::at<typename generate_state_ids<stt>::type,State>::type type;
+ enum {value = type::value};
+};
+
+// returns a mpl::vector containing the init states of a state machine
+template <class States>
+struct get_initial_states
+{
+ typedef typename ::boost::mpl::if_<
+ ::boost::mpl::is_sequence<States>,
+ States,
+ typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,States>::type >::type type;
+};
+
+// returns a mpl::int_ containing the size of a region. If the argument is not a sequence, returns 1
+template <class region>
+struct get_number_of_regions
+{
+ typedef typename mpl::if_<
+ ::boost::mpl::is_sequence<region>,
+ ::boost::mpl::size<region>,
+ ::boost::mpl::int_<1> >::type type;
+};
+
+// builds a mpl::vector of initial states
+template <class region>
+struct get_regions_as_sequence
+{
+ typedef typename ::boost::mpl::if_<
+ ::boost::mpl::is_sequence<region>,
+ region,
+ typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,region>::type >::type type;
+};
+
+template <class ToCreateSeq>
+struct get_explicit_creation_as_sequence
+{
+ typedef typename ::boost::mpl::if_<
+ ::boost::mpl::is_sequence<ToCreateSeq>,
+ ToCreateSeq,
+ typename ::boost::mpl::push_back< ::boost::mpl::vector0<>,ToCreateSeq>::type >::type type;
+};
+
+// returns true if 2 transitions have the same source (used to remove duplicates in search of composite states)
+template <class stt,class Transition1,class Transition2>
+struct have_same_source
+{
+ enum {current_state1 = get_state_id<stt,typename Transition1::current_state_type >::type::value};
+ enum {current_state2 = get_state_id<stt,typename Transition2::current_state_type >::type::value};
+ enum {value = ((int)current_state1 == (int)current_state2) };
+};
+
+
+// A metafunction that returns the Event associated with a transition.
+template <class Transition>
+struct transition_event
+{
+ typedef typename Transition::Event type;
+};
+
+// returns true for composite states
+template <class State>
+struct is_composite_state
+{
+ enum {value = has_composite_tag<State>::type::value};
+ typedef typename has_composite_tag<State>::type type;
+};
+
+// transform a transition table in a container of source states
+template <class stt>
+struct keep_source_names
+{
+ // instead of the rows we want only the names of the states (from source)
+ typedef typename
+ ::boost::mpl::transform<
+ stt,transition_source_type< ::boost::mpl::placeholders::_1> >::type type;
+};
+
+// transform a transition table in a container of target states
+template <class stt>
+struct keep_target_names
+{
+ // instead of the rows we want only the names of the states (from source)
+ typedef typename
+ ::boost::mpl::transform<
+ stt,transition_target_type< ::boost::mpl::placeholders::_1> >::type type;
+};
+
+template <class stt>
+struct generate_state_set
+{
+ // keep in the original transition table only the source/target state types
+ typedef typename keep_source_names<stt>::type sources;
+ typedef typename keep_target_names<stt>::type targets;
+ typedef typename
+ ::boost::mpl::fold<
+ sources, ::boost::mpl::set<>,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>
+ >::type source_set;
+ typedef typename
+ ::boost::mpl::fold<
+ targets,source_set,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>
+ >::type type;
+};
+
+// iterates through the transition table and generate a mpl::set<> containing all the events
+template <class stt>
+struct generate_event_set
+{
+ typedef typename
+ ::boost::mpl::fold<
+ stt, ::boost::mpl::set<>,
+ ::boost::mpl::if_<
+ ::boost::mpl::has_key< ::boost::mpl::placeholders::_1,
+ transition_event< ::boost::mpl::placeholders::_2> >,
+ ::boost::mpl::placeholders::_1,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1,
+ transition_event< ::boost::mpl::placeholders::_2> > >
+ >::type type;
+};
+
+// returns a mpl::bool_<true> if State has Event as delayed event
+template <class State, class Event>
+struct has_state_delayed_event
+{
+ typedef typename ::boost::mpl::find<typename State::deferred_events,Event>::type found;
+ typedef typename ::boost::mpl::if_<
+ ::boost::is_same<found,typename ::boost::mpl::end<typename State::deferred_events>::type >,
+ ::boost::mpl::bool_<false>,
+ ::boost::mpl::bool_<true> >::type type;
+};
+// returns a mpl::bool_<true> if State has any delayed event
+template <class State>
+struct has_state_delayed_events
+{
+ typedef typename ::boost::mpl::if_<
+ ::boost::mpl::empty<typename State::deferred_events>,
+ ::boost::mpl::bool_<false>,
+ ::boost::mpl::bool_<true> >::type type;
+};
+
+// Template used to create dummy entries for initial states not found in the stt.
+template< typename T1 >
+struct not_a_row
+{
+ typedef int not_real_row_tag;
+ struct dummy_event
+ {
+ };
+ typedef T1 current_state_type;
+ typedef T1 next_state_type;
+ typedef dummy_event Event;
+};
+
+// metafunctions used to find out if a state is entry, exit or something else
+template <class State>
+struct is_pseudo_entry
+{
+ typedef typename ::boost::mpl::if_< typename has_pseudo_entry<State>::type,
+ ::boost::mpl::bool_<true>,::boost::mpl::bool_<false>
+ >::type type;
+};
+// says if a state is an exit pseudo state
+template <class State>
+struct is_pseudo_exit
+{
+ typedef typename ::boost::mpl::if_< typename has_pseudo_exit<State>::type,
+ ::boost::mpl::bool_<true>, ::boost::mpl::bool_<false>
+ >::type type;
+};
+// says if a state is an exit pseudo state
+template <class State>
+struct is_direct_entry
+{
+ typedef typename ::boost::mpl::if_< typename has_explicit_entry_state<State>::type,
+ ::boost::mpl::bool_<true>, ::boost::mpl::bool_<false>
+ >::type type;
+};
+
+//converts a "fake" (simulated in a state_machine_ description )state into one which will really get created
+template <class StateType,class CompositeType>
+struct convert_fake_state
+{
+ // converts a state (explicit entry) into the state we really are going to create (explicit<>)
+ typedef typename ::boost::mpl::if_<
+ typename is_direct_entry<StateType>::type,
+ typename CompositeType::template direct<StateType>,
+ typename ::boost::mpl::identity<StateType>::type
+ >::type type;
+};
+
+template <class StateType>
+struct get_explicit_creation
+{
+ typedef typename StateType::explicit_creation type;
+};
+
+template <class Derived>
+struct create_stt
+{
+ //typedef typename Derived::transition_table stt;
+ typedef typename Derived::real_transition_table Stt;
+ // get the state set
+ typedef typename generate_state_set<Stt>::type states;
+ // transform the initial region(s) in a sequence
+ typedef typename get_regions_as_sequence<typename Derived::initial_state>::type init_states;
+ // iterate through the initial states and add them in the stt if not already there
+ typedef typename
+ ::boost::mpl::fold<
+ init_states,Stt,
+ ::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>,
+ not_a_row< ::boost::mpl::placeholders::_2 > >
+ >
+ >::type with_init;
+ // do the same for states marked as explicitly created
+ typedef typename get_explicit_creation_as_sequence<
+ typename ::boost::mpl::eval_if<
+ typename has_explicit_creation<Derived>::type,
+ get_explicit_creation<Derived>,
+ ::boost::mpl::vector0<> >::type
+ >::type fake_explicit_created;
+
+ typedef typename
+ ::boost::mpl::transform<
+ fake_explicit_created,convert_fake_state< ::boost::mpl::placeholders::_1,Derived> >::type explicit_created;
+
+ typedef typename
+ ::boost::mpl::fold<
+ explicit_created,with_init,
+ ::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>,
+ not_a_row< ::boost::mpl::placeholders::_2 > >
+ >
+ >::type type;
+};
+
+// returns the transition table of a Composite state
+template <class Composite>
+struct get_transition_table
+{
+ typedef typename create_stt<Composite>::type type;
+};
+// recursively get a transition table for a given composite state.
+// returns the transition table for this state + the tables of all composite sub states recursively
+template <class Composite>
+struct recursive_get_transition_table
+{
+ // get the transition table of the state if it's a state machine
+ typedef typename ::boost::mpl::eval_if<typename is_composite_state<Composite>::type,
+ get_transition_table<Composite>,
+ ::boost::mpl::vector0<> >::type org_table;
+
+ typedef typename generate_state_set<org_table>::type states;
+
+ // and for every substate, recursively get the transition table if it's a state machine
+ typedef typename ::boost::mpl::fold<
+ states,org_table,
+ ::boost::mpl::insert_range< ::boost::mpl::placeholders::_1, ::boost::mpl::end<mpl::placeholders::_1>,
+ recursive_get_transition_table< ::boost::mpl::placeholders::_2 > >
+ >::type type;
+
+};
+
+// metafunction used to say if a SM has pseudo exit states
+template <class Derived>
+struct has_fsm_delayed_events
+{
+ typedef typename create_stt<Derived>::type Stt;
+ typedef typename generate_state_set<Stt>::type state_list;
+
+ typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
+ state_list,has_state_delayed_events< ::boost::mpl::placeholders::_1 > >::value != 0> type;
+};
+
+// returns a mpl::bool_<true> if State has any delayed event
+template <class Event>
+struct is_automatic_event
+{
+ typedef typename ::boost::mpl::if_<
+ has_automatic_event<Event>,
+ ::boost::mpl::bool_<true>,
+ ::boost::mpl::bool_<false> >::type type;
+};
+// metafunction used to say if a SM has eventless transitions
+template <class Derived>
+struct has_fsm_eventless_transition
+{
+ typedef typename create_stt<Derived>::type Stt;
+ typedef typename generate_event_set<Stt>::type event_list;
+
+ typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
+ event_list,is_automatic_event< ::boost::mpl::placeholders::_1 > >::value != 0> type;
+};
+template <class Derived>
+struct find_automatic_events
+{
+ typedef typename create_stt<Derived>::type Stt;
+ typedef typename generate_event_set<Stt>::type event_list;
+
+ typedef typename ::boost::mpl::fold<
+ event_list, ::boost::mpl::set<>,
+ ::boost::mpl::if_<
+ is_automatic_event< ::boost::mpl::placeholders::_2>,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >,
+ ::boost::mpl::placeholders::_1 >
+ >::type type;
+};
+
+template <class Transition>
+struct make_vector
+{
+ typedef ::boost::mpl::vector<Transition> type;
+};
+template< typename Entry >
+struct get_first_element_pair_second
+{
+ typedef typename ::boost::mpl::front<typename Entry::second>::type type;
+};
+
+ //returns the owner of an explicit_entry state
+ //which is the containing SM if the transition originates from outside the containing SM
+ //or else the explicit_entry state itself
+template <class State,class ContainingSM>
+struct get_owner
+{
+ typedef typename ::boost::mpl::if_<
+ typename ::boost::mpl::not_<typename ::boost::is_same<typename State::owner,
+ ContainingSM >::type>::type,
+ typename State::owner,
+ State >::type type;
+};
+
+template <class Sequence,class ContainingSM>
+struct get_fork_owner
+{
+ typedef typename ::boost::mpl::front<Sequence>::type seq_front;
+ typedef typename ::boost::mpl::if_<
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<typename seq_front::owner,ContainingSM>::type>::type,
+ typename seq_front::owner,
+ seq_front >::type type;
+};
+
+template <class StateType,class ContainingSM>
+struct make_exit
+{
+ typedef typename ::boost::mpl::if_<
+ typename is_pseudo_exit<StateType>::type ,
+ typename ContainingSM::template exit_pt<StateType>,
+ typename ::boost::mpl::identity<StateType>::type
+ >::type type;
+};
+
+template <class StateType,class ContainingSM>
+struct make_entry
+{
+ typedef typename ::boost::mpl::if_<
+ typename is_pseudo_entry<StateType>::type ,
+ typename ContainingSM::template entry_pt<StateType>,
+ typename ::boost::mpl::if_<
+ typename is_direct_entry<StateType>::type,
+ typename ContainingSM::template direct<StateType>,
+ typename ::boost::mpl::identity<StateType>::type
+ >::type
+ >::type type;
+};
+// metafunction used to say if a SM has pseudo exit states
+template <class StateType>
+struct has_exit_pseudo_states_helper
+{
+ typedef typename StateType::stt Stt;
+ typedef typename generate_state_set<Stt>::type state_list;
+
+ typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
+ state_list,is_pseudo_exit< ::boost::mpl::placeholders::_1> >::value != 0> type;
+};
+template <class StateType>
+struct has_exit_pseudo_states
+{
+ typedef typename ::boost::mpl::eval_if<typename is_composite_state<StateType>::type,
+ has_exit_pseudo_states_helper<StateType>,
+ ::boost::mpl::bool_<false> >::type type;
+};
+
+template <class StateType>
+struct is_state_blocking
+{
+ typedef typename ::boost::mpl::fold<
+ typename StateType::flag_list, ::boost::mpl::set<>,
+ ::boost::mpl::if_<
+ has_event_blocking_flag< ::boost::mpl::placeholders::_2>,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >,
+ ::boost::mpl::placeholders::_1 >
+ >::type blocking_flags;
+
+ typedef typename ::boost::mpl::if_<
+ ::boost::mpl::empty<blocking_flags>,
+ ::boost::mpl::bool_<false>,
+ ::boost::mpl::bool_<true> >::type type;
+};
+// returns a mpl::bool_<true> if fsm has an event blocking flag in one of its substates
+template <class StateType>
+struct has_fsm_blocking_states
+{
+ typedef typename create_stt<StateType>::type Stt;
+ typedef typename generate_state_set<Stt>::type state_list;
+
+ typedef typename ::boost::mpl::fold<
+ state_list, ::boost::mpl::set<>,
+ ::boost::mpl::if_<
+ is_state_blocking< ::boost::mpl::placeholders::_2>,
+ ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >,
+ ::boost::mpl::placeholders::_1 >
+ >::type blocking_states;
+
+ typedef typename ::boost::mpl::if_<
+ ::boost::mpl::empty<blocking_states>,
+ ::boost::mpl::bool_<false>,
+ ::boost::mpl::bool_<true> >::type type;
+};
+
+template <class StateType>
+struct is_no_exception_thrown
+{
+ typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
+ typename StateType::configuration,
+ has_no_exception_thrown< ::boost::mpl::placeholders::_1 > >::value != 0> found;
+
+ typedef typename ::boost::mpl::or_<
+ typename has_no_exception_thrown<StateType>::type,
+ found
+ >::type type;
+};
+
+template <class StateType>
+struct is_no_message_queue
+{
+ typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
+ typename StateType::configuration,
+ has_no_message_queue< ::boost::mpl::placeholders::_1 > >::value != 0> found;
+
+ typedef typename ::boost::mpl::or_<
+ typename has_no_message_queue<StateType>::type,
+ found
+ >::type type;
+};
+
+// 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
+typename ::boost::enable_if<typename ::boost::mpl::and_<typename is_composite_state<FSM>::type,
+ typename is_pseudo_exit<StateType>::type>,bool >::type
+is_exit_state_active(FSM& fsm)
+{
+ typedef typename OwnerFct::type Composite;
+ //typedef typename create_stt<Composite>::type stt;
+ typedef typename Composite::stt stt;
+ int state_id = get_state_id<stt,StateType>::type::value;
+ Composite& comp = fsm.template get_state<Composite&>();
+ return (std::find(comp.current_state(),comp.current_state()+Composite::nr_regions::value,state_id)
+ !=comp.current_state()+Composite::nr_regions::value);
+}
+template <class StateType,class OwnerFct,class FSM>
+inline
+typename ::boost::disable_if<typename ::boost::mpl::and_<typename is_composite_state<FSM>::type,
+ typename is_pseudo_exit<StateType>::type>,bool >::type
+is_exit_state_active(FSM& fsm)
+{
+ return false;
+}
+
+} } }//boost::msm::back
+
+#endif // BOOST_MSM_BACK_METAFUNCTIONS_H
+

Added: sandbox/msm/boost/msm/back/state_machine.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/state_machine.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,1712 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_STATEMACHINE_H
+#define BOOST_MSM_BACK_STATEMACHINE_H
+
+#include <vector>
+#include <queue>
+#include <functional>
+#include <numeric>
+#include <utility>
+
+#include <boost/mpl/contains.hpp>
+#include <boost/mpl/deref.hpp>
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/include/as_vector.hpp>
+#include <boost/fusion/include/as_set.hpp>
+#include <boost/fusion/container/set.hpp>
+#include <boost/fusion/include/set.hpp>
+#include <boost/fusion/include/set_fwd.hpp>
+#include <boost/fusion/include/mpl.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/include/at_key.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/fusion/include/for_each.hpp>
+
+#include <boost/assert.hpp>
+#include <boost/ref.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/bind.hpp>
+#include <boost/bind/apply.hpp>
+#include <boost/function.hpp>
+
+#include <boost/msm/row_tags.hpp>
+#include <boost/msm/back/metafunctions.hpp>
+#include <boost/msm/back/history_policies.hpp>
+#include <boost/msm/back/bind_helpers.hpp>
+#include <boost/msm/back/common_types.hpp>
+#include <boost/msm/back/args.hpp>
+#include <boost/msm/back/dispatch_table.hpp>
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(accept_sig)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(no_automatic_create)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(non_forwarding_flag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(direct_entry)
+
+namespace boost { namespace msm { namespace back
+{
+// event used internally for wrapping a direct entry
+template <class StateType,class Event>
+struct direct_entry_event
+{
+ typedef int direct_entry;
+ typedef StateType active_state;
+
+ direct_entry_event(Event const& evt):m_event(evt){}
+ Event const& m_event;
+};
+
+// This declares the statically-initialized dispatch_table instance.
+template <class Fsm,class Stt, class Event>
+const boost::msm::back::dispatch_table<Fsm,Stt, Event>
+dispatch_table<Fsm,Stt, Event>::instance;
+
+// library-containing class for state machines. Pass the actual FSM class as
+// the Concrete parameter.
+template<class Derived,class HistoryPolicy=NoHistory
+#ifdef BOOST_MSVC
+,class WorkaroundVC9=void
+#endif
+>
+class state_machine : public Derived
+{
+private:
+ typedef boost::msm::back::state_machine<Derived,
+ HistoryPolicy
+#ifdef BOOST_MSVC
+ ,WorkaroundVC9
+#endif
+ > library_sm;
+
+ typedef ::boost::function<
+ execute_return ()> transition_fct;
+ typedef ::boost::function<
+ execute_return () > deferred_fct;
+ typedef std::queue<deferred_fct > deferred_events_queue_t;
+ typedef std::queue<transition_fct > events_queue_t;
+ typedef bool (*flag_handler)(library_sm&);
+
+ // all state machines are friend with each other to allow embedding any of them in another fsm
+ template <class ,class
+#ifdef BOOST_MSVC
+ ,class
+#endif
+ > friend class boost::msm::back::state_machine;
+
+ // helper to add, if needed, visitors to all states
+ // version without visitors
+ template <class StateType,class Enable=void>
+ struct visitor_fct_helper
+ {
+ public:
+ visitor_fct_helper(){}
+ void fill_visitors(int)
+ {
+ }
+ template <class FCT>
+ void insert(int,FCT)
+ {
+ }
+ template <class VISITOR>
+ void execute(int,VISITOR)
+ {
+ }
+ };
+ // version with visitors
+ template <class StateType>
+ struct visitor_fct_helper<StateType,typename ::boost::enable_if<has_accept_sig<StateType> >::type>
+ {
+ public:
+ visitor_fct_helper():m_state_visitors(){}
+ void fill_visitors(int number_of_states)
+ {
+ m_state_visitors.resize(number_of_states);
+ }
+ template <class FCT>
+ void insert(int index,FCT fct)
+ {
+ m_state_visitors[index]=fct;
+ }
+ void execute(int index)
+ {
+ m_state_visitors[index]();
+ }
+
+#define MSM_VISITOR_HELPER_EXECUTE_SUB(z, n, unused) ARG ## n vis ## n
+#define MSM_VISITOR_HELPER_EXECUTE(z, n, unused) \
+ template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
+ void execute(int index BOOST_PP_COMMA_IF(n) \
+ BOOST_PP_ENUM(n, MSM_VISITOR_HELPER_EXECUTE_SUB, ~ ) ) \
+ { \
+ m_state_visitors[index](BOOST_PP_ENUM_PARAMS(n,vis)); \
+ }
+ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_HELPER_EXECUTE, ~)
+#undef MSM_VISITOR_HELPER_EXECUTE
+#undef MSM_VISITOR_HELPER_EXECUTE_SUB
+ private:
+ typedef typename StateType::accept_sig::type visitor_fct;
+ typedef std::vector<visitor_fct> visitors;
+
+ visitors m_state_visitors;
+ };
+
+ public:
+ // tags
+ typedef int composite_tag;
+
+ // in case someone needs to know
+ typedef HistoryPolicy history_policy;
+
+ struct InitEvent { };
+ // flag handling
+ struct Flag_AND
+ {
+ typedef std::logical_and<bool> type;
+ };
+ struct Flag_OR
+ {
+ typedef std::logical_or<bool> type;
+ };
+ typedef typename Derived::BaseAllStates BaseState;
+ typedef Derived ConcreteSM;
+
+ template <class ExitPoint>
+ struct exit_pt : public ExitPoint
+ {
+ // tags
+ typedef ExitPoint wrapped_exit;
+ typedef int pseudo_exit;
+ typedef library_sm owner;
+ typedef int no_automatic_create;
+ typedef typename
+ ExitPoint::event Event;
+ typedef ::boost::function<execute_return (Event const&)>
+ forwarding_function;
+ // forward event to the higher-level FSM
+ template <class ForwardEvent>
+ void forward_event(ForwardEvent const& incomingEvent)
+ {
+ // use helper to forward or not
+ ForwardHelper< ::boost::is_convertible<ForwardEvent,Event>::value>::helper(incomingEvent,m_forward);
+ }
+ void set_forward_fct(::boost::function<execute_return (Event const&)> fct)
+ {
+ m_forward = fct;
+ }
+ exit_pt():m_forward(){}
+ // by assignments, we keep our forwarding functor unchanged as our containing SM did not change
+ template <class RHS>
+ exit_pt(RHS& rhs):m_forward(){}
+ exit_pt<ExitPoint>& operator= (const exit_pt<ExitPoint>& )
+ {
+ return *this;
+ }
+ private:
+ forwarding_function m_forward;
+
+ // using partial specialization instead of enable_if because of VC8 bug
+ template <bool OwnEvent, int Dummy=0>
+ struct ForwardHelper
+ {
+ template <class ForwardEvent>
+ static void helper(ForwardEvent const& ,forwarding_function& )
+ {
+ // Not our event, ignore
+ }
+ };
+ template <int Dummy>
+ struct ForwardHelper<true,Dummy>
+ {
+ template <class ForwardEvent>
+ static void helper(ForwardEvent const& incomingEvent,forwarding_function& forward_fct)
+ {
+ // call if handler set, if not, this state is simply a terminate state
+ if (forward_fct)
+ forward_fct(incomingEvent);
+ }
+ };
+
+ };
+ template <class EntryPoint>
+ struct entry_pt : public EntryPoint
+ {
+ // tags
+ typedef EntryPoint wrapped_exit;
+ typedef int pseudo_entry;
+ typedef library_sm owner;
+ typedef int no_automatic_create;
+ };
+ template <class EntryPoint>
+ struct direct : public EntryPoint
+ {
+ // tags
+ typedef EntryPoint wrapped_entry;
+ typedef int explicit_entry_state;
+ typedef library_sm owner;
+ typedef int no_automatic_create;
+ };
+ typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
+ // Template used to form rows in the transition table
+ template<
+ typename ROW
+ >
+ struct row_
+ {
+ //typedef typename ROW::Source T1;
+ typedef typename make_entry<typename ROW::Source,library_sm>::type T1;
+ typedef typename make_exit<typename ROW::Target,library_sm>::type T2;
+ typedef typename ROW::Evt Event;
+ // if the source has no automatic creation (i.e. is an exit pseudo state), then
+ // current_state_type becomes the result of get_owner
+ // meaning the containing SM from which the exit occurs
+ typedef typename ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T1>::type,
+ get_owner<T1,library_sm>,
+ ::boost::mpl::identity<T1> >::type current_state_type;
+
+ // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
+ // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
+ // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
+ typedef typename ::boost::mpl::eval_if<
+ typename ::boost::mpl::is_sequence<T2>::type,
+ get_fork_owner<T2,library_sm>,
+ ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T2>::type,
+ get_owner<T2,library_sm>,
+ ::boost::mpl::identity<T2> >
+ >::type next_state_type;
+
+ // if a guard condition is here, call it to check that the event is accepted
+ static bool check_guard(library_sm& fsm,Event const& evt)
+ {
+ if ( ROW::guard_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)) )
+ return true;
+ return false;
+ }
+ // Take the transition action and return the next state.
+ static std::pair<int,HandledEnum> execute(library_sm& fsm, int state, Event const& evt)
+ {
+
+ BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
+ BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
+ BOOST_ASSERT(state == (current_state));
+ // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
+ if (!::boost::is_same<T1,current_state_type>::value &&
+ !is_exit_state_active<T1,get_owner<T1,library_sm> >(fsm))
+ {
+ return std::make_pair(current_state,HANDLED_FALSE);
+ }
+ if (!check_guard(fsm,evt))
+ {
+ // guard rejected the event, we stay in the current one
+ return std::make_pair(current_state,HANDLED_GUARD_REJECT);
+ }
+
+ // the guard condition has already been checked
+ execute_exit<current_state_type>
+ (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),evt,fsm);
+
+ // then call the action method
+ 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) );
+
+ // and finally the entry method of the new current state
+ convert_event_and_execute_entry<next_state_type,T2>
+ (::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),evt,fsm);
+ return std::make_pair(next_state,HANDLED_TRUE);
+ }
+ };
+
+ // row having only a guard condition
+ template<
+ typename ROW
+ >
+ struct g_row_
+ {
+ //typedef typename ROW::Source T1;
+ typedef typename make_entry<typename ROW::Source,library_sm>::type T1;
+ typedef typename make_exit<typename ROW::Target,library_sm>::type T2;
+ typedef typename ROW::Evt Event;
+ // if the source has no automatic creation (i.e. is an exit pseudo state), then
+ // current_state_type becomes the result of get_owner
+ // meaning the containing SM from which the exit occurs
+ typedef typename ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T1>::type,
+ get_owner<T1,library_sm>,
+ ::boost::mpl::identity<T1> >::type current_state_type;
+
+ // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
+ // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
+ // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
+ typedef typename ::boost::mpl::eval_if<
+ typename ::boost::mpl::is_sequence<T2>::type,
+ get_fork_owner<T2,library_sm>,
+ ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T2>::type,
+ get_owner<T2,library_sm>,
+ ::boost::mpl::identity<T2> >
+ >::type next_state_type;
+
+ // if a guard condition is defined, call it to check that the event is accepted
+ static bool check_guard(library_sm& fsm,Event const& evt)
+ {
+ if ( ROW::guard_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)) )
+ return true;
+ return false;
+ }
+ // Take the transition action and return the next state.
+ static std::pair<int,HandledEnum> execute(library_sm& fsm, int state, Event const& evt)
+ {
+ BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
+ BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
+ BOOST_ASSERT(state == (current_state));
+ // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
+ if (!::boost::is_same<T1,current_state_type>::value &&
+ !is_exit_state_active<T1,get_owner<T1,library_sm> >(fsm))
+ {
+ return std::make_pair(current_state,HANDLED_FALSE);
+ }
+ if (!check_guard(fsm,evt))
+ {
+ // guard rejected the event, we stay in the current one
+ return std::make_pair(current_state,HANDLED_GUARD_REJECT);
+ }
+ // the guard condition has already been checked
+ execute_exit<current_state_type>
+ (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),evt,fsm);
+
+ // and finally the entry method of the new current state
+ convert_event_and_execute_entry<next_state_type,T2>
+ (::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),evt,fsm);
+
+ return std::make_pair(next_state,HANDLED_TRUE);
+ }
+ };
+
+ // row having only an action method
+ template<
+ typename ROW
+ >
+ struct a_row_
+ {
+ //typedef typename ROW::Source T1;
+ typedef typename make_entry<typename ROW::Source,library_sm>::type T1;
+ typedef typename make_exit<typename ROW::Target,library_sm>::type T2;
+ typedef typename ROW::Evt Event;
+ // if the source has no automatic creation (i.e. is an exit pseudo state), then
+ // current_state_type becomes the result of get_owner
+ // meaning the containing SM from which the exit occurs
+ typedef typename ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T1>::type,
+ get_owner<T1,library_sm>,
+ ::boost::mpl::identity<T1> >::type current_state_type;
+
+ // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
+ // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
+ // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
+ typedef typename ::boost::mpl::eval_if<
+ typename ::boost::mpl::is_sequence<T2>::type,
+ get_fork_owner<T2,library_sm>,
+ ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T2>::type,
+ get_owner<T2,library_sm>,
+ ::boost::mpl::identity<T2> >
+ >::type next_state_type;
+
+ // Take the transition action and return the next state.
+ static std::pair<int,HandledEnum> execute(library_sm& fsm, int state, Event const& evt)
+ {
+ BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
+ BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
+ BOOST_ASSERT(state == (current_state));
+
+ // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
+ if (!::boost::is_same<T1,current_state_type>::value &&
+ !is_exit_state_active<T1,get_owner<T1,library_sm> >(fsm))
+ {
+ return std::make_pair(current_state,HANDLED_FALSE);
+ }
+ // no need to check the guard condition
+ // first call the exit method of the current state
+ execute_exit<current_state_type>
+ (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),evt,fsm);
+
+ // then call the action method
+ 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) );
+
+ // and finally the entry method of the new current state
+ convert_event_and_execute_entry<next_state_type,T2>
+ (::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),evt,fsm);
+
+ return std::make_pair(next_state,HANDLED_TRUE);
+ }
+ };
+
+ // row having no guard condition or action, simply transitions
+ template<
+ typename ROW
+ >
+ struct _row_
+ {
+ //typedef typename ROW::Source T1;
+ typedef typename make_entry<typename ROW::Source,library_sm>::type T1;
+ typedef typename make_exit<typename ROW::Target,library_sm>::type T2;
+ typedef typename ROW::Evt Event;
+ // if the source has no automatic creation (i.e. is an exit pseudo state), then
+ // current_state_type becomes the result of get_owner
+ // meaning the containing SM from which the exit occurs
+ typedef typename ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T1>::type,
+ get_owner<T1,library_sm>,
+ ::boost::mpl::identity<T1> >::type current_state_type;
+
+ // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
+ // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
+ // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
+ typedef typename ::boost::mpl::eval_if<
+ typename ::boost::mpl::is_sequence<T2>::type,
+ get_fork_owner<T2,library_sm>,
+ ::boost::mpl::eval_if<
+ typename has_no_automatic_create<T2>::type,
+ get_owner<T2,library_sm>,
+ ::boost::mpl::identity<T2> >
+ >::type next_state_type;
+
+ // Take the transition action and return the next state.
+ static std::pair<int,HandledEnum> execute(library_sm& fsm, int state, Event const& evt)
+ {
+ BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
+ BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
+ BOOST_ASSERT(state == (current_state));
+
+ // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
+ if (!::boost::is_same<T1,current_state_type>::value &&
+ !is_exit_state_active<T1,get_owner<T1,library_sm> >(fsm))
+ {
+ return std::make_pair(current_state,HANDLED_FALSE);
+ }
+ // first call the exit method of the current state
+ execute_exit<current_state_type>
+ (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list),evt,fsm);
+
+ // and finally the entry method of the new current state
+ convert_event_and_execute_entry<next_state_type,T2>
+ (::boost::fusion::at_key<next_state_type>(fsm.m_substate_list),evt,fsm);
+
+ return std::make_pair(next_state,HANDLED_TRUE);
+ }
+ };
+
+ // Template used to form forwarding rows in the transition table for every row of a composite SM
+ template<
+ typename T1
+ , class Evt
+ >
+ struct frow
+ {
+ typedef T1 current_state_type;
+ typedef T1 next_state_type;
+ typedef Evt Event;
+
+ // Take the transition action and return the next state.
+ static std::pair<int,HandledEnum> execute(library_sm& fsm, int state, Event const& evt)
+ {
+ execute_return res =
+ (::boost::fusion::at_key<current_state_type>(fsm.m_substate_list)).process_event(evt);
+ return std::make_pair(get_state_id<stt,T1>::type::value,res);
+ }
+ };
+ template <class Composite,class Event>
+ struct make_frow
+ {
+ typedef frow<Composite,Event> type;
+ };
+
+ template <class Tag, class Transition,int Dummy=0>
+ struct create_backend_stt
+ {
+ };
+ template <class Transition,int Dummy>
+ struct create_backend_stt<g_row_tag,Transition,Dummy>
+ {
+ typedef g_row_<Transition> type;
+ };
+ template <class Transition,int Dummy>
+ struct create_backend_stt<a_row_tag,Transition,Dummy>
+ {
+ typedef a_row_<Transition> type;
+ };
+ template <class Transition,int Dummy>
+ struct create_backend_stt<_row_tag,Transition,Dummy>
+ {
+ typedef _row_<Transition> type;
+ };
+ template <class Transition,int Dummy>
+ struct create_backend_stt<row_tag,Transition,Dummy>
+ {
+ typedef row_<Transition> type;
+ };
+ template <class Transition>
+ struct make_row_tag
+ {
+ typedef typename create_backend_stt<typename Transition::row_type_tag,Transition>::type type;
+ };
+
+ // add to the stt the initial states which could be missing (if not being involved in a transition)
+ template <class BaseType>
+ struct create_real_stt
+ {
+ typedef typename BaseType::transition_table stt_simulated;
+ typedef typename ::boost::mpl::fold<
+ stt_simulated,mpl::vector0<>,
+ ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
+ make_row_tag< ::boost::mpl::placeholders::_2> >
+ >::type type;
+ };
+
+ // gets the transition table from a composite and make from it a forwarding row
+ template <class Composite>
+ struct get_transition_table_as_frow
+ {
+ // first get the table of a composite
+ typedef typename recursive_get_transition_table<Composite>::type original_table;
+ // and add for every event a forwarding row
+ typedef typename generate_event_set<original_table>::type all_events;
+ typedef typename ::boost::mpl::fold<
+ all_events, ::boost::mpl::vector0<>,
+ ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
+ frow<Composite, ::boost::mpl::placeholders::_2> > >::type type;
+ };
+ typedef typename create_real_stt<Derived>::type real_transition_table;
+ typedef typename create_stt<library_sm>::type stt;
+ typedef typename get_initial_states<typename Derived::initial_state>::type initial_states;
+ typedef typename generate_state_set<stt>::type state_list;
+ typedef typename HistoryPolicy::template apply<nr_regions::value>::type concrete_history;
+
+ typedef typename ::boost::fusion::result_of::as_set<state_list>::type substate_list;
+
+ // extends the transition table with rows from composite states
+ template <class Composite>
+ struct extend_table
+ {
+ // add the init states
+ //typedef typename create_stt<Composite>::type stt;
+ typedef typename Composite::stt Stt;
+ // for every state, add its transition table (if any)
+ // transformed as frow
+ typedef typename ::boost::mpl::fold<state_list,Stt,
+ ::boost::mpl::insert_range< ::boost::mpl::placeholders::_1,
+ ::boost::mpl::end< ::boost::mpl::placeholders::_1>,
+ get_transition_table_as_frow< ::boost::mpl::placeholders::_2> >
+ >::type type;
+ };
+ // extend the table with tables from composite states
+ typedef typename extend_table<library_sm>::type complete_table;
+ // build a sequence of regions
+ typedef typename get_regions_as_sequence<typename Derived::initial_state>::type seq_initial_states;
+ // Member functions
+
+ // start the state machine (calls entry of the initial state)
+ void start()
+ {
+ // call on_entry on this SM
+ (static_cast<Derived*>(this))->on_entry(InitEvent(),*this);
+ ::boost::mpl::for_each<initial_states, boost::msm::back::wrap<mpl::placeholders::_1> >
+ (call_init<InitEvent>(InitEvent(),this));
+ // give a chance to handle an anonymous (eventless) transition
+ handle_eventless_transitions_helper<library_sm> eventless_helper(this,true);
+ eventless_helper.process_automatic_event();
+
+ }
+
+ // Main function used by clients of the derived FSM to make
+ // transitions. Can also be called for internally (for example in an action method) generated events.
+ template<class Event>
+ execute_return process_event(Event const& evt)
+ {
+ // use this table as if it came directly from the user
+ typedef dispatch_table<library_sm,complete_table,Event> table;
+
+ HandledEnum ret_handled=HANDLED_FALSE;
+ // if the state machine has terminate or interrupt flags, check them, otherwise skip
+ if (is_event_handling_blocked_helper<library_sm,Event>())
+ return HANDLED_TRUE;
+ // if a message queue is needed and processing is on the way
+ if (!do_pre_msg_queue_helper<library_sm,Event>(evt))
+ {
+ // wait for the end of current processing
+ return HANDLED_TRUE;
+ }
+ else
+ {
+
+ // prepare the next deferred event for handling
+ // if one defer is found in the SM, otherwise skip
+ handle_defer_helper<library_sm> defer_helper(m_deferred_events_queue);
+ defer_helper.do_pre_handle_deferred();
+ // process event
+ bool handled = this->do_process_helper<library_sm,Event>(evt);
+ if (handled)
+ {
+ ret_handled = HANDLED_TRUE;
+ }
+ // after handling, take care of the deferred events
+ defer_helper.do_post_handle_deferred();
+
+ // now check if some events were generated in a transition and was not handled
+ // because of another processing, and if yes, start handling them
+ do_post_msg_queue_helper<library_sm>();
+
+ // event can be handled, processing
+ // handle with lowest priority event-less transitions
+ handle_eventless_transitions_helper<library_sm> eventless_helper(this,handled);
+ eventless_helper.process_automatic_event();
+
+ return ret_handled;
+ }
+ }
+
+ // Getter that returns the current state of the FSM
+ const int* current_state() const
+ {
+ return this->m_states;
+ }
+
+ // linearly search for the state with the given id
+ struct get_state_id_helper
+ {
+ get_state_id_helper(int id,const BaseState** res,const library_sm* self_):
+ result_state(res),searched_id(id),self(self_) {}
+
+ template <class StateType>
+ void operator()(boost::msm::back::wrap<StateType> const&)
+ {
+ // look for the state id until found
+ BOOST_STATIC_CONSTANT(int, id = (get_state_id<stt,StateType>::value));
+ if (!*result_state && (id == searched_id))
+ {
+ *result_state = &::boost::fusion::at_key<StateType>(self->m_substate_list);
+ }
+ }
+ const BaseState** result_state;
+ int searched_id;
+ const library_sm* self;
+ };
+ // 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
+ {
+ const BaseState* result_state=0;
+ ::boost::mpl::for_each<state_list,
+ ::boost::msm::back::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
+ bool is_contained() const
+ {
+ return m_is_included;
+ }
+ // get a state
+ // as a pointer
+ template <class State>
+ typename ::boost::enable_if<typename ::boost::is_pointer<State>::type,State >::type
+ get_state(::boost::msm::back::dummy<0> = 0)
+ {
+ return &(static_cast<typename boost::add_reference<typename ::boost::remove_pointer<State>::type>::type >
+ (::boost::fusion::at_key<typename ::boost::remove_pointer<State>::type>(m_substate_list)));
+ }
+ // as a reference
+ template <class State>
+ typename ::boost::enable_if<typename ::boost::is_reference<State>::type,State >::type
+ get_state(::boost::msm::back::dummy<1> = 0)
+ {
+ return ::boost::fusion::at_key<typename ::boost::remove_reference<State>::type>(m_substate_list);
+ }
+
+ // checks if a flag is active using the BinaryOp as folding function
+ template <class Flag,class BinaryOp>
+ bool is_flag_active()
+ {
+ flag_handler* flags_entries = get_entries_for_flag<Flag>();
+
+ return std::accumulate(m_states,
+ m_states+nr_regions::value,false,
+ ::boost::bind(typename BinaryOp::type(),
+ ::boost::bind(::boost::apply<bool>(),
+ ::boost::bind(::boost::msm::back::deref<flag_handler>(),
+ ::boost::bind(::boost::msm::back::plus2<flag_handler*,int>(),
+ flags_entries, _2)),
+ ::boost::ref(*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()
+ {
+ return FlagHelper<Flag,(nr_regions::value>1)>::helper(*this,get_entries_for_flag<Flag>());
+ }
+ // visit the currently active states (if these are defined as visitable
+ // by implementing accept)
+ void visit_current_states()
+ {
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ m_visitors.execute(m_states[i]);
+ }
+ }
+#define MSM_VISIT_STATE_SUB(z, n, unused) ARG ## n vis ## n
+#define MSM_VISIT_STATE_EXECUTE(z, n, unused) \
+ template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
+ void visit_current_states(BOOST_PP_ENUM(n, MSM_VISIT_STATE_SUB, ~ ) ) \
+ { \
+ for (int i=0; i<nr_regions::value;++i) \
+ { \
+ m_visitors.execute(m_states[i],BOOST_PP_ENUM_PARAMS(n,vis)); \
+ } \
+ }
+ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISIT_STATE_EXECUTE, ~)
+#undef MSM_VISIT_STATE_EXECUTE
+#undef MSM_VISIT_STATE_SUB
+
+ protected: // interface for the derived class
+
+ // helper used to fill the initial states
+ struct init_states
+ {
+ init_states(int* const init):m_initial_states(init),m_index(-1){}
+
+ // History initializer function object, used with mpl::for_each
+ template <class State>
+ void operator()(::boost::msm::back::wrap<State> const&)
+ {
+ m_initial_states[++m_index]=get_state_id<stt,State>::type::value;
+ }
+ int* const m_initial_states;
+ int m_index;
+ };
+ public:
+ // Construct with the default initial states
+ state_machine<Derived,HistoryPolicy
+#ifdef BOOST_MSVC
+ ,WorkaroundVC9
+#endif
+ >()
+ :Derived()
+ ,m_events_queue()
+ ,m_deferred_events_queue()
+ ,m_history()
+ ,m_event_processing(false)
+ ,m_is_included(false)
+ ,m_visitors()
+ ,m_substate_list()
+ {
+ // initialize our list of states with the ones defined in Derived::initial_state
+ ::boost::mpl::for_each< seq_initial_states, ::boost::msm::back::wrap<mpl::placeholders::_1> >
+ (init_states(m_states));
+ m_history.set_initial_states(m_states);
+ // create states
+ fill_states(this);
+ }
+
+ // assignment operator using the copy policy to decide if non_copyable, shallow or deep copying is necessary
+ library_sm& operator= (library_sm const& rhs)
+ {
+ if (this != &rhs)
+ {
+ Derived::operator=(rhs);
+ // initialize our list of states with the ones defined in Derived::initial_state
+ fill_states(this);
+ do_copy(rhs);
+ }
+ return *this;
+ }
+ state_machine<Derived,HistoryPolicy
+#ifdef BOOST_MSVC
+ ,WorkaroundVC9
+#endif
+ >
+ (library_sm const& rhs)
+ : Derived(rhs)
+ {
+ if (this != &rhs)
+ {
+ // initialize our list of states with the ones defined in Derived::initial_state
+ fill_states(this);
+ do_copy(rhs);
+ }
+ }
+
+ // the following 2 functions handle the terminate/interrupt states handling
+ // if one of these states is found, the first one is used
+ template <class StateType,class Event>
+ typename ::boost::enable_if<typename has_fsm_blocking_states<StateType>::type,bool >::type
+ is_event_handling_blocked_helper( ::boost::msm::back::dummy<0> = 0)
+ {
+ // if the state machine is terminated, do not handle any event
+ if (is_flag_active< ::boost::msm::TerminateFlag>())
+ return true;
+ // if the state machine is interrupted, do not handle any event
+ // unless the event is the end interrupt event
+ if ( is_flag_active< ::boost::msm::InterruptedFlag>() &&
+ !is_flag_active< ::boost::msm::EndInterruptFlag<Event> >())
+ return true;
+ return false;
+ }
+ // otherwise simple handling, no flag => continue
+ template <class StateType,class Event>
+ typename ::boost::disable_if<typename has_fsm_blocking_states<StateType>::type,bool >::type
+ is_event_handling_blocked_helper( ::boost::msm::back::dummy<1> = 0)
+ {
+ // no terminate/interrupt states detected
+ return false;
+ }
+ // the following functions handle pre/post-process handling of a message queue
+ template <class StateType,class EventType>
+ typename ::boost::enable_if<typename is_no_message_queue<StateType>::type,bool >::type
+ do_pre_msg_queue_helper(EventType const& evt, ::boost::msm::back::dummy<0> = 0)
+ {
+ // no message queue needed
+ return true;
+ }
+ template <class StateType,class EventType>
+ typename ::boost::disable_if<typename is_no_message_queue<StateType>::type,bool >::type
+ do_pre_msg_queue_helper(EventType const& evt, ::boost::msm::back::dummy<1> = 0)
+ {
+ execute_return (library_sm::*pf) (EventType const& evt) =
+ &library_sm::process_event;
+ // if we are already processing an event
+ if (m_event_processing)
+ {
+ // event has to be put into the queue
+ transition_fct f = ::boost::bind(pf,this,evt);
+ m_events_queue.push(f);
+ return false;
+ }
+ // event can be handled, processing
+ m_event_processing = true;
+ return true;
+ }
+ template <class StateType>
+ typename ::boost::enable_if<typename is_no_message_queue<StateType>::type,void >::type
+ do_post_msg_queue_helper( ::boost::msm::back::dummy<0> = 0)
+ {
+ // no message queue needed
+ }
+ template <class StateType>
+ typename ::boost::disable_if<typename is_no_message_queue<StateType>::type,void >::type
+ do_post_msg_queue_helper( ::boost::msm::back::dummy<1> = 0)
+ {
+ m_event_processing = false;
+ process_message_queue();
+ }
+ // the following 2 functions handle the processing either with a try/catch protection or without
+ template <class StateType,class EventType>
+ typename ::boost::enable_if<typename is_no_exception_thrown<StateType>::type,bool >::type
+ do_process_helper(EventType const& evt, ::boost::msm::back::dummy<0> = 0)
+ {
+ return this->do_process_event(evt);
+ }
+ template <class StateType,class EventType>
+ typename ::boost::disable_if<typename is_no_exception_thrown<StateType>::type,bool >::type
+ do_process_helper(EventType const& evt, ::boost::msm::back::dummy<1> = 0)
+ {
+ try
+ {
+ return this->do_process_event(evt);
+ }
+ catch (std::exception& e)
+ {
+ // give a chance to the concrete state machine to handle
+ this->exception_caught(evt,*this,e);
+ }
+ return false;
+ }
+ // handling of deferred events
+ // if none is found in the SM, take the following empty main version
+ template <class StateType, class Enable = void>
+ struct handle_defer_helper
+ {
+ handle_defer_helper(deferred_events_queue_t& ){}
+ void do_pre_handle_deferred()
+ {
+ }
+
+ void do_post_handle_deferred()
+ {
+ }
+ };
+ // 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_delayed_events<StateType>::type >::type>
+ {
+ handle_defer_helper(deferred_events_queue_t& a_queue):events_queue(a_queue),next_deferred_event(){}
+ void do_pre_handle_deferred()
+ {
+ if (!events_queue.empty())
+ {
+ next_deferred_event = events_queue.front();
+ events_queue.pop();
+ }
+ }
+
+ void do_post_handle_deferred()
+ {
+ if (next_deferred_event)
+ {
+ next_deferred_event();
+ }
+ }
+
+ private:
+ deferred_events_queue_t& events_queue;
+ deferred_fct next_deferred_event;
+ };
+
+ // handling of eventless transitions
+ // if none is found in the SM, nothing to do
+ template <class StateType, class Enable = void>
+ struct handle_eventless_transitions_helper
+ {
+ handle_eventless_transitions_helper(library_sm* , bool ){}
+ void process_automatic_event(){}
+ };
+ // otherwise
+ template <class StateType>
+ struct handle_eventless_transitions_helper
+ <StateType, typename enable_if< typename ::boost::msm::back::has_fsm_eventless_transition<StateType>::type >::type>
+ {
+ handle_eventless_transitions_helper(library_sm* self_, bool handled_):self(self_),handled(handled_){}
+ void process_automatic_event()
+ {
+ typedef typename ::boost::mpl::deref<
+ typename ::boost::mpl::begin<
+ typename find_automatic_events<StateType>::type
+ >::type
+ >::type first_automatic_event;
+ if (handled)
+ {
+ self->process_event(first_automatic_event() );
+ }
+ }
+
+ private:
+ library_sm* self;
+ bool handled;
+ };
+
+ // minimum event processing without exceptions, queues, etc.
+ template<class Event>
+ bool do_process_event(Event const& evt)
+ {
+ // use this table as if it came directly from the user
+ typedef dispatch_table<library_sm,complete_table,Event> table;
+
+ bool handled = false;
+ // dispatch the event to every region
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ std::pair<int,HandledEnum> res =
+ table::instance.entries[this->m_states[i]](
+ *this, this->m_states[i], evt);
+ this->m_states[i] = res.first;
+ handled = (handled || res.second);
+ }
+ // if the event has not been handled and we have orthogonal zones, then
+ // generate an error on every active state
+ // for state machine states contained in other state machines, do not handle
+ // but let the containing sm handle the error
+ // automatic events do not produce an error
+ if (!handled && !is_contained() && !is_automatic_event<Event>::type::value)
+ {
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ no_transition(evt,*this,this->m_states[i]);
+ }
+ }
+ return handled;
+ }
+
+ // default row arguments for the compilers which accept this
+ template <class Event>
+ bool no_guard(Event const&){return true;}
+ template <class Event>
+ void no_action(Event const&){}
+
+
+private:
+ // composite accept implementation. First calls accept on the composite, then accept on all its active states.
+ void composite_accept()
+ {
+ this->accept();
+ this->visit_current_states();
+ }
+
+#define MSM_COMPOSITE_ACCEPT_SUB(z, n, unused) ARG ## n vis ## n
+#define MSM_COMPOSITE_ACCEPT_EXECUTE(z, n, unused) \
+ template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
+ void composite_accept(BOOST_PP_ENUM(n, MSM_COMPOSITE_ACCEPT_SUB, ~ ) ) \
+ { \
+ this->accept(BOOST_PP_ENUM_PARAMS(n,vis)); \
+ this->visit_current_states(BOOST_PP_ENUM_PARAMS(n,vis)); \
+ }
+ BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_COMPOSITE_ACCEPT_EXECUTE, ~)
+#undef MSM_COMPOSITE_ACCEPT_EXECUTE
+#undef MSM_COMPOSITE_ACCEPT_SUB
+
+ // helper used to call the init states at the start of the state machine
+ template <class Event>
+ struct call_init
+ {
+ call_init(Event const& an_event,library_sm* self_):
+ evt(an_event),self(self_){}
+ template <class State>
+ void operator()(boost::msm::back::wrap<State> const&)
+ {
+ execute_entry(::boost::fusion::at_key<State>(self->m_substate_list),evt,*self);
+ }
+ private:
+ Event const& evt;
+ library_sm* self;
+ };
+ // helper for flag handling. Uses OR by default on orthogonal zones.
+ template <class Flag,bool orthogonalStates>
+ struct FlagHelper
+ {
+ static bool helper(library_sm& sm,flag_handler* )
+ {
+ // by default we use OR to accumulate the flags
+ return sm.is_flag_active<Flag,Flag_OR>();
+ }
+ };
+ template <class Flag>
+ struct FlagHelper<Flag,false>
+ {
+ static bool helper(library_sm& sm,flag_handler* flags_entries)
+ {
+ // just one active state, so we can call operator[] with 0
+ return flags_entries[sm.current_state()[0]](sm);
+ }
+ };
+ // handling of flag
+ // defines a true and false functions plus a forwarding one for composite states
+ template <class StateType,class Flag>
+ struct FlagHandler
+ {
+ static bool flag_true(library_sm& )
+ {
+ return true;
+ }
+ static bool flag_false(library_sm& )
+ {
+ return false;
+ }
+ static bool forward(library_sm& fsm)
+ {
+ return ::boost::fusion::at_key<StateType>(fsm.m_substate_list).is_flag_active<Flag>();
+ }
+ };
+ template <class Flag>
+ struct init_flags
+ {
+ private:
+ // helper function, helps hiding the forward function for non-state machines states.
+ template <class T>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename is_composite_state<T>::type,
+ typename ::boost::mpl::not_<
+ typename has_non_forwarding_flag<Flag>::type>::type >::type
+ ,void >::type
+ helper (flag_handler* an_entry,int offset,boost::msm::back::dummy<0> = 0 )
+ {
+ // composite => forward
+ an_entry[offset] = &FlagHandler<T,Flag>::forward;
+ }
+ template <class T>
+ typename ::boost::disable_if<
+ typename ::boost::mpl::and_<
+ typename is_composite_state<T>::type,
+ typename ::boost::mpl::not_<
+ typename has_non_forwarding_flag<Flag>::type>::type >::type
+ ,void >::type
+ helper (flag_handler* an_entry,int offset,boost::msm::back::dummy<1> = 0 )
+ {
+ // default no flag
+ an_entry[offset] = &FlagHandler<T,Flag>::flag_false;
+ }
+ // attributes
+ flag_handler* entries;
+
+ public:
+ init_flags(flag_handler* entries_)
+ : entries(entries_)
+ {}
+
+ // Flags initializer function object, used with mpl::for_each
+ template <class StateType>
+ void operator()( ::boost::msm::back::wrap<StateType> const& )
+ {
+ typedef typename StateType::flag_list flags;
+ typedef typename ::boost::mpl::contains<flags,Flag >::type found;
+ typedef typename is_composite_state<StateType>::type composite;
+
+ BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,StateType>::type::value));
+ if (found::type::value)
+ {
+ // the type defined the flag => true
+ entries[state_id] = &FlagHandler<StateType,Flag>::flag_true;
+ }
+ else
+ {
+ // false or forward
+ helper<StateType>(entries,state_id);
+ }
+ }
+ };
+ // maintains for every flag a static array containing the flag value for every state
+ template <class Flag>
+ flag_handler* get_entries_for_flag()
+ {
+ BOOST_STATIC_CONSTANT(int, max_state = (mpl::size<state_list>::value));
+
+ static flag_handler flags_entries[max_state];
+ // build a state list
+ ::boost::mpl::for_each<state_list, boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (init_flags<Flag>(flags_entries));
+ return flags_entries;
+ }
+
+ // helper used to create a state using the correct constructor
+ template <class State, class Enable=void>
+ struct create_state_helper
+ {
+ static void set_sm(library_sm* )
+ {
+ // state doesn't need its sm
+ }
+ };
+ // create a state requiring a pointer to the state machine
+ template <class State>
+ struct create_state_helper<State,typename boost::enable_if<typename State::needs_sm >::type>
+ {
+ static void set_sm(library_sm* sm)
+ {
+ // create and set the fsm
+ ::boost::fusion::at_key<State>(sm->m_substate_list).set_sm_ptr(sm);
+ }
+ };
+ // main unspecialized helper class
+ template <class StateType,int ARGS>
+ struct visitor_args;
+
+#define MSM_VISITOR_ARGS_SUB(z, n, unused) BOOST_PP_CAT(_,BOOST_PP_ADD(n,1))
+#define MSM_VISITOR_ARGS_TYPEDEF_SUB(z, n, unused) typename StateType::accept_sig::argument ## n
+
+#define MSM_VISITOR_ARGS_EXECUTE(z, n, unused) \
+ template <class StateType> \
+ struct visitor_args<StateType,n> \
+ { \
+ template <class State> \
+ static typename enable_if_c<!is_composite_state<State>::value,void >::type \
+ helper (library_sm* sm, \
+ int id,StateType& astate) \
+ { \
+ sm->m_visitors.insert(id, boost::bind(&StateType::accept, \
+ ::boost::ref(astate) BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM(n, MSM_VISITOR_ARGS_SUB, ~) )); \
+ } \
+ template <class State> \
+ static typename enable_if_c<is_composite_state<State>::value,void >::type \
+ helper (library_sm* sm, \
+ int id,StateType& astate) \
+ { \
+ void (StateType::*caccept)(BOOST_PP_ENUM(n, MSM_VISITOR_ARGS_TYPEDEF_SUB, ~ ) ) \
+ = &StateType::composite_accept; \
+ sm->m_visitors.insert(id, boost::bind(caccept, \
+ ::boost::ref(astate) BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM(n, MSM_VISITOR_ARGS_SUB, ~) )); \
+ } \
+};
+BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXECUTE, ~)
+#undef MSM_VISITOR_ARGS_EXECUTE
+#undef MSM_VISITOR_ARGS_SUB
+
+ template<class ContainingSM>
+ void set_containing_sm(ContainingSM* sm)
+ {
+ m_is_included=true;
+ ::boost::fusion::for_each(m_substate_list,add_state<ContainingSM>(this,sm));
+ }
+ // A function object for use with mpl::for_each that stuffs
+ // states into the state list.
+ template<class ContainingSM>
+ struct add_state
+ {
+ add_state(library_sm* self_,ContainingSM* sm)
+ : self(self_),containing_sm(sm){}
+
+ // State is a sub fsm with exit pseudo states and gets a pointer to this fsm, so it can build a callback
+ template <class StateType>
+ typename ::boost::enable_if<
+ typename has_exit_pseudo_states<StateType>::type,void >::type
+ new_state_helper(boost::msm::back::dummy<0> = 0) const
+ {
+ ::boost::fusion::at_key<StateType>(self->m_substate_list).set_containing_sm(containing_sm);
+ }
+ // State is a sub fsm without exit pseudo states and does not get a callback to this fsm
+ // or state is a normal state and needs nothing except creation
+ template <class StateType>
+ typename ::boost::enable_if<
+ typename boost::mpl::and_<typename boost::mpl::not_
+ <typename has_exit_pseudo_states<StateType>::type>::type,
+ typename boost::mpl::not_
+ <typename is_pseudo_exit<StateType>::type>::type
+ >::type,void>::type
+ new_state_helper( ::boost::msm::back::dummy<1> = 0) const
+ {
+ //nothing to do
+ }
+ // state is exit pseudo state and gets callback to target fsm
+ template <class StateType>
+ typename ::boost::enable_if<typename is_pseudo_exit<StateType>::type,void >::type
+ new_state_helper( ::boost::msm::back::dummy<2> = 0) const
+ {
+ execute_return (ContainingSM::*pf) (typename StateType::event const& evt)=
+ &ContainingSM::process_event;
+ ::boost::function<execute_return (typename StateType::event const&)> fct =
+ ::boost::bind(pf,containing_sm,_1);
+ ::boost::fusion::at_key<StateType>(self->m_substate_list).set_forward_fct(fct);
+ }
+ // for every defined state in the sm
+ template <class State>
+ void operator()( State const&) const
+ {
+ //create a new state with the defined id and type
+ BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
+
+ this->new_state_helper<State>(),
+ create_state_helper<State>::set_sm(self);
+ // create a visitor callback
+ visitor_helper<State>(state_id,::boost::fusion::at_key<State>(self->m_substate_list));
+ }
+ private:
+ // support possible use of a visitor if accept_sig is defined
+ template <class StateType>
+ typename ::boost::enable_if<typename has_accept_sig<StateType>::type,void >::type
+ visitor_helper(int id,StateType& astate,::boost::msm::back::dummy<0> = 0) const
+ {
+ visitor_args<StateType,StateType::accept_sig::args_number>::
+ template helper<StateType>(self,id,astate);
+ }
+ template <class StateType>
+ typename ::boost::disable_if<typename has_accept_sig<StateType>::type,void >::type
+ visitor_helper(int ,StateType& ,::boost::msm::back::dummy<1> = 0) const
+ {
+ // nothing to do
+ }
+
+ library_sm* self;
+ ContainingSM* containing_sm;
+ };
+
+ // helper used to copy every state if needed
+ struct copy_helper
+ {
+ copy_helper(library_sm* sm):
+ m_sm(sm){}
+ template <class StateType>
+ void operator()( ::boost::msm::back::wrap<StateType> const& )
+ {
+ BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,StateType>::type::value));
+ // possibly also set the visitor
+ visitor_helper<StateType>(state_id);
+
+ // and for states that keep a pointer to the fsm, reset the pointer
+ create_state_helper<StateType>::set_sm(m_sm);
+ }
+ template <class StateType>
+ typename ::boost::enable_if<typename has_accept_sig<StateType>::type,void >::type
+ visitor_helper(int id) const
+ {
+ visitor_args<StateType,StateType::accept_sig::args_number>::template helper<StateType>
+ (m_sm,id,::boost::fusion::at_key<StateType>(m_sm->m_substate_list));
+ }
+ template <class StateType>
+ typename ::boost::disable_if<typename has_accept_sig<StateType>::type,void >::type
+ visitor_helper(int id) const
+ {
+ // nothing to do
+ }
+
+ library_sm* m_sm;
+ };
+
+ // copy functions for deep copy (no need of a 2nd version for NoCopy as noncopyable handles it)
+ void do_copy (library_sm const& rhs,
+ ::boost::msm::back::dummy<0> = 0)
+ {
+ // deep copy simply assigns the data
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ m_states[i] = rhs.m_states[i];
+ }
+ m_events_queue = rhs.m_events_queue;
+ m_deferred_events_queue = rhs.m_deferred_events_queue;
+ m_history = rhs.m_history;
+ m_event_processing = rhs.m_event_processing;
+ m_is_included = rhs.m_is_included;
+ m_substate_list = rhs.m_substate_list;
+ // except for the states themselves, which get duplicated
+
+ ::boost::mpl::for_each<state_list, ::boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (copy_helper(this));
+ }
+
+ // helper used to call the correct entry/exit method
+ // unfortunately in O(number of states in the sub-sm) but should be better than a virtual call
+ template<class Event,bool is_entry>
+ struct entry_exit_helper
+ {
+ entry_exit_helper(int id,Event const& e,library_sm* self_):
+ state_id(id),evt(e),self(self_){}
+ // helper for entry actions
+ template <class IsEntry,class State>
+ typename ::boost::enable_if<typename IsEntry::type,void >::type
+ helper( ::boost::msm::back::dummy<0> = 0)
+ {
+ BOOST_STATIC_CONSTANT(int, id = (get_state_id<stt,State>::value));
+ if (id == state_id)
+ {
+ execute_entry<State>(::boost::fusion::at_key<State>(self->m_substate_list),evt,*self);
+ }
+ }
+ // helper for exit actions
+ template <class IsEntry,class State>
+ typename boost::disable_if<typename IsEntry::type,void >::type
+ helper( ::boost::msm::back::dummy<1> = 0)
+ {
+ BOOST_STATIC_CONSTANT(int, id = (get_state_id<stt,State>::value));
+ if (id == state_id)
+ {
+ execute_exit<State>(::boost::fusion::at_key<State>(self->m_substate_list),evt,*self);
+ }
+ }
+ // iterates through all states to find the one to be activated
+ template <class State>
+ void operator()( ::boost::msm::back::wrap<State> const&)
+ {
+ entry_exit_helper<Event,is_entry>::template helper< ::boost::mpl::bool_<is_entry>,State >();
+ }
+ private:
+ int state_id;
+ Event const& evt;
+ library_sm* self;
+ };
+ // start for states machines which are themselves embedded in other state machines (composites)
+ template <class Event>
+ void start(Event const& incomingEvent)
+ {
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ //forward the event for handling by sub state machines
+ ::boost::mpl::for_each<state_list, ::boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (entry_exit_helper<Event,true>(m_states[i],incomingEvent,this));
+ }
+ }
+
+ // helper used to set the correct state as active state upon entry into a fsm
+ struct direct_event_start_helper
+ {
+ direct_event_start_helper(library_sm* self_):self(self_){}
+ // this variant is for the standard case, entry due to activation of the containing FSM
+ template <class EventType>
+ typename ::boost::disable_if<typename has_direct_entry<EventType>::type,void>::type
+ operator()(EventType const& evt, ::boost::msm::back::dummy<0> = 0)
+ {
+ (static_cast<Derived*>(self))->on_entry(evt,*self);
+ self->start(evt);
+ }
+
+ // this variant is for the direct entry case (just one entry, not a sequence of entries)
+ template <class EventType>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::not_< typename is_pseudo_entry<
+ typename EventType::active_state>::type >::type,
+ typename ::boost::mpl::and_<typename has_direct_entry<EventType>::type,
+ typename ::boost::mpl::not_<typename ::boost::mpl::is_sequence
+ <typename EventType::active_state>::type >::type
+ >::type>::type,void
+ >::type
+ operator()(EventType const& evt, ::boost::msm::back::dummy<1> = 0)
+ {
+ (static_cast<Derived*>(self))->on_entry(evt,*self);
+ int state_id = get_state_id<stt,typename EventType::active_state>::value;
+ BOOST_STATIC_ASSERT(EventType::active_state::zone_index >= 0);
+ BOOST_STATIC_ASSERT(EventType::active_state::zone_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->start(evt.m_event);
+ }
+
+ // this variant is for the fork entry case (a sequence on entries)
+ template <class EventType>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::not_<
+ typename is_pseudo_entry<typename EventType::active_state>::type >::type,
+ typename ::boost::mpl::and_<typename has_direct_entry<EventType>::type,
+ typename ::boost::mpl::is_sequence<
+ typename EventType::active_state>::type
+ >::type>::type,void
+ >::type
+ operator()(EventType const& evt, ::boost::msm::back::dummy<2> = 0)
+ {
+ (static_cast<Derived*>(self))->on_entry(evt,*self);
+ ::boost::mpl::for_each<typename EventType::active_state,
+ ::boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (fork_helper<EventType>(self,evt));
+ // set the correct zones, the others (if any) will be default/history initialized
+ self->start(evt.m_event);
+ }
+
+ // this variant is for the pseudo state entry case
+ template <class EventType>
+ typename ::boost::enable_if<
+ typename is_pseudo_entry<typename EventType::active_state >::type,void
+ >::type
+ operator()(EventType const& evt, ::boost::msm::back::dummy<3> = 0)
+ {
+ // entry on the FSM
+ (static_cast<Derived*>(self))->on_entry(evt,*self);
+ int state_id = get_state_id<stt,typename EventType::active_state>::value;
+ // given region starts with the entry pseudo state as active state
+ self->m_states[EventType::active_state::zone_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
+ self->process_event(evt.m_event);
+ }
+ private:
+ // helper for the fork case, does almost like the direct entry
+ library_sm* self;
+ template <class EventType>
+ struct fork_helper
+ {
+ fork_helper(library_sm* self_,EventType const& evt_):
+ helper_self(self_),helper_evt(evt_){}
+ template <class StateType>
+ void operator()( ::boost::msm::back::wrap<StateType> const& )
+ {
+ int state_id = get_state_id<stt,StateType>::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;
+ }
+ private:
+ library_sm* helper_self;
+ EventType const& helper_evt;
+ };
+ };
+
+ // entry/exit for states machines which are themselves embedded in other state machines (composites)
+ template <class Event>
+ void do_entry(Event const& incomingEvent)
+ {
+ // by default we activate the history/init states, can be overwritten by direct_event_start_helper
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ this->m_states[i] = m_history.history_entry(incomingEvent)[i];
+ }
+ // block immediate handling of events
+ m_event_processing = true;
+ // if the event is generating a direct entry/fork, set the current state(s) to the direct state(s)
+ direct_event_start_helper(this)(incomingEvent);
+ // handle messages which were generated and blocked in the init calls
+ m_event_processing = false;
+ process_message_queue();
+ }
+ template <class Event>
+ void do_exit(Event const& incomingEvent)
+ {
+ for (int i=0; i<nr_regions::value;++i)
+ {
+ // first recursively exit the sub machines
+ // forward the event for handling by sub state machines
+ ::boost::mpl::for_each<state_list, ::boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (entry_exit_helper<Event,false>(m_states[i],incomingEvent,this));
+ }
+ // then call our own exit
+ (static_cast<Derived*>(this))->on_exit(incomingEvent,*this);
+ // give the history a chance to handle this (or not).
+ m_history.history_exit(this->m_states);
+ }
+
+ // no transition for event.
+ template <class Event>
+ static std::pair<int,HandledEnum> call_no_transition(library_sm& , int state, Event const& )
+ {
+ return std::make_pair(state,HANDLED_FALSE);
+ }
+ // called for deferred events. Address set in the dispatch_table at init
+ template <class Event>
+ static std::pair<int,HandledEnum> defer_transition(library_sm& fsm, int state, Event const& e)
+ {
+ execute_return (library_sm::*pf) (Event const& evt)= &library_sm::process_event;
+ Event temp (e);
+ ::boost::function<execute_return () > f= ::boost::bind(pf, ::boost::ref(fsm),temp);
+ fsm.post_deferred_event(f);
+ return std::make_pair(state,HANDLED_TRUE);
+ }
+
+ // called for automatic events. Default address set in the dispatch_table at init
+ // prevents no-transition detection for automatic events
+ template <class Event>
+ static std::pair<int,HandledEnum> default_eventless_transition(library_sm& fsm, int state, Event const& e)
+ {
+ return std::make_pair(state,HANDLED_FALSE);
+ }
+
+ // puts a deferred event in the queue
+ void post_deferred_event(deferred_fct& deferred)
+ {
+ m_deferred_events_queue.push(deferred);
+ }
+ // removes one event from the message queue and processes it
+ void process_message_queue()
+ {
+ if (!m_events_queue.empty())
+ {
+ transition_fct to_call = m_events_queue.front();
+ m_events_queue.pop();
+ to_call();
+ }
+ }
+
+ // calls the entry/exit or on_entry/on_exit depending on the state type
+ // (avoids calling virtually)
+ // variant for FSMs
+ template <class StateType,class EventType,class FsmType>
+ static
+ typename boost::enable_if<typename is_composite_state<StateType>::type,void >::type
+ execute_entry(StateType& astate,EventType const& evt,FsmType& fsm,boost::msm::back::dummy<0> = 0)
+ {
+ // calls on_entry on the fsm then handles direct entries, fork, entry pseudo state
+ astate.do_entry(evt);
+ }
+ // variant for states
+ template <class StateType,class EventType,class FsmType>
+ static
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename is_composite_state<StateType>::type,
+ typename is_pseudo_exit<StateType>::type >::type,void >::type
+ execute_entry(StateType& astate,EventType const& evt,FsmType& fsm, ::boost::msm::back::dummy<1> = 0)
+ {
+ // simple call to on_entry
+ astate.on_entry(evt,fsm);
+ }
+ // variant for exit pseudo states
+ template <class StateType,class EventType,class FsmType>
+ static
+ typename ::boost::enable_if<typename is_pseudo_exit<StateType>::type,void >::type
+ execute_entry(StateType& astate,EventType const& evt,FsmType& fsm, ::boost::msm::back::dummy<2> = 0)
+ {
+ // calls on_entry on the state then forward the event to the transition which should be defined inside the
+ // contained fsm
+ astate.on_entry(evt,fsm);
+ astate.forward_event(evt);
+ }
+ template <class StateType,class EventType,class FsmType>
+ static
+ typename ::boost::enable_if<typename is_composite_state<StateType>::type,void >::type
+ execute_exit(StateType& astate,EventType const& evt,FsmType& , ::boost::msm::back::dummy<0> = 0)
+ {
+ astate.do_exit(evt);
+ }
+ template <class StateType,class EventType,class FsmType>
+ static
+ typename ::boost::disable_if<typename is_composite_state<StateType>::type,void >::type
+ execute_exit(StateType& astate,EventType const& evt,FsmType& fsm, ::boost::msm::back::dummy<1> = 0)
+ {
+ // simple call to on_exit
+ astate.on_exit(evt,fsm);
+ }
+
+ // helper allowing special handling of direct entries / fork
+ template <class StateType,class TargetType,class EventType,class FsmType>
+ static
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename has_explicit_entry_state<TargetType>::type,
+ ::boost::mpl::is_sequence<TargetType> >::type,void>::type
+ convert_event_and_execute_entry(StateType& astate,EventType const& evt, FsmType& fsm, ::boost::msm::back::dummy<1> = 0)
+ {
+ // if the target is a normal state, do the standard entry handling
+ execute_entry<StateType>(astate,evt,fsm);
+ }
+ template <class StateType,class TargetType,class EventType,class FsmType>
+ static
+ typename ::boost::enable_if<
+ typename ::boost::mpl::or_<typename has_explicit_entry_state<TargetType>::type,
+ ::boost::mpl::is_sequence<TargetType> >::type,void >::type
+ convert_event_and_execute_entry(StateType& astate,EventType const& evt, FsmType& fsm, ::boost::msm::back::dummy<0> = 0)
+ {
+ // for the direct entry, pack the event in a wrapper so that we handle it differently during fsm entry
+ execute_entry(astate,msm::back::direct_entry_event<TargetType,EventType>(evt),fsm);
+ }
+
+ // creates all the states
+ template <class ContainingSM>
+ void fill_states(ContainingSM* containing_sm=0)
+ {
+ BOOST_STATIC_CONSTANT(int, max_state = (mpl::size<state_list>::value));
+ // allocate the place without reallocation
+ m_visitors.fill_visitors(max_state);
+ ::boost::fusion::for_each(m_substate_list,add_state<ContainingSM>(this,containing_sm));
+
+ }
+
+
+public:
+
+
+
+private:
+ template <class Fsm,class Stt, class Event>
+ friend struct dispatch_table;
+
+ // data members
+ int m_states[nr_regions::value];
+ events_queue_t m_events_queue;
+ deferred_events_queue_t m_deferred_events_queue;
+ concrete_history m_history;
+ bool m_event_processing;
+ bool m_is_included;
+ visitor_fct_helper<BaseState>
+ m_visitors;
+
+ substate_list m_substate_list;
+
+
+};
+
+} } }// boost::msm::back
+#endif //BOOST_MSM_BACK_STATEMACHINE_H
+

Added: sandbox/msm/boost/msm/back/tools.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/back/tools.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,68 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BACK_TOOLS_H
+#define BOOST_MSM_BACK_TOOLS_H
+
+
+#include <string>
+#include <iostream>
+#include <boost/msm/back/common_types.hpp>
+#include <boost/msm/back/metafunctions.hpp>
+
+namespace boost { namespace msm { namespace back
+{
+
+// fills the array passed in with the state names in the correct order
+// the array must be big enough. To know the needed size, use mpl::size
+// on fsm::generate_state_set
+template <class stt>
+struct fill_state_names
+{
+ fill_state_names(char const** names):m_names(names){}
+ template <class StateType>
+ void operator()(boost::msm::back::wrap<StateType> const&)
+ {
+ m_names[get_state_id<stt,StateType>::value]= typeid(StateType).name();
+ }
+private:
+ char const** m_names;
+};
+
+// fills the typeid-generated name of the given state in the string passed as argument
+template <class stt>
+struct get_state_name
+{
+ get_state_name(std::string& name_to_fill, int state_id):m_name(name_to_fill),m_state_id(state_id){}
+ template <class StateType>
+ void operator()(boost::msm::back::wrap<StateType> const&)
+ {
+ if (get_state_id<stt,StateType>::value == m_state_id)
+ {
+ m_name = typeid(StateType).name();
+ }
+ }
+private:
+ std::string& m_name;
+ int m_state_id;
+};
+
+// displays the typeid of the given Type
+struct display_type
+{
+ template <class Type>
+ void operator()(boost::msm::back::wrap<Type> const&)
+ {
+ std::cout << typeid(Type).name() << std::endl;
+ }
+};
+
+} } }//boost::msm::back
+#endif //BOOST_MSM_BACK_TOOLS_H

Deleted: sandbox/msm/boost/msm/bind_helpers.hpp
==============================================================================
--- sandbox/msm/boost/msm/bind_helpers.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_BIND_HELPERS_H
-#define BOOST_MSM_BIND_HELPERS_H
-
-#include <functional>
-
-namespace boost { namespace msm
-{
- // helper to replace std::plus as the lack of implicit conversion makes it not usable in one of our bind
- template<class _Ty,class _Tz>
- struct plus2
- : public std::binary_function<_Ty, _Tz, _Ty>
- { // functor for operator+
- _Ty operator()( _Ty _Left, _Tz _Right) const
- { // apply operator+ to operands
- return (_Left + _Right);
- }
- };
- // helper to dereference a pointer to a function pointer
- template <class T>
- struct deref
- {
- typedef T& result_type;
- T& operator()(T* f) const
- {
- return *f;
- }
- };
-} } //boost::msm
-#endif //BOOST_MSM_BIND_HELPERS_H

Deleted: sandbox/msm/boost/msm/common_types.hpp
==============================================================================
--- sandbox/msm/boost/msm/common_types.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,38 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_COMMON_TYPES_H
-#define BOOST_MSM_COMMON_TYPES_H
-
-#include <vector>
-#include <boost/tuple/tuple.hpp>
-#include <boost/function.hpp>
-
-namespace boost { namespace msm
-{
-// used for disable_if
-template <int> struct dummy { dummy(int) {} };
-// return value for transition handling
-typedef enum
-{
- HANDLED_FALSE=0,
- HANDLED_TRUE =1,
- HANDLED_GUARD_REJECT=2
-} HandledEnum;
-typedef ::boost::tuple<HandledEnum,const std::vector<int>*> execute_return;
-
-// wrapper for mpl::for_each as showed in the C++ Template Metaprogramming ch. 9
-template <class T>
-struct wrap{};
-
-}}
-
-#endif //BOOST_MSM_COMMON_TYPES_H
-

Deleted: sandbox/msm/boost/msm/copy_policies.hpp
==============================================================================
--- sandbox/msm/boost/msm/copy_policies.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,41 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_COPY_POLICIES_H
-#define BOOST_MSM_COPY_POLICIES_H
-
-#include <boost/utility.hpp>
-#include <boost/mpl/bool.hpp>
-
-namespace boost { namespace msm
-{
- // deactivates copy
- struct NoCopy : ::boost::noncopyable
- {
- // tags
- typedef ::boost::mpl::bool_<false> shallow_copy;
- };
-
- // activate the shallow copy flag
- struct ShallowCopy
- {
- // tags
- typedef ::boost::mpl::bool_<true> shallow_copy;
- };
- // deactivate the shallow copy flag
- struct DeepCopy
- {
- // tags
- typedef ::boost::mpl::bool_<false> shallow_copy;
- };
-} } //boost::msm
-
-
-#endif //BOOST_MSM_COPY_POLICIES_H

Deleted: sandbox/msm/boost/msm/dispatch_table.hpp
==============================================================================
--- sandbox/msm/boost/msm/dispatch_table.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,238 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_DISPATCH_TABLE_H
-#define BOOST_MSM_DISPATCH_TABLE_H
-
-#include <utility>
-
-#include <boost/utility/enable_if.hpp>
-#include <boost/mpl/empty.hpp>
-#include <boost/mpl/reverse_fold.hpp>
-#include <boost/mpl/greater.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/filter_view.hpp>
-#include <boost/mpl/pop_front.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/mpl/map.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/pair.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/mpl/push_back.hpp>
-
-#include <boost/msm/metafunctions.hpp>
-#include <boost/msm/common_types.hpp>
-#include <boost/msm/states.hpp>
-
-namespace boost { namespace msm
-{
-
-// forward declaration
-template<class Derived,class HistoryPolicy,class BaseState,class CopyPolicy>
-class state_machine;
-
-// Generates a singleton runtime lookup table that maps current state
-// to a function that makes the SM take its transition on the given
-// Event type.
-template <class Fsm, class HistoryPolicy,class BaseState, class CopyPolicy,class Stt, class Event>
-struct dispatch_table
-{
- private:
- // This is a table of these function pointers.
- typedef typename Fsm::pBaseState pstate_base;
- typedef std::pair<int,HandledEnum> (*cell)(Fsm&, int, pstate_base*,Event const&);
- typedef bool (*guard)(Fsm&, Event const&);
-
- // class used to build a chain (or sequence) of transitions for a given event and start state
- // (like an UML diamond). Allows transition conflicts.
- template< typename Seq,typename AnEvent,typename State >
- struct chain_row
- {
- typedef State current_state_type;
- typedef AnEvent event;
-
- // helper for building a disable/enable_if-controlled execute function
- struct execute_helper
- {
- template <class Sequence>
- static
- typename ::boost::enable_if<typename ::boost::mpl::empty<Sequence>::type,std::pair<int,HandledEnum> >::type
- execute(Fsm& fsm, int state, pstate_base* all_states, Event const& evt,
- ::boost::msm::dummy<0> = 0)
- {
- // if at least one guard rejected, this will be ignored, otherwise will generate an error
- return std::make_pair(state,HANDLED_FALSE);
- }
-
- template <class Sequence>
- static
- typename ::boost::disable_if<typename ::boost::mpl::empty<Sequence>::type,std::pair<int,HandledEnum> >::type
- execute(Fsm& fsm, int state, pstate_base* all_states, Event const& evt,
- ::boost::msm::dummy<1> = 0)
- {
- // try the first guard
- typedef typename ::boost::mpl::front<Sequence>::type first_row;
- std::pair<int,HandledEnum> res = first_row::execute(fsm,state,all_states,evt);
- if (HANDLED_TRUE!=res.second)
- {
- // if the first rejected, move on to the next one
- std::pair<int,HandledEnum> sub_res =
- execute<typename ::boost::mpl::pop_front<Sequence>::type>(fsm,state,all_states,evt);
- // if at least one guards rejects, the event will not generate a call to no_transition
- HandledEnum handled = ((HANDLED_GUARD_REJECT==sub_res.second) ||
- (HANDLED_GUARD_REJECT==res.second))?
- HANDLED_GUARD_REJECT:sub_res.second;
- return std::make_pair(sub_res.first,handled);
- }
- return res;
- }
- };
- // Take the transition action and return the next state.
- static std::pair<int,HandledEnum> execute(Fsm& fsm, int state, pstate_base* all_states, Event const& evt)
- {
- // forward to helper
- return execute_helper::template execute<Seq>(fsm,state,all_states,evt);
- }
- };
- // nullary metafunction whose only job is to prevent early evaluation of _1
- template< typename Entry >
- struct make_chain_row_from_map_entry
- {
- typedef chain_row<typename Entry::second,Event,
- typename Entry::first > type;
- };
- // Compute the maximum state value in the sm so we know how big
- // to make the table
- typedef typename generate_state_set<Stt>::type state_list;
- BOOST_STATIC_CONSTANT(int, max_state = ( ::boost::mpl::size<state_list>::value));
-
- // A function object for use with mpl::for_each that stuffs
- // transitions into cells.
- struct init_cell
- {
- init_cell(dispatch_table* self_)
- : self(self_)
- {}
-
- // Cell initializer function object, used with mpl::for_each
- template <class Transition>
- typename ::boost::enable_if<typename has_not_real_row_tag<Transition>::type,void >::type
- operator()(Transition const&,boost::msm::dummy<0> = 0) const
- {
- // version for not real rows. No problem because irrelevant for process_event
- }
- template <class Transition>
- typename ::boost::disable_if<typename has_not_real_row_tag<Transition>::type,void >::type
- operator()(Transition const&,boost::msm::dummy<1> = 0) const
- {
- typedef typename create_stt<Fsm>::type stt;
- BOOST_STATIC_CONSTANT(int, state_id =
- (get_state_id<stt,typename Transition::current_state_type>::value));
- self->entries[state_id] = &Transition::execute;
- }
-
- dispatch_table* self;
- };
- struct default_init_cell
- {
- default_init_cell(dispatch_table* self_,cell* tofill_entries_)
- : self(self_),tofill_entries(tofill_entries_)
- {}
- // Cell default-initializer function object, used with mpl::for_each
- // initializes with call_no_transition or defer_transition
- template <class State>
- typename ::boost::disable_if<typename has_state_delayed_event<State,Event>::type,void >::type
- operator()(boost::msm::wrap<State> const&,boost::msm::dummy<0> = 0)
- {
- typedef typename create_stt<Fsm>::type stt;
- BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
- cell call_no_transition = &state_machine<Fsm,HistoryPolicy,BaseState,CopyPolicy>::call_no_transition;
- tofill_entries[state_id] = call_no_transition;
- }
- template <class State>
- typename ::boost::enable_if<typename has_state_delayed_event<State,Event>::type,void >::type
- operator()(boost::msm::wrap<State> const&,boost::msm::dummy<1> = 0)
- {
- typedef typename create_stt<Fsm>::type stt;
- BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
- cell call_no_transition = &state_machine<Fsm,HistoryPolicy,BaseState,CopyPolicy>::defer_transition;
- tofill_entries[state_id] = call_no_transition;
- }
- dispatch_table* self;
- cell* tofill_entries;
- };
- public:
- // initialize the dispatch table for a given Event and Fsm
- dispatch_table()
- {
- // Initialize cells for no transition
- ::boost::mpl::for_each<typename generate_state_set<Stt>::type,
- boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (default_init_cell(this,entries));
-
- // build chaining rows for rows coming from the same state and the current event
- // first we build a map of sequence for every source
- // in reverse order so that the frow's are handled first (UML priority)
- typedef typename ::boost::mpl::reverse_fold<
- // filter on event
- ::boost::mpl::filter_view
- <Stt, ::boost::is_same<transition_event< ::boost::mpl::placeholders::_>, Event> >,
- // build a map
- ::boost::mpl::map<>,
- ::boost::mpl::if_<
- // if we already have a row on this source state
- ::boost::mpl::has_key< ::boost::mpl::placeholders::_1,
- transition_source_type< ::boost::mpl::placeholders::_2> >,
- // insert a new element in the value type
- ::boost::mpl::insert<
- ::boost::mpl::placeholders::_1,
- ::boost::mpl::pair<transition_source_type< ::boost::mpl::placeholders::_2>,
- ::boost::mpl::push_back<
- ::boost::mpl::at< ::boost::mpl::placeholders::_1,
- transition_source_type< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::placeholders::_2 >
- > >,
- // first row on this source state, make a vector with 1 element
- ::boost::mpl::insert<
- ::boost::mpl::placeholders::_1,
- ::boost::mpl::pair<transition_source_type< ::boost::mpl::placeholders::_2>,
- make_vector< ::boost::mpl::placeholders::_2> > >
- >
- >::type map_of_row_seq;
- // and then build chaining rows for all source states having more than 1 row
- typedef typename ::boost::mpl::fold<
- map_of_row_seq,::boost::mpl::vector<>,
- ::boost::mpl::if_<
- ::boost::mpl::greater< ::boost::mpl::size<
- ::boost::mpl::second< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::int_<1> >,
- // we need row chaining
- ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
- make_chain_row_from_map_entry< ::boost::mpl::placeholders::_2> >,
- // just one row, no chaining, we rebuild the row like it was before
- ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
- get_first_element_pair_second< ::boost::mpl::placeholders::_2> >
- > >::type chained_rows;
- // Go back and fill in cells for matching transitions.
- ::boost::mpl::for_each<chained_rows>(init_cell(this));
- }
-
- // The singleton instance.
- static const dispatch_table instance;
-
- public: // data members
- cell entries[max_state];
-};
-
-}} // boost::msm
-
-
-#endif //BOOST_MSM_DISPATCH_TABLE_H
-

Added: sandbox/msm/boost/msm/front/automatic_event.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/automatic_event.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,25 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_COMMON_AUTOMATIC_EVENT_H
+#define BOOST_MSM_FRONT_COMMON_AUTOMATIC_EVENT_H
+
+namespace boost { namespace msm { namespace front
+{
+
+ struct none
+ {
+ typedef int automatic_event;
+ };
+
+}}}
+
+#endif //BOOST_MSM_FRONT_COMMON_AUTOMATIC_EVENT_H
+

Added: sandbox/msm/boost/msm/front/common_states.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/common_states.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,83 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_COMMON_STATES_H
+#define BOOST_MSM_FRONT_COMMON_STATES_H
+
+#include <boost/mpl/int.hpp>
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/include/at_c.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace msm { namespace front
+{
+// default base: non-polymorphic, not visitable
+struct default_base_state
+{
+ ~default_base_state(){}
+};
+// default polymorphic base state. Derive all states from it to get polymorphic behavior
+struct polymorphic_state
+{
+ virtual ~polymorphic_state() {}
+};
+
+template <class Attributes= ::boost::fusion::vector<> >
+struct inherit_attributes
+{
+ // on the fly attribute creation capability
+ typedef Attributes attributes_type;
+ template <int Index>
+ typename ::boost::fusion::result_of::at<attributes_type,
+ ::boost::mpl::int_<Index> >::type
+ get_attribute()
+ {
+ return ::boost::fusion::at_c<Index>(m_attributes);
+ }
+
+ template <int Index>
+ typename ::boost::add_const<
+ typename ::boost::fusion::result_of::at<attributes_type,
+ ::boost::mpl::int_<Index> >::type>::type
+ get_attribute()const
+ {
+ return const_cast<
+ typename ::boost::add_const<
+ typename ::boost::fusion::result_of::at< attributes_type,
+ ::boost::mpl::int_<Index> >::type>::type>
+ (::boost::fusion::at_c<Index>(m_attributes));
+ }
+
+private:
+ // attributes
+ Attributes m_attributes;
+};
+
+// the interface for all states. Defines entry and exit functions. Overwrite to implement for any state needing it.
+template<class USERBASE,class Attributes= ::boost::fusion::vector<> >
+struct state_base : public inherit_attributes<Attributes>, USERBASE
+{
+ typedef USERBASE user_state_base;
+ typedef Attributes attributes_type;
+
+ // empty implementation for the states not wishing to define an entry condition
+ // will not be called polymorphic way
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&){}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ){}
+};
+
+}}}
+
+#endif //BOOST_MSM_FRONT_COMMON_STATES_H
+

Added: sandbox/msm/boost/msm/front/euml/algorithm.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/algorithm.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,19 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_ALGORITHM_H
+#define BOOST_MSM_FRONT_EUML_ALGORITHM_H
+
+#include <boost/msm/front/euml/iteration.hpp>
+#include <boost/msm/front/euml/querying.hpp>
+#include <boost/msm/front/euml/transformation.hpp>
+
+
+#endif //BOOST_MSM_FRONT_EUML_ALGORITHM_H

Added: sandbox/msm/boost/msm/front/euml/common.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/common.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,2054 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_COMMON_H
+#define BOOST_MSM_FRONT_EUML_COMMON_H
+
+#ifdef BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+#undef BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+#endif
+
+#ifdef BOOST_PROTO_MAX_ARITY
+#undef BOOST_PROTO_MAX_ARITY
+#endif
+
+#ifndef BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif
+
+#ifdef BOOST_MSVC
+#define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 7
+#define BOOST_PROTO_MAX_ARITY 7
+#else
+#define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 6
+#define BOOST_PROTO_MAX_ARITY 6
+#endif
+
+#include <iterator>
+#include <utility>
+
+#include <boost/proto/core.hpp>
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/set.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/int.hpp>
+
+#if BOOST_VERSION >= 104000
+#include <boost/mpl/string.hpp>
+#endif
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/include/at_c.hpp>
+
+#include <boost/msm/front/functor_row.hpp>
+
+namespace proto = boost::proto;
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(tag_type)
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+template <class T>
+struct get_iterator
+{
+ typedef typename T::iterator type;
+};
+template <class T>
+struct get_reverse_iterator
+{
+ typedef typename T::reverse_iterator type;
+};
+template <class T>
+struct get_reference
+{
+ typedef typename T::reference type;
+};
+template <class T>
+struct get_size_type
+{
+ typedef typename T::size_type type;
+};
+template <class T>
+struct get_value_type
+{
+ typedef typename T::value_type type;
+};
+template <class T>
+struct get_first_type
+{
+ typedef typename T::first_type type;
+};
+template <class T>
+struct get_second_type
+{
+ typedef typename T::second_type type;
+};
+template <class T>
+struct get_action_tag_type
+{
+ typedef typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type type;
+};
+template <class T>
+struct get_state_action_tag_type
+{
+ typedef typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type type;
+};
+
+template <class T,class EVT,class FSM,class SourceState,class TargetState>
+struct get_result_type
+{
+ typedef typename T::template transition_action_result<EVT,FSM,SourceState,TargetState>::type type;
+};
+template <class T,class Event,class FSM,class STATE>
+struct get_result_type2
+{
+ typedef typename T::template state_action_result<Event,FSM,STATE>::type type;
+};
+template<class SEQ>
+struct get_sequence
+{
+ typedef typename SEQ::sequence type;
+};
+
+template <class T>
+struct get_attributes_type
+{
+ typedef typename T::attributes_type type;
+};
+
+template <class T>
+struct get_euml_tag_type
+{
+ typedef typename T::euml_tag_type type;
+};
+
+template <class T,class Arg1=void,class Arg2=void,class Arg3=void,class Arg4=void,class Arg5=void
+#ifdef BOOST_MSVC
+,class Arg6=void
+#endif
+>
+struct get_fct
+{
+ typedef typename T::template In<Arg1,Arg2,Arg3,Arg4,Arg5
+#ifdef BOOST_MSVC
+,Arg6
+#endif
+>::type type;
+};
+
+
+// grammar forbidding address of for terminals
+struct terminal_grammar : proto::not_<proto::address_of<proto::_> >
+{};
+
+// Forward-declare an expression wrapper
+template<typename Expr>
+struct euml_terminal;
+
+struct sm_domain
+ : proto::domain< proto::generator<euml_terminal>, terminal_grammar >
+{};
+
+template<typename Expr>
+struct euml_terminal
+ : proto::extends<Expr, euml_terminal<Expr>, sm_domain>
+{
+ typedef
+ proto::extends<Expr, euml_terminal<Expr>, sm_domain>
+ base_type;
+ // Needs a constructor
+ euml_terminal(Expr const &e = Expr())
+ : base_type(e)
+ {}
+ // Unhide Proto's overloaded assignment operator
+ using base_type::operator=;
+};
+
+template <class EVT>
+struct euml_event: proto::extends<typename proto::terminal<event_tag>::type, EVT, sm_domain>
+{
+ typedef event_tag euml_tag_type;
+ using proto::extends<typename proto::terminal<event_tag>::type, EVT, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef EVT type;
+ };
+};
+template <class STATE>
+struct euml_state: proto::extends<typename proto::terminal<state_tag>::type, STATE, sm_domain>
+{
+ typedef state_tag euml_tag_type;
+ using proto::extends<typename proto::terminal<state_tag>::type, STATE, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef STATE type;
+ };
+};
+template <class ACTION>
+struct euml_action: proto::extends<typename proto::terminal<action_tag>::type, ACTION, sm_domain>
+{
+ typedef action_tag euml_tag_type;
+ using proto::extends<typename proto::terminal<action_tag>::type, ACTION, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ACTION type;
+ };
+};
+template <class FLAG>
+struct euml_flag: proto::extends<typename proto::terminal<flag_tag>::type, FLAG, sm_domain>
+{
+ typedef flag_tag euml_tag_type;
+ using proto::extends<typename proto::terminal<flag_tag>::type, FLAG, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef FLAG type;
+ };
+};
+
+template <class CONFIG>
+struct euml_config: proto::extends<typename proto::terminal<config_tag>::type, CONFIG, sm_domain>
+{
+ typedef config_tag euml_tag_type;
+ using proto::extends<typename proto::terminal<config_tag>::type, CONFIG, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef CONFIG type;
+ };
+};
+
+struct no_exception : euml_config<no_exception>
+{
+ typedef int no_exception_thrown;
+};
+struct no_msg_queue : euml_config<no_msg_queue>
+{
+ typedef int no_message_queue;
+};
+
+struct invalid_type{};
+struct make_invalid_type
+{
+ typedef invalid_type type;
+};
+
+template <class ROW>
+struct make_vector_one_row
+{
+ typedef boost::mpl::vector<ROW> type;
+};
+template <class T>
+T make_T(T t) {return t;}
+
+struct make_vector_no_row
+{
+ typedef boost::mpl::vector0<> type;
+};
+
+struct NoAction : euml_action<NoAction>
+{
+ // return value if used inside a state action (entry/exit)
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ // return value if used inside a transition (action/guard)
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ // this functor can be used in both modes, state action and transition action
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const&,FSM&,STATE& )
+ {
+ // does nothing
+ return true;
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
+ {
+ // does nothing
+ return true;
+ }
+};
+
+struct GetSource_ : euml_action<GetSource_ >
+{
+ using euml_action<GetSource_ >::operator=;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef SourceState& type;
+ };
+ typedef ::boost::mpl::set<action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& , FSM&,SourceState& src,TargetState& )const
+ {
+ return src;
+ }
+};
+struct get_source_tag {};
+struct GetSource_Helper: proto::extends< proto::terminal<get_source_tag>::type, GetSource_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef GetSource_ type;
+ };
+};
+GetSource_Helper const source_;
+
+struct GetTarget_ : euml_action<GetTarget_ >
+{
+ using euml_action<GetTarget_ >::operator=;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef TargetState& type;
+ };
+ typedef ::boost::mpl::set<action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& , FSM&,SourceState& ,TargetState& tgt)const
+ {
+ return tgt;
+ }
+};
+struct get_target_tag {};
+struct GetTarget_Helper: proto::extends< proto::terminal<get_target_tag>::type, GetTarget_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef GetTarget_ type;
+ };
+};
+GetTarget_Helper const target_;
+
+struct GetState_ : euml_action<GetState_ >
+{
+ using euml_action<GetState_ >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef STATE& type;
+ };
+ typedef ::boost::mpl::set<state_action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const&,FSM& ,STATE& state )
+ {
+ return state;
+ }
+};
+struct get_state_tag {};
+struct GetState_Helper: proto::extends< proto::terminal<get_state_tag>::type, GetState_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef GetState_ type;
+ };
+};
+GetState_Helper const state_;
+
+struct GetEvent_ : euml_action<GetEvent_ >
+{
+ using euml_action<GetEvent_ >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef Event const& type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef EVT const& type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& ,STATE& )
+ {
+ return evt;
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
+ {
+ return evt;
+ }
+};
+struct get_event_tag {};
+struct GetEvent_Helper: proto::extends< proto::terminal<get_event_tag>::type, GetEvent_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef GetEvent_ type;
+ };
+};
+GetEvent_Helper const event_;
+
+struct GetFsm_ : euml_action<GetFsm_>
+{
+ using euml_action<GetFsm_>::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef FSM& type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef FSM& type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const&,FSM& fsm,STATE& )
+ {
+ return fsm;
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt ,FSM& fsm,SourceState& ,TargetState&)const
+ {
+ return fsm;
+ }
+};
+struct get_fsm_tag {};
+struct GetFsm_Helper: proto::extends< proto::terminal<get_fsm_tag>::type, GetFsm_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef GetFsm_ type;
+ };
+};
+GetFsm_Helper const fsm_;
+
+template <class StateName,class Param1=void, class Enable=void >
+struct SubState_ : euml_action<SubState_<StateName,Param1,Enable> > {};
+
+template <class StateName,class Param1>
+struct SubState_ <StateName,Param1
+ , typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type >::type>
+ : euml_action<SubState_<StateName, Param1 > >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef StateName& type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef StateName& type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ StateName& operator()(EVT const&,FSM& fsm,SourceState& ,TargetState& )const
+ {
+ return fsm.template get_state<StateName&>();
+ }
+ template <class Event,class FSM,class STATE>
+ StateName& operator()(Event const& ,FSM& fsm,STATE& )const
+ {
+ return fsm.template get_state<StateName&>();
+ }
+};
+
+template <class StateName,class Param1>
+struct SubState_ <StateName,Param1
+ , typename ::boost::disable_if<
+ typename ::boost::is_same<Param1,void>::type
+ >::type>
+ : euml_action<SubState_<StateName, Param1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef StateName& type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef StateName& type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ StateName& operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Param1()(evt,fsm,src,tgt)).template get_state<StateName&>();
+ }
+ template <class Event,class FSM,class STATE>
+ StateName& operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (Param1()(evt,fsm,state)).template get_state<StateName&>();
+ }
+};
+struct substate_tag {};
+struct SubState_Helper: proto::extends< proto::terminal<substate_tag>::type, SubState_Helper, sm_domain>
+{
+ using proto::extends< proto::terminal<substate_tag>::type, SubState_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef SubState_<Arg1,Arg2> type;
+ };
+};
+SubState_Helper const substate_;
+
+template <class Target,class Index>
+struct GetAttribute_ : euml_action<GetAttribute_<Target, Index> >
+{
+ using euml_action<GetAttribute_<Target,Index> >::operator=;
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<
+ typename get_attributes_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Target,Event,FSM,STATE>::type>::type>::type,
+ typename Index::value_type >::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<
+ typename get_attributes_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Target,EVT,FSM,SourceState,TargetState>::type>::type>::type,
+ typename Index::value_type >::type type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Target::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Target()(evt,fsm,src,tgt)).template get_attribute<Index::value_type::value>();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Target::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Target()(evt,fsm,state)).template get_attribute<Index::value_type::value>();
+ }
+};
+
+struct get_attribute_tag
+{
+};
+struct GetAttribute_Helper: proto::extends< proto::terminal<get_attribute_tag>::type, GetAttribute_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef GetAttribute_<Arg1,Arg2> type;
+ };
+};
+GetAttribute_Helper const attribute_;
+
+template <int Index>
+struct Source_ : euml_action<Source_<Index> >
+{
+ using euml_action<Source_<Index> >::operator=;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<typename SourceState::attributes_type,
+ ::boost::mpl::int_<Index> >::type type;
+ };
+ typedef ::boost::mpl::set<action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& , FSM&,SourceState& src,TargetState& )const
+ {
+ return src.template get_attribute<Index>();
+ }
+};
+template <int Index>
+struct Target_ : euml_action<Target_<Index> >
+{
+ using euml_action<Target_<Index> >::operator=;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<typename TargetState::attributes_type,
+ ::boost::mpl::int_<Index> >::type type;
+ };
+ typedef ::boost::mpl::set<action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const
+ {
+ return tgt.template get_attribute<Index>();
+ }
+};
+template <int Index>
+struct State_ : euml_action<State_<Index> >
+{
+ using euml_action<State_<Index> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<typename STATE::attributes_type,
+ ::boost::mpl::int_<Index> >::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const&,FSM& ,STATE& state )
+ {
+ return state.template get_attribute<Index>();
+ }
+};
+template <int Index>
+struct Event_ : euml_action<Event_<Index> >
+{
+ using euml_action<Event_<Index> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::add_const<
+ typename ::boost::fusion::result_of::at<typename Event::attributes_type,
+ ::boost::mpl::int_<Index> >::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::add_const<
+ typename ::boost::fusion::result_of::at<typename EVT::attributes_type,
+ ::boost::mpl::int_<Index> >::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& ,STATE& )
+ {
+ return evt.template get_attribute<Index>();
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
+ {
+ return evt.template get_attribute<Index>();
+ }
+};
+template <class StateType,int Index>
+struct State_Attribute_ : euml_action<State_Attribute_<StateType,Index> >
+{
+ using euml_action<State_Attribute_<StateType,Index> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<typename StateType::attributes_type,
+ ::boost::mpl::int_<Index> >::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const&,FSM& fsm,STATE& )
+ {
+ return fsm.template get_state<StateType&>().template get_attribute<Index>();
+ }
+};
+
+template <int Index>
+struct Fsm_ : euml_action<Fsm_<Index> >
+{
+ using euml_action<Fsm_<Index> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<typename FSM::attributes_type,
+ ::boost::mpl::int_<Index> >::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename
+ ::boost::fusion::result_of::at<typename FSM::attributes_type,
+ ::boost::mpl::int_<Index> >::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const&,FSM& fsm,STATE& )
+ {
+ return fsm.template get_attribute<Index>();;
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt ,FSM& fsm,SourceState& ,TargetState&)const
+ {
+ return fsm.template get_attribute<Index>();
+ }
+};
+
+struct True_ : euml::euml_action<True_>
+{
+ using euml_action<True_>::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM&,SourceState& ,TargetState& )
+ {
+ return true;
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const&,FSM&,STATE& )
+ {
+ return true;
+ }
+};
+struct False_ : euml::euml_action<False_>
+{
+ using euml_action<False_>::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM&,SourceState& ,TargetState& )
+ {
+ return false;
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const&,FSM&,STATE& )
+ {
+ return false;
+ }
+};
+template <int Val>
+struct Int_ : euml_action<Int_<Val> >
+{
+ using euml_action<Int_<Val> >::operator=;
+ typedef ::boost::mpl::int_<Val> value_type;
+ enum {value = Val};
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef int type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef int type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ int operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
+ {
+ return Val;
+ }
+ template <class Event,class FSM,class STATE>
+ int operator()(Event const& ,FSM& ,STATE& )
+ {
+ return Val;
+ }
+};
+
+template <char Val>
+struct Char_ : euml_action<Char_<Val> >
+{
+ using euml_action<Char_<Val> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef char type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef char type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ char operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
+ {
+ return Val;
+ }
+ template <class Event,class FSM,class STATE>
+ char operator()(Event const& ,FSM& ,STATE& )
+ {
+ return Val;
+ }
+};
+
+template <size_t Val>
+struct Size_t_ : euml_action<Size_t_<Val> >
+{
+ using euml_action<Size_t_<Val> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef size_t type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef size_t type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ size_t operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
+ {
+ return Val;
+ }
+ template <class Event,class FSM,class STATE>
+ size_t operator()(Event const& ,FSM& ,STATE& )
+ {
+ return Val;
+ }
+};
+
+#if BOOST_VERSION >= 104000
+
+template <class T>
+struct String_ : euml_action<String_<T> >
+{
+ using euml_action<String_<T> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef char const* type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef char const* type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ char const* operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
+ {
+ return ::boost::mpl::c_str<T>::value;
+ }
+ template <class Event,class FSM,class STATE>
+ char const* operator()(Event const& ,FSM& ,STATE& )
+ {
+ return ::boost::mpl::c_str<T>::value;
+ }
+};
+#endif
+
+
+template <class T>
+struct Predicate_ : euml_action<Predicate_<T> >
+{
+ using euml_action<Predicate_<T> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef T type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef T type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ T operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
+ {
+ return T();
+ }
+ template <class Event,class FSM,class STATE>
+ T operator()(Event const& ,FSM& ,STATE& )
+ {
+ return T();
+ }
+};
+
+template <class ToProcessEvt,class Param1=void, class Param2=void, class Param3=void, class Param4=void, class Enable=void >
+struct Process_ : euml_action<Process_<ToProcessEvt,Param1,Param2,Param3,Param4,Enable> > {};
+
+template <class ToProcessEvt,class Param1, class Param2, class Param3, class Param4>
+struct Process_ <ToProcessEvt,Param1,Param2,Param3,Param4
+ , typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type >::type>
+ : euml_action<Process_<ToProcessEvt, 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&,FSM& fsm,SourceState& ,TargetState& )const
+ {
+ fsm.process_event(ToProcessEvt());
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& ,FSM& fsm,STATE& )const
+ {
+ fsm.process_event(ToProcessEvt());
+ }
+};
+
+template <class ToProcessEvt,class Param1, class Param2, class Param3, class Param4>
+struct Process_ <ToProcessEvt,Param1,Param2,Param3,Param4
+ , typename ::boost::disable_if<
+ typename ::boost::mpl::or_<
+ typename ::boost::is_same<Param1,void>::type,
+ typename ::boost::mpl::not_<typename ::boost::is_same<Param2,void>::type>::type
+ >::type
+ >::type>
+ : euml_action<Process_<ToProcessEvt, 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(ToProcessEvt());
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
+ }
+};
+
+template <class ToProcessEvt,class Param1, class Param2, class Param3, class Param4>
+struct Process_ <ToProcessEvt,Param1,Param2,Param3,Param4
+ , typename ::boost::disable_if<
+ typename ::boost::mpl::or_<
+ typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<typename ::boost::is_same<Param3,void>::type>::type
+ >::type
+ >::type>
+ : euml_action<Process_<ToProcessEvt, 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(ToProcessEvt());
+ (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
+ (Param2()(evt,fsm,state)).process_event(ToProcessEvt());
+ }
+};
+
+template <class ToProcessEvt,class Param1, class Param2, class Param3, class Param4>
+struct Process_ <ToProcessEvt,Param1,Param2,Param3,Param4
+ , typename ::boost::disable_if<
+ typename ::boost::mpl::or_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<typename ::boost::is_same<Param4,void>::type>::type
+ >::type
+ >::type>
+ : euml_action<Process_<ToProcessEvt, 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(ToProcessEvt());
+ (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
+ (Param3()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
+ (Param2()(evt,fsm,state)).process_event(ToProcessEvt());
+ (Param3()(evt,fsm,state)).process_event(ToProcessEvt());
+ }
+};
+
+template <class ToProcessEvt,class Param1, class Param2, class Param3, class Param4>
+struct Process_ <ToProcessEvt,Param1,Param2,Param3,Param4
+ , typename ::boost::disable_if<
+ typename ::boost::is_same<Param4,void>::type
+ >::type>
+ : euml_action<Process_<ToProcessEvt, 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(ToProcessEvt());
+ (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
+ (Param3()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
+ (Param4()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
+ (Param2()(evt,fsm,state)).process_event(ToProcessEvt());
+ (Param3()(evt,fsm,state)).process_event(ToProcessEvt());
+ (Param4()(evt,fsm,state)).process_event(ToProcessEvt());
+ }
+};
+struct process_tag {};
+struct Process_Helper: proto::extends< proto::terminal<process_tag>::type, Process_Helper, sm_domain>
+{
+ using proto::extends< proto::terminal<process_tag>::type, Process_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Process_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+Process_Helper const process_;
+
+template <class ToProcessEvt,class Value,class Param1=void, class Param2=void, class Param3=void, class Enable=void >
+struct Process2_ : euml_action<Process2_<ToProcessEvt,Value,Param1,Param2,Param3,Enable> > {};
+
+template <class ToProcessEvt,class Value,class Param1, class Param2, class Param3>
+struct Process2_ <ToProcessEvt,Value,Param1,Param2,Param3
+ , typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type >::type>
+ : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, Param3 > >
+{
+ 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
+ {
+ fsm.process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ fsm.process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ }
+};
+
+template <class ToProcessEvt,class Value,class Param1, class Param2, class Param3>
+struct Process2_ <ToProcessEvt,Value,Param1,Param2,Param3
+ , typename ::boost::disable_if<
+ typename ::boost::mpl::or_<
+ typename ::boost::is_same<Param1,void>::type,
+ typename ::boost::mpl::not_<typename ::boost::is_same<Param2,void>::type>::type
+ >::type
+ >::type>
+ : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, Param3> >
+{
+ 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(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ }
+};
+
+template <class ToProcessEvt,class Value,class Param1, class Param2, class Param3>
+struct Process2_ <ToProcessEvt,Value,Param1,Param2,Param3
+ , typename ::boost::disable_if<
+ typename ::boost::mpl::or_<
+ typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<typename ::boost::is_same<Param3,void>::type>::type
+ >::type
+ >::type>
+ : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, Param3> >
+{
+ 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(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ (Param2()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ }
+};
+
+
+template <class ToProcessEvt,class Value,class Param1, class Param2, class Param3>
+struct Process2_ <ToProcessEvt,Value,Param1,Param2,Param3
+ , typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type>
+ : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, Param3> >
+{
+ 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(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ (Param3()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ (Param1()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ (Param2()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ (Param3()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
+ }
+};
+
+struct process2_tag {};
+struct Process2_Helper : proto::extends< proto::terminal<process2_tag>::type, Process2_Helper, sm_domain>
+{
+ using proto::extends< proto::terminal<process2_tag>::type, Process2_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Process2_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+Process2_Helper const process2_;
+
+template <class Flag,class Param1=void, class Enable=void >
+struct Get_Flag_ : euml_action<Get_Flag_<Flag,Param1,Enable> > {};
+
+template <class Flag,class Param1>
+struct Get_Flag_ <Flag,Param1
+ , typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type >::type>
+ : euml_action<Get_Flag_<Flag, Param1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const&,FSM& fsm,SourceState& ,TargetState& )const
+ {
+ return fsm.template is_flag_active<Flag>();
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& ,FSM& fsm,STATE& )const
+ {
+ return fsm.template is_flag_active<Flag>();
+ }
+};
+
+template <class Flag,class Param1>
+struct Get_Flag_ <Flag,Param1
+ , typename ::boost::disable_if<
+ typename ::boost::is_same<Param1,void>::type
+ >::type>
+ : euml_action<Get_Flag_<Flag, Param1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Param1()(evt,fsm,src,tgt)).template is_flag_active<Flag>();
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (Param1()(evt,fsm,state)).template is_flag_active<Flag>();
+ }
+};
+
+struct get_flag_tag
+{
+};
+struct Get_Flag_Helper: proto::extends< proto::terminal<get_flag_tag>::type, Get_Flag_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Get_Flag_<Arg1,Arg2> type;
+ };
+};
+Get_Flag_Helper const is_flag_;
+
+#ifdef BOOST_MSVC
+#define MSM_EUML_FUNCTION(functor,function,function_name,result_trans,result_state) \
+ template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
+ class Param5=void,class Param6=void,class Enable=void > \
+ struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6,Enable> > {}; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5, class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type \
+ operator()(EVT const& , FSM& ,SourceState& ,TargetState& )const { \
+ return function ();} \
+ template <class Event,class FSM,class STATE> \
+ typename state_action_result<Event,FSM,STATE>::type \
+ operator()(Event const& ,FSM& ,STATE& )const { \
+ return function ();} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param1,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param2,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param5,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param6,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::is_same<Param6,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt),Param6()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state),Param5()(evt,fsm,state),Param6()(evt,fsm,state));} }; \
+ struct function_name ## tag{}; \
+ struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
+ functor ## Helper , sm_domain> { template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5,class Arg6> \
+ struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5,Arg6> type;}; }; \
+ functor ## Helper const function_name ;
+
+#define MSM_EUML_METHOD(functor,function,function_name,result_trans,result_state) \
+ template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
+ class Param5=void,class Param6=void,class Enable=void > \
+ struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6,Enable> > {}; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5, class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::enable_if<typename ::boost::is_same<Param2,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function();} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function();} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param5,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param6,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
+ struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
+ typename ::boost::disable_if<typename ::boost::is_same<Param6,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt),Param6()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state),Param5()(evt,fsm,state),Param6()(evt,fsm,state));} }; \
+ struct function_name ## tag{}; \
+ struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
+ functor ## Helper , sm_domain> { template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5,class Arg6> \
+ struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5,Arg6> type;}; }; \
+ functor ## Helper const function_name ;
+
+#else
+
+#define MSM_EUML_FUNCTION(functor,function,function_name,result_trans,result_state) \
+ template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
+ class Param5=void,class Enable=void > \
+ struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Enable> > {}; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param1,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param2,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::is_same<Param5,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
+ struct function_name ## tag{}; \
+ struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
+ functor ## Helper , sm_domain> { template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5> \
+ struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5> type;}; }; \
+ functor ## Helper const function_name ;
+
+#define MSM_EUML_METHOD(functor,function,function_name,result_trans,result_state) \
+ template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
+ class Param5=void,class Enable=void > \
+ struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Enable> > {}; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::enable_if<typename ::boost::is_same<Param2,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function();} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function();} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::mpl::or_< \
+ typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
+ typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state));} }; \
+ template <class Param1, class Param2, class Param3, class Param4, class Param5> \
+ struct functor<Param1,Param2,Param3,Param4,Param5, \
+ typename ::boost::disable_if<typename ::boost::is_same<Param5,void>::type>::type> \
+ : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
+ template <class Event,class FSM,class STATE > struct state_action_result { \
+ typedef result_state type;} ; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ struct transition_action_result { typedef result_trans type;}; \
+ typedef ::boost::mpl::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
+ template <class EVT,class FSM,class SourceState,class TargetState> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::action_tag>::type, \
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
+ return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
+ ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
+ template <class Event,class FSM,class STATE> \
+ typename ::boost::enable_if<typename ::boost::mpl::has_key< \
+ typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
+ typename state_action_result<Event,FSM,STATE>::type >::type \
+ operator()(Event const& evt,FSM& fsm,STATE& state )const { \
+ return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
+ ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
+ struct function_name ## tag{}; \
+ struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
+ functor ## Helper , sm_domain> { template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5> \
+ struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5> type;}; }; \
+ functor ## Helper const function_name ;
+
+#endif
+
+#define RESULT_TYPE2_PARAM1 typename get_result_type2<Param1,Event,FSM,STATE>::type
+#define RESULT_TYPE_PARAM1 typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type
+#define RESULT_TYPE2_PARAM2 typename get_result_type2<Param2,Event,FSM,STATE>::type
+#define RESULT_TYPE_PARAM2 typename get_result_type<Param2,EVT,FSM,SourceState,TargetState>::type
+#define RESULT_TYPE2_PARAM3 typename get_result_type2<Param3,Event,FSM,STATE>::type
+#define RESULT_TYPE_PARAM3 typename get_result_type<Param3,EVT,FSM,SourceState,TargetState>::type
+#define RESULT_TYPE2_PARAM4 typename get_result_type2<Param4,Event,FSM,STATE>::type
+#define RESULT_TYPE_PARAM4 typename get_result_type<Param4,EVT,FSM,SourceState,TargetState>::type
+#define RESULT_TYPE2_PARAM5 typename get_result_type2<Param5,Event,FSM,STATE>::type
+#define RESULT_TYPE_PARAM5 typename get_result_type<Param5,EVT,FSM,SourceState,TargetState>::type
+#define RESULT_TYPE2_PARAM6 typename get_result_type2<Param6,Event,FSM,STATE>::type
+#define RESULT_TYPE_PARAM6 typename get_result_type<Param6,EVT,FSM,SourceState,TargetState>::type
+
+
+#define RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 typename std::iterator_traits<typename get_result_type2<Param1,Event,FSM,STATE>::type>::difference_type
+#define RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 typename std::iterator_traits<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::difference_type
+
+#define RESULT_TYPE2_REMOVE_REF_PARAM1 typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type
+#define RESULT_TYPE_REMOVE_REF_PARAM1 typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type
+
+#define RESULT_TYPE2_PAIR_REMOVE_REF_PARAM1 std::pair<RESULT_TYPE2_REMOVE_REF_PARAM1,RESULT_TYPE2_REMOVE_REF_PARAM1>
+#define RESULT_TYPE_PAIR_REMOVE_REF_PARAM1 std::pair<RESULT_TYPE_REMOVE_REF_PARAM1,RESULT_TYPE_REMOVE_REF_PARAM1>
+
+#define RESULT_TYPE2_GET_REF_REMOVE_REF_PARAM1 typename get_reference<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
+#define RESULT_TYPE_GET_REF_REMOVE_REF_PARAM1 typename get_reference<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
+
+#define RESULT_TYPE2_GET_ITERATOR_REMOVE_REF_PARAM1 typename get_iterator<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
+#define RESULT_TYPE_GET_ITERATOR_REMOVE_REF_PARAM1 typename get_iterator<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
+
+#define RESULT_TYPE2_GET_REV_ITERATOR_REMOVE_REF_PARAM1 typename get_reverse_iterator<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
+#define RESULT_TYPE_GET_REV_ITERATOR_REMOVE_REF_PARAM1 typename get_reverse_iterator<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
+
+#define RESULT_TYPE2_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
+#define RESULT_TYPE_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
+
+}}}} // boost::msm::front::euml
+
+#endif // BOOST_MSM_FRONT_EUML_COMMON_H

Added: sandbox/msm/boost/msm/front/euml/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/container.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,4210 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_CONTAINER_H
+#define BOOST_MSM_FRONT_EUML_CONTAINER_H
+
+#include <utility>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/set.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/proto/core.hpp>
+#include <boost/msm/front/euml/common.hpp>
+#include <boost/msm/front/euml/operator.hpp>
+#include <boost/type_traits.hpp>
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category)
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+
+template <class T>
+struct Front_ : euml_action<Front_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_reference<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_reference<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).front();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).front();
+ }
+};
+
+struct front_tag {};
+struct Front_Helper: proto::extends< proto::terminal<front_tag>::type, Front_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Front_<Arg1> type;
+ };
+};
+Front_Helper const front_;
+
+template <class T>
+struct Back_ : euml_action<Back_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_reference<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_reference<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).back();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).back();
+ }
+};
+
+struct back_tag {};
+struct Back_Helper: proto::extends< proto::terminal<back_tag>::type, Back_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Back_<Arg1> type;
+ };
+};
+Back_Helper const back_;
+
+template <class T>
+struct Begin_ : euml_action<Begin_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).begin();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).begin();
+ }
+};
+
+struct begin_tag {};
+struct Begin_Helper: proto::extends< proto::terminal<begin_tag>::type, Begin_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Begin_<Arg1> type;
+ };
+};
+Begin_Helper const begin_;
+
+template <class T>
+struct End_ : euml_action<End_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).end();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).end();
+ }
+};
+struct end_tag {};
+struct End_Helper: proto::extends< proto::terminal<end_tag>::type, End_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef End_<Arg1> type;
+ };
+};
+End_Helper const end_;
+
+template <class T>
+struct RBegin_ : euml_action<RBegin_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_reverse_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_reverse_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).rbegin();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).rbegin();
+ }
+};
+
+struct rbegin_tag {};
+struct RBegin_Helper: proto::extends< proto::terminal<rbegin_tag>::type, RBegin_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef RBegin_<Arg1> type;
+ };
+};
+RBegin_Helper const rbegin_;
+
+template <class T>
+struct REnd_ : euml_action<REnd_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_reverse_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_reverse_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).rend();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).rend();
+ }
+};
+struct rend_tag {};
+struct REnd_Helper: proto::extends< proto::terminal<rend_tag>::type, REnd_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef REnd_<Arg1> type;
+ };
+};
+REnd_Helper const rend_;
+
+template <class Container,class Element>
+struct Push_Back_ : euml_action<Push_Back_<Container,Element> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).push_back(Element()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).push_back(Element()(evt,fsm,state));
+ }
+};
+struct push_back_tag {};
+struct Push_Back_Helper: proto::extends< proto::terminal<push_back_tag>::type, Push_Back_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Push_Back_<Arg1,Arg2> type;
+ };
+};
+Push_Back_Helper const push_back_;
+
+template <class Container>
+struct Pop_Back_ : euml_action<Pop_Back_<Container> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).pop_back();
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).pop_back();
+ }
+};
+struct pop_back_tag {};
+struct Pop_Back_Helper: proto::extends< proto::terminal<pop_back_tag>::type, Pop_Back_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Pop_Back_<Arg1> type;
+ };
+};
+Pop_Back_Helper const pop_back_;
+
+template <class Container,class Element>
+struct Push_Front_ : euml_action<Push_Front_<Container,Element> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).push_front(Element()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).push_front(Element()(evt,fsm,state));
+ }
+};
+struct push_front_tag {};
+struct Push_Front_Helper: proto::extends< proto::terminal<push_front_tag>::type, Push_Front_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Push_Front_<Arg1,Arg2> type;
+ };
+};
+Push_Front_Helper const push_front_;
+
+template <class Container>
+struct Pop_Front_ : euml_action<Pop_Front_<Container> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).pop_front();
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).pop_front();
+ }
+};
+struct pop_front_tag {};
+struct Pop_Front_Helper: proto::extends< proto::terminal<pop_front_tag>::type, Pop_Front_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Pop_Front_<Arg1> type;
+ };
+};
+Pop_Front_Helper const pop_front_;
+
+template <class Container>
+struct Clear_ : euml_action<Clear_<Container> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).clear();
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).clear();
+ }
+};
+struct clear_tag {};
+struct Clear_Helper: proto::extends< proto::terminal<clear_tag>::type, Clear_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Clear_<Arg1> type;
+ };
+};
+Clear_Helper const clear_;
+
+template <class Container>
+struct ListReverse_ : euml_action<ListReverse_<Container> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).reverse();
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).reverse();
+ }
+};
+struct list_reverse_tag {};
+struct ListReverse_Helper: proto::extends< proto::terminal<list_reverse_tag>::type, ListReverse_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ListReverse_<Arg1> type;
+ };
+};
+ListReverse_Helper const list_reverse_;
+
+template <class Container, class Predicate, class Enable=void>
+struct ListUnique_ : euml_action<ListUnique_<Container,Predicate,Enable> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).unique();
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).unique();
+ }
+};
+template <class Container, class Predicate >
+struct ListUnique_<Container,Predicate,
+ typename ::boost::disable_if<typename ::boost::is_same<Predicate,void>::type >::type>
+ : euml_action<ListUnique_<Container,Predicate> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).unique(Predicate()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).unique(Predicate()(evt,fsm,state));
+ }
+};
+struct list_unique_tag {};
+struct ListUnique_Helper: proto::extends< proto::terminal<list_unique_tag>::type, ListUnique_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ListUnique_<Arg1,Arg2> type;
+ };
+};
+ListUnique_Helper const list_unique_;
+
+template <class Container, class Predicate, class Enable=void>
+struct ListSort_ : euml_action<ListSort_<Container,Predicate,Enable> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).sort();
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).sort();
+ }
+};
+template <class Container, class Predicate >
+struct ListSort_<Container,Predicate,
+ typename ::boost::disable_if<typename ::boost::is_same<Predicate,void>::type >::type>
+ : euml_action<ListSort_<Container,Predicate> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).sort(Predicate()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).sort(Predicate()(evt,fsm,state));
+ }
+};
+struct list_sort_tag {};
+struct ListSort_Helper: proto::extends< proto::terminal<list_sort_tag>::type, ListSort_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ListSort_<Arg1,Arg2> type;
+ };
+};
+ListSort_Helper const list_sort_;
+
+template <class Container>
+struct Capacity_ : euml_action<Capacity_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).capacity();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).capacity();
+ }
+};
+struct capacity_tag {};
+struct Capacity_Helper: proto::extends< proto::terminal<capacity_tag>::type, Capacity_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Capacity_<Arg1> type;
+ };
+};
+Capacity_Helper const capacity_;
+
+template <class Container>
+struct Size_ : euml_action<Size_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).size();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).size();
+ }
+};
+struct size_tag {};
+struct Size_Helper: proto::extends< proto::terminal<size_tag>::type, Size_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Size_<Arg1> type;
+ };
+};
+Size_Helper const size_;
+
+template <class Container>
+struct Max_Size_ : euml_action<Max_Size_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).max_size();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).max_size();
+ }
+};
+struct max_size_tag {};
+struct Max_Size_Helper: proto::extends< proto::terminal<max_size_tag>::type, Max_Size_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Max_Size_<Arg1> type;
+ };
+};
+Max_Size_Helper const max_size_;
+
+template <class Container, class Value>
+struct Reserve_ : euml_action<Reserve_<Container,Value> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).reserve(Value()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).reserve(Value()(evt,fsm,state));
+ }
+};
+struct reserve_tag {};
+struct Reserve_Helper: proto::extends< proto::terminal<reserve_tag>::type, Reserve_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Reserve_<Arg1,Arg2> type;
+ };
+};
+Reserve_Helper const reserve_;
+
+template <class Container, class Num, class Value ,class Enable=void >
+struct Resize_ : euml_action<Resize_<Container,Num,Value> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).resize(Num()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).resize(Num()(evt,fsm,state));
+ }
+};
+template <class Container, class Num , class Value >
+struct Resize_<Container,Num,Value,typename ::boost::disable_if<typename ::boost::is_same<Value,void>::type >::type>
+ : euml_action<Resize_<Container,Num,Value> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).resize(Num()(evt,fsm,src,tgt),Value()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).resize(Num()(evt,fsm,state),Value()(evt,fsm,state));
+ }
+};
+struct resize_tag {};
+struct Resize_Helper: proto::extends< proto::terminal<resize_tag>::type, Resize_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Resize_<Arg1,Arg2,Arg3> type;
+ };
+};
+Resize_Helper const resize_;
+
+template <class Container, class Param1, class Param2, class Param3 ,class Enable=void >
+struct Insert_ : euml_action<Insert_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+// version for 2 parameters
+template <class Container, class Param1, class Param2, class Param3>
+struct Insert_ < Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<Insert_<Container,Param1,Param2,Param3> >
+{
+ // return value will actually not be correct for set::insert(it1,it2), should be void
+ // but it's ok as nobody should call an inexistent return type
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ // version for transition + second param not an iterator (meaning that, Container is not an associative container)
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename ::boost::mpl::not_<
+ typename has_iterator_category<
+ typename Param2::template transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ >::type
+ >::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+
+ // version for transition + second param is an iterator (meaning that, Container is an associative container)
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename has_iterator_category<
+ typename Param2::template transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ >::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+
+ // version for state action + second param not an iterator (meaning that, Container is not an associative container)
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename ::boost::mpl::not_<
+ typename has_iterator_category<
+ typename Param2::template state_action_result<Event,FSM,STATE>::type
+ >::type
+ >::type
+ >::type,
+ typename state_action_result<Event,FSM,STATE>::type
+ >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+
+ // version for state action + second param is an iterator (meaning that, Container is an associative container)
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename has_iterator_category<
+ typename Param2::template state_action_result<Event,FSM,STATE>::type
+ >::type
+ >::type,
+ typename state_action_result<Event,FSM,STATE>::type
+ >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+// version for 3 parameters (sequence containers)
+template <class Container, class Param1, class Param2, class Param3 >
+struct Insert_<Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<Insert_<Container,Param1,Param2,Param3> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+// version for 1 parameter (associative containers)
+template <class Container, class Param1, class Param2, class Param3>
+struct Insert_ < Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type >
+ : euml_action<Insert_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename std::pair<
+ typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type,bool> type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename std::pair<
+ typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type,bool> type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state));
+ }
+};
+
+struct insert_tag {};
+struct Insert_Helper: proto::extends< proto::terminal<insert_tag>::type, Insert_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Insert_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+Insert_Helper const insert_;
+
+template <class Container1,class Container2>
+struct Swap_ : euml_action<Swap_<Container1,Container2> >
+{
+ 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
+ {
+ (Container1()(evt,fsm,src,tgt)).swap(Container2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container1()(evt,fsm,state)).swap(Container2()(evt,fsm,state));
+ }
+};
+struct swap_tag {};
+struct Swap_Helper: proto::extends< proto::terminal<swap_tag>::type, Swap_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Swap_<Arg1,Arg2> type;
+ };
+};
+Swap_Helper const swap_;
+
+template <class Container, class Iterator1, class Iterator2 ,class Enable=void >
+struct Erase_ : euml_action<Erase_<Container,Iterator1,Iterator2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Iterator1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Iterator1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Iterator1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).erase(Iterator1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Iterator1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).erase(Iterator1()(evt,fsm,state));
+ }
+};
+template <class Container, class Iterator1 , class Iterator2 >
+struct Erase_<Container,Iterator1,Iterator2,
+ typename ::boost::disable_if<typename ::boost::is_same<Iterator2,void>::type >::type>
+ : euml_action<Erase_<Container,Iterator1,Iterator2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Iterator1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Iterator1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Iterator1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).erase(Iterator1()(evt,fsm,src,tgt),Iterator2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Iterator1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).erase(Iterator1()(evt,fsm,state),Iterator2()(evt,fsm,state));
+ }
+};
+struct erase_tag {};
+struct Erase_Helper: proto::extends< proto::terminal<erase_tag>::type, Erase_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Erase_<Arg1,Arg2,Arg3> type;
+ };
+};
+Erase_Helper const erase_;
+
+template <class Container>
+struct Empty_ : euml_action<Empty_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).empty();
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).empty();
+ }
+};
+struct empty_tag {};
+struct Empty_Helper: proto::extends< proto::terminal<empty_tag>::type, Empty_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Empty_<Arg1> type;
+ };
+};
+Empty_Helper const empty_;
+
+template <class Container,class Element>
+struct ListRemove_ : euml_action<ListRemove_<Container,Element> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).remove(Element()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).remove(Element()(evt,fsm,state));
+ }
+};
+struct list_remove_tag {};
+struct ListRemove_Helper: proto::extends< proto::terminal<list_remove_tag>::type, ListRemove_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ListRemove_<Arg1,Arg2> type;
+ };
+};
+ListRemove_Helper const list_remove_;
+
+template <class Container,class Element>
+struct ListRemove_If_ : euml_action<ListRemove_If_<Container,Element> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).remove_if(Element()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).remove_if(Element()(evt,fsm,state));
+ }
+};
+struct list_remove_if_tag {};
+struct ListRemove_If_Helper: proto::extends< proto::terminal<list_remove_if_tag>::type, ListRemove_If_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ListRemove_If_<Arg1,Arg2> type;
+ };
+};
+ListRemove_If_Helper const list_remove_if_;
+
+template <class Container, class ToMerge, class Predicate, class Enable=void>
+struct ListMerge_ : euml_action<ListMerge_<Container,ToMerge,Predicate,Enable> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).merge(ToMerge()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).merge(ToMerge()(evt,fsm,state));
+ }
+};
+template <class Container, class ToMerge, class Predicate >
+struct ListMerge_<Container,ToMerge,Predicate,
+ typename ::boost::disable_if<typename ::boost::is_same<Predicate,void>::type >::type>
+ : euml_action<ListMerge_<Container,ToMerge,Predicate> >
+{
+ 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
+ {
+ (Container()(evt,fsm,src,tgt)).merge(ToMerge()(evt,fsm,src,tgt),Predicate()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).merge(ToMerge()(evt,fsm,state),Predicate()(evt,fsm,state));
+ }
+};
+struct list_merge_tag {};
+struct ListMerge_Helper: proto::extends< proto::terminal<list_merge_tag>::type, ListMerge_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef ListMerge_<Arg1,Arg2,Arg3> type;
+ };
+};
+ListMerge_Helper const list_merge_;
+
+template <class Container, class Param1, class Param2, class Param3, class Param4 ,class Enable=void >
+struct Splice_ : euml_action<Splice_<Container,Param1,Param2,Param3,Param4,Enable> >
+{
+ 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>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct Splice_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type>
+ : euml_action<Splice_<Container,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
+ {
+ (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct Splice_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<typename ::boost::is_same<Param4,void>::type >::type>
+ : euml_action<Splice_<Container,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
+ {
+ (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state),Param4()(evt,fsm,state));
+ }
+};
+struct splice_tag {};
+struct Splice_Helper: proto::extends< proto::terminal<splice_tag>::type, Splice_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Splice_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+Splice_Helper const splice_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringFind_ : euml_action<StringFind_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFind_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringFind_<Container,Param1,Param2,Param3> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFind_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringFind_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFind_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringFind_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ find(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ find(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_find_tag {};
+struct StringFind_Helper: proto::extends< proto::terminal<string_find_tag>::type, StringFind_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringFind_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringFind_Helper const string_find_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringRFind_ : euml_action<StringRFind_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringRFind_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringRFind_<Container,Param1,Param2,Param3> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).rfind(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).rfind(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringRFind_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringRFind_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).rfind(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).rfind(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringRFind_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringRFind_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ rfind(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ rfind(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_rfind_tag {};
+struct StringRFind_Helper: proto::extends< proto::terminal<string_rfind_tag>::type, StringRFind_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringRFind_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringRFind_Helper const string_rfind_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringFindFirstOf_ : euml_action<StringFindFirstOf_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindFirstOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringFindFirstOf_<Container,Param1,Param2,Param3> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_first_of(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_first_of(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindFirstOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringFindFirstOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_first_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_first_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindFirstOf_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringFindFirstOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ find_first_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ find_first_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_find_first_of_tag {};
+struct StringFindFirstOf_Helper:
+ proto::extends< proto::terminal<string_find_first_of_tag>::type, StringFindFirstOf_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringFindFirstOf_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringFindFirstOf_Helper const string_find_first_of_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringFindFirstNotOf_ : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindFirstNotOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_first_not_of(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_first_not_of(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindFirstNotOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_first_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_first_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindFirstNotOf_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ find_first_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ find_first_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_find_first_not_of_tag {};
+struct StringFindFirstNotOf_Helper:
+ proto::extends< proto::terminal<string_find_first_not_of_tag>::type, StringFindFirstNotOf_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringFindFirstNotOf_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringFindFirstNotOf_Helper const string_find_first_not_of_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringFindLastOf_ : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindLastOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_last_of(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_last_of(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindLastOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_last_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_last_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindLastOf_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ find_last_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ find_last_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_find_last_of_tag {};
+struct StringFindLastOf_Helper:
+ proto::extends< proto::terminal<string_find_last_of_tag>::type, StringFindLastOf_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringFindLastOf_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringFindLastOf_Helper const string_find_last_of_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringFindLastNotOf_ : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindLastNotOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_last_not_of(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_last_not_of(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindLastNotOf_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).find_last_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).find_last_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringFindLastNotOf_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ find_last_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ find_last_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_find_last_not_of_tag {};
+struct StringFindLastNotOf_Helper:
+ proto::extends< proto::terminal<string_find_last_of_tag>::type, StringFindLastNotOf_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringFindLastNotOf_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringFindLastNotOf_Helper const string_find_last_not_of_;
+
+template <class Container>
+struct Npos_ : euml_action<Npos_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename Container::size_type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename Container::size_type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return Container::npos;
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return Container::npos;
+ }
+};
+
+template <class Container, class Param1, class Param2, class Enable=void >
+struct Associative_Erase_ : euml_action<Associative_Erase_<Container,Param1,Param2,Enable> >
+{
+};
+// version for 1 parameter
+template <class Container, class Param1, class Param2>
+struct Associative_Erase_ < Container,Param1,Param2,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<Associative_Erase_<Container,Param1,Param2> >
+{
+ // return value will actually not be correct for set::erase(it), should be void
+ // but it's ok as nobody should call an inexistent return type
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ // version for transition + param is an iterator
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename has_iterator_category<
+ typename Param1::template transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ >::type,
+ void
+ >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt));
+ }
+
+ // version for state action + param is an iterator
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename has_iterator_category<
+ typename Param1::template state_action_result<Event,FSM,STATE>::type
+ >::type
+ >::type,
+ void
+ >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state));
+ }
+
+ // version for transition + param not an iterator
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename ::boost::mpl::not_<
+ typename has_iterator_category<
+ typename Param1::template transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ >::type
+ >::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt));
+ }
+
+ // version for state action + param not an iterator
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename ::boost::mpl::not_<
+ typename has_iterator_category<
+ typename Param1::template state_action_result<Event,FSM,STATE>::type
+ >::type
+ >::type
+ >::type,
+ typename state_action_result<Event,FSM,STATE>::type
+ >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state));
+ }
+};
+
+
+// version for 2 parameters
+template <class Container, class Param1, class Param2>
+struct Associative_Erase_ < Container,Param1,Param2,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<Associative_Erase_<Container,Param1,Param2> >
+{
+ 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>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+struct associative_erase_tag {};
+struct Associative_Erase_Helper: proto::extends< proto::terminal<associative_erase_tag>::type, Associative_Erase_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Associative_Erase_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+Associative_Erase_Helper const associative_erase_;
+
+
+template <class T, class Param>
+struct Associative_Find_ : euml_action<Associative_Find_<T,Param> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).find(Param()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).find(Param()(evt,fsm,state));
+ }
+};
+
+struct associative_find_tag {};
+struct Associative_Find_Helper: proto::extends< proto::terminal<associative_find_tag>::type, Associative_Find_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Associative_Find_<Arg1,Arg2> type;
+ };
+};
+Associative_Find_Helper const associative_find_;
+
+template <class Container,class Param>
+struct AssociativeCount_ : euml_action<AssociativeCount_<Container,Param> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).count(Param()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).count(Param()(evt,fsm,state));
+ }
+};
+struct associative_count_tag {};
+struct AssociativeCount_Helper: proto::extends< proto::terminal<associative_count_tag>::type, AssociativeCount_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef AssociativeCount_<Arg1,Arg2> type;
+ };
+};
+AssociativeCount_Helper const associative_count_;
+
+template <class T, class Param>
+struct Associative_Lower_Bound_ : euml_action<Associative_Lower_Bound_<T,Param> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).lower_bound(Param()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).lower_bound(Param()(evt,fsm,state));
+ }
+};
+
+struct associative_lower_bound_tag {};
+struct Associative_Lower_Bound_Helper: proto::extends< proto::terminal<associative_lower_bound_tag>::type,
+ Associative_Lower_Bound_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Associative_Lower_Bound_<Arg1,Arg2> type;
+ };
+};
+Associative_Lower_Bound_Helper const associative_lower_bound_;
+
+template <class T, class Param>
+struct Associative_Upper_Bound_ : euml_action<Associative_Upper_Bound_<T,Param> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).upper_bound(Param()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).upper_bound(Param()(evt,fsm,state));
+ }
+};
+
+struct associative_upper_bound_tag {};
+struct Associative_Upper_Bound_Helper: proto::extends< proto::terminal<associative_upper_bound_tag>::type,
+ Associative_Upper_Bound_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Associative_Upper_Bound_<Arg1,Arg2> type;
+ };
+};
+Associative_Upper_Bound_Helper const associative_upper_bound_;
+
+template <class T>
+struct First_ : euml_action<First_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_first_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_first_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).first;
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).first;
+ }
+};
+
+struct first_tag {};
+struct First_Helper: proto::extends< proto::terminal<first_tag>::type, First_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef First_<Arg1> type;
+ };
+};
+First_Helper const first_;
+
+template <class T>
+struct Second_ : euml_action<Second_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_second_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_second_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).second;
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).second;
+ }
+};
+
+struct second_tag {};
+struct Second_Helper: proto::extends< proto::terminal<second_tag>::type, Second_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Second_<Arg1> type;
+ };
+};
+Second_Helper const second_;
+
+template <class T, class Param>
+struct Associative_Equal_Range_ : euml_action<Associative_Equal_Range_<T,Param> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef std::pair<
+ typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type,
+ typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type > type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef std::pair<
+ typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type,
+ typename get_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type > type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T()(evt,fsm,src,tgt)).equal_range(Param()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T()(evt,fsm,state)).equal_range(Param()(evt,fsm,state));
+ }
+};
+
+struct associative_equal_range_tag {};
+struct Associative_Equal_Range_Helper: proto::extends< proto::terminal<associative_equal_range_tag>::type,
+ Associative_Equal_Range_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Associative_Equal_Range_<Arg1,Arg2> type;
+ };
+};
+Associative_Equal_Range_Helper const associative_equal_range_;
+
+template <class Container, class Param1, class Param2, class Enable=void >
+struct Substr_ : euml_action<Substr_<Container,Param1,Param2,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2>
+struct Substr_ <
+ Container,Param1,Param2,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param1,void>::type
+ >::type
+ >
+ : euml_action<Substr_<Container,Param1,Param2> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).substr();
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).substr();
+ }
+};
+
+template <class Container,class Param1, class Param2>
+struct Substr_ <
+ Container,Param1,Param2,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param1,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<Substr_<Container,Param1,Param2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).substr(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).substr(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2>
+struct Substr_<
+ Container,Param1,Param2,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<Substr_<Container,Param1,Param2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ substr(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ substr(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+struct substr_tag {};
+struct Substr_Helper: proto::extends< proto::terminal<substr_tag>::type, Substr_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Substr_<Arg1,Arg2,Arg3> type;
+ };
+};
+Substr_Helper const substr_;
+
+template <class Container, class Param1, class Param2, class Param3, class Param4 ,class Enable=void >
+struct StringCompare_ : euml_action<StringCompare_<Container,Param1,Param2,Param3,Param4,Enable> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef int type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef int type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct StringCompare_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type>
+ : euml_action<StringCompare_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef int type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef int type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct StringCompare_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type>
+ : euml_action<StringCompare_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef int type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef int type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct StringCompare_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<typename ::boost::is_same<Param4,void>::type >::type>
+ : euml_action<StringCompare_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef int type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef int type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state),Param4()(evt,fsm,state));
+ }
+};
+struct string_compare_tag {};
+struct StringCompare_Helper: proto::extends< proto::terminal<string_compare_tag>::type, StringCompare_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringCompare_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+StringCompare_Helper const string_compare_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct Append_ : euml_action<Append_<Container,Param1,Param2,Param3,Enable> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).append(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).append(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container, class Param1, class Param2, class Param3 >
+struct Append_<Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type>
+ : euml_action<Append_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).append(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).append(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container, class Param1, class Param2, class Param3 >
+struct Append_<Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<typename ::boost::is_same<Param3,void>::type >::type>
+ : euml_action<Append_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).append (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).append (Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+struct append_tag {};
+struct Append_Helper: proto::extends< proto::terminal<append_tag>::type, Append_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Append_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+Append_Helper const append_;
+
+template <class Container, class Param1, class Param2, class Param3, class Param4 ,class Enable=void >
+struct StringInsert_ : euml_action<StringInsert_<Container,Param1,Param2,Param3,Param4,Enable> >
+{
+};
+
+template <class Container, class Param1, class Param2, class Param3, class Param4>
+struct StringInsert_ <
+ Container,Param1,Param2,Param3,Param4,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringInsert_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct StringInsert_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param3,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param4,void>::type>::type>::type >::type>
+ : euml_action<StringInsert_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+template <class Container, class Param1, class Param2, class Param3, class Param4 >
+struct StringInsert_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<typename ::boost::is_same<Param4,void>::type >::type>
+ : euml_action<StringInsert_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state),Param4()(evt,fsm,state));
+ }
+};
+struct string_insert_tag {};
+struct StringInsert_Helper: proto::extends< proto::terminal<string_insert_tag>::type, StringInsert_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringInsert_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+StringInsert_Helper const string_insert_;
+
+
+template <class Container, class Param1, class Param2, class Enable=void >
+struct StringErase_ : euml_action<StringErase_<Container,Param1,Param2,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2>
+struct StringErase_ <
+ Container,Param1,Param2,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param1,void>::type
+ >::type
+ >
+ : euml_action<StringErase_<Container,Param1,Param2> >
+
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).erase();
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).erase();
+ }
+};
+
+template <class Container,class Param1, class Param2>
+struct StringErase_ <
+ Container,Param1,Param2,
+ typename ::boost::enable_if<
+ typename ::boost::mpl::and_<
+ typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param1,void>::type
+ >::type
+ >::type
+ >::type
+ >
+ : euml_action<StringErase_<Container,Param1,Param2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2>
+struct StringErase_<
+ Container,Param1,Param2,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringErase_<Container,Param1,Param2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ erase(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ erase(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+struct string_erase_tag {};
+struct StringErase_Helper: proto::extends< proto::terminal<string_erase_tag>::type, StringErase_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringErase_<Arg1,Arg2,Arg3> type;
+ };
+};
+StringErase_Helper const string_erase_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringAssign_ : euml_action<StringAssign_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringAssign_ <
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param2,void>::type
+ >::type
+ >
+ : euml_action<StringAssign_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).assign(Param1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).assign(Param1()(evt,fsm,state));
+ }
+};
+
+template <class Container, class Param1, class Param2, class Param3 >
+struct StringAssign_<Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::mpl::or_<typename ::boost::is_same<Param2,void>::type,
+ typename ::boost::mpl::not_<
+ typename ::boost::is_same<Param3,void>::type>::type>::type >::type>
+ : euml_action<StringAssign_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).assign(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).assign(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container, class Param1, class Param2, class Param3 >
+struct StringAssign_<Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<typename ::boost::is_same<Param3,void>::type >::type>
+ : euml_action<StringAssign_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).assign (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).assign (Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+struct assign_tag {};
+struct StringAssign_Helper: proto::extends< proto::terminal<assign_tag>::type, StringAssign_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringAssign_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringAssign_Helper const string_assign_;
+
+template <class Container, class Param1, class Param2, class Param3, class Param4, class Enable=void >
+struct StringReplace_ : euml_action<StringReplace_<Container,Param1,Param2,Param3,Param4,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3, class Param4>
+struct StringReplace_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::enable_if<typename ::boost::is_same<Param4,void>::type >::type>
+ : euml_action<StringReplace_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).replace(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).replace(Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3, class Param4>
+struct StringReplace_<Container,Param1,Param2,Param3,Param4,
+ typename ::boost::disable_if<typename ::boost::is_same<Param4,void>::type >::type>
+ : euml_action<StringReplace_<Container,Param1,Param2,Param3,Param4> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Container,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).replace (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),
+ Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).replace (Param1()(evt,fsm,state),Param2()(evt,fsm,state),
+ Param3()(evt,fsm,state),Param4()(evt,fsm,state));
+ }
+};
+struct string_replace_tag {};
+struct StringReplace_Helper: proto::extends< proto::terminal<string_replace_tag>::type, StringReplace_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringReplace_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+StringReplace_Helper const string_replace_;
+
+template <class Container>
+struct CStr_ : euml_action<CStr_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::add_const<
+ typename get_value_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type>::type* type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::add_const<
+ typename get_value_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type>::type* type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).c_str();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).c_str();
+ }
+};
+struct c_str_tag {};
+struct CStr_Helper: proto::extends< proto::terminal<c_str_tag>::type, CStr_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef CStr_<Arg1> type;
+ };
+};
+CStr_Helper const c_str_;
+
+template <class Container>
+struct StringData_ : euml_action<StringData_<Container> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::add_const<
+ typename get_value_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type>::type* type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::add_const<
+ typename get_value_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type>::type* type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).data();
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Container::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).data();
+ }
+};
+struct string_data_tag {};
+struct StringData_Helper: proto::extends< proto::terminal<string_data_tag>::type, StringData_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringData_<Arg1> type;
+ };
+};
+StringData_Helper const string_data_;
+
+template <class Container, class Param1, class Param2, class Param3, class Enable=void >
+struct StringCopy_ : euml_action<StringCopy_<Container,Param1,Param2,Param3,Enable> >
+{
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringCopy_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::enable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringCopy_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).copy(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).copy(Param1()(evt,fsm,state),Param2()(evt,fsm,state));
+ }
+};
+
+template <class Container,class Param1, class Param2, class Param3>
+struct StringCopy_<
+ Container,Param1,Param2,Param3,
+ typename ::boost::disable_if<
+ typename ::boost::is_same<Param3,void>::type
+ >::type
+ >
+ : euml_action<StringCopy_<Container,Param1,Param2,Param3> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_size_type<
+ typename ::boost::remove_reference<
+ typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (Container()(evt,fsm,src,tgt)).
+ copy(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename state_action_result<Event,FSM,STATE>::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (Container()(evt,fsm,state)).
+ copy(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));
+ }
+};
+
+struct string_copy_tag {};
+struct StringCopy_Helper: proto::extends< proto::terminal<string_copy_tag>::type, StringCopy_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef StringCopy_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+StringCopy_Helper const string_copy_;
+
+}}}}
+
+#endif //BOOST_MSM_FRONT_EUML_CONTAINER_H

Added: sandbox/msm/boost/msm/front/euml/euml.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/euml.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,20 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_EUML_H
+#define BOOST_MSM_FRONT_EUML_EUML_H
+
+#include <boost/msm/front/euml/common.hpp>
+#include <boost/msm/front/euml/operator.hpp>
+#include <boost/msm/front/euml/guard_grammar.hpp>
+#include <boost/msm/front/euml/state_grammar.hpp>
+#include <boost/msm/front/euml/stt_grammar.hpp>
+
+#endif //BOOST_MSM_FRONT_EUML_EUML_H
\ No newline at end of file

Added: sandbox/msm/boost/msm/front/euml/euml_typeof.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/euml_typeof.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,121 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_TYPEOF_H
+#define BOOST_MSM_FRONT_EUML_TYPEOF_H
+
+#include <boost/typeof/typeof.hpp>
+
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::vector0, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::vector50, 50)
+BOOST_TYPEOF_REGISTER_TYPE(::boost::mpl::na)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::fusion::vector, 10)
+BOOST_TYPEOF_REGISTER_TYPE(::boost::fusion::void_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::vector, 20)
+BOOST_TYPEOF_REGISTER_TYPE(std::string)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::size_t, (unsigned int))
+
+BOOST_TYPEOF_REGISTER_TYPE(::boost::msm::front::default_base_state)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::inherit_attributes, 1)
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::func_state, 6)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::entry_func_state, (int)(typename)(typename)(typename)(typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::explicit_entry_func_state, (int)(typename)(typename)(typename)(typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::exit_func_state, 7)
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::define_flag, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::attribute, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::define_defer, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::define_init, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Source_, (int))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Target_, (int))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Current_, (int))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Event_, (int))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::State_Attribute_, (typename)(int))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::State_Machine_, (int))
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::none)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::Row, 5)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::ActionSequence, 1)
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::NoAction)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::And_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Or_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Not_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::If_Else_, 3)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::If)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::If_Then_, 2)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::If_Then)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::While_Do_, 2)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::While_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Do_While_, 2)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Do_While_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::For_Loop_, 4)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::For_Loop_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Process_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Process_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Process2_, 2)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Process2_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Get_Flag_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Get_Flag_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Begin_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Begin_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::End_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::End_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Deref_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Deref_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Push_Back_, 2)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Push_Back_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Clear_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Clear_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Empty_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Empty_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Find_, 2)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Find_Helper)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Npos_, 1)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::False_)
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::True_)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Int_, (int))
+BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Int)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Pre_inc_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Pre_dec_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Post_inc_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Post_dec_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Plus_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Minus_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Multiplies_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Divides_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Modulus_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Bitwise_And_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Bitwise_Or_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Bitwise_Xor_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Subscript_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Plus_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Minus_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Multiplies_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Divides_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Modulus_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftLeft_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftRight_Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftLeft_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftRight_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Assign_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Unary_Plus_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Unary_Minus_, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Less_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::LessEqual_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Greater_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::GreaterEqual_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::EqualTo_, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::NotEqualTo_, 2)
+
+#endif //BOOST_MSM_FRONT_EUML_TYPEOF_H
\ No newline at end of file

Added: sandbox/msm/boost/msm/front/euml/guard_grammar.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/guard_grammar.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,351 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_GUARD_GRAMMAR_H
+#define BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H
+
+#include <boost/proto/core.hpp>
+#include <boost/proto/transform.hpp>
+
+#include <boost/msm/front/euml/common.hpp>
+#include <boost/msm/front/euml/operator.hpp>
+#include <boost/msm/front/euml/state_grammar.hpp>
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+struct BuildGuards;
+struct BuildActions;
+
+struct BuildGuardsCases
+{
+ // The primary template matches nothing:
+ template<typename Tag>
+ struct case_
+ : proto::not_<proto::_>
+ {};
+};
+template<>
+struct BuildGuardsCases::case_<proto::tag::logical_or>
+ : proto::when<
+ proto::logical_or<BuildGuards,BuildGuards >,
+ Or_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::logical_and>
+ : proto::when<
+ proto::logical_and<BuildGuards,BuildGuards >,
+ And_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::logical_not>
+ : proto::when<
+ proto::logical_not<BuildGuards >,
+ Not_<BuildGuards(proto::_child)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::less>
+ : proto::when<
+ proto::less<BuildGuards, BuildGuards >,
+ Less_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::less_equal>
+ : proto::when<
+ proto::less_equal<BuildGuards, BuildGuards >,
+ LessEqual_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::greater>
+ : proto::when<
+ proto::greater<BuildGuards, BuildGuards >,
+ Greater_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::greater_equal>
+ : proto::when<
+ proto::greater_equal<BuildGuards, BuildGuards >,
+ GreaterEqual_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::equal_to>
+ : proto::when<
+ proto::equal_to<BuildGuards, BuildGuards >,
+ EqualTo_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::not_equal_to>
+ : proto::when<
+ proto::not_equal_to<BuildGuards, BuildGuards >,
+ NotEqualTo_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::pre_inc>
+ : proto::when<
+ proto::pre_inc<BuildGuards >,
+ Pre_inc_<BuildGuards(proto::_child)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::dereference>
+ : proto::when<
+ proto::dereference<BuildGuards >,
+ Deref_<BuildGuards(proto::_child)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::pre_dec>
+ : proto::when<
+ proto::pre_dec<BuildGuards >,
+ Pre_dec_<BuildGuards(proto::_child)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::post_inc>
+ : proto::when<
+ proto::post_inc<BuildGuards >,
+ Post_inc_<BuildGuards(proto::_child)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::post_dec>
+ : proto::when<
+ proto::post_dec<BuildGuards >,
+ Post_dec_<BuildGuards(proto::_child)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::plus>
+ : proto::when<
+ proto::plus<BuildGuards,BuildGuards >,
+ Plus_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::minus>
+ : proto::when<
+ proto::minus<BuildGuards,BuildGuards >,
+ Minus_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::multiplies>
+ : proto::when<
+ proto::multiplies<BuildGuards,BuildGuards >,
+ Multiplies_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::divides>
+ : proto::when<
+ proto::divides<BuildGuards,BuildGuards >,
+ Divides_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::modulus>
+ : proto::when<
+ proto::modulus<BuildGuards,BuildGuards >,
+ Modulus_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::bitwise_and>
+ : proto::when<
+ proto::bitwise_and<BuildGuards,BuildGuards >,
+ Bitwise_And_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::bitwise_or>
+ : proto::when<
+ proto::bitwise_or<BuildGuards,BuildGuards >,
+ Bitwise_Or_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::subscript>
+ : proto::when<
+ proto::subscript<BuildGuards,BuildGuards >,
+ Subscript_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::plus_assign>
+ : proto::when<
+ proto::plus_assign<BuildGuards,BuildGuards >,
+ Plus_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::minus_assign>
+ : proto::when<
+ proto::minus_assign<BuildGuards,BuildGuards >,
+ Minus_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::multiplies_assign>
+ : proto::when<
+ proto::multiplies_assign<BuildGuards,BuildGuards >,
+ Multiplies_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::divides_assign>
+ : proto::when<
+ proto::divides_assign<BuildGuards,BuildGuards >,
+ Divides_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::modulus_assign>
+ : proto::when<
+ proto::modulus_assign<BuildGuards,BuildGuards >,
+ Modulus_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::shift_left_assign>
+ : proto::when<
+ proto::shift_left_assign<BuildGuards,BuildGuards >,
+ ShiftLeft_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::shift_right_assign>
+ : proto::when<
+ proto::shift_right_assign<BuildGuards,BuildGuards >,
+ ShiftRight_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::shift_left>
+ : proto::when<
+ proto::shift_left<BuildGuards,BuildGuards >,
+ ShiftLeft_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::shift_right>
+ : proto::when<
+ proto::shift_right<BuildGuards,BuildGuards >,
+ ShiftRight_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::assign>
+ : proto::when<
+ proto::assign<BuildGuards,BuildGuards >,
+ Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::bitwise_xor>
+ : proto::when<
+ proto::bitwise_xor<BuildGuards,BuildGuards >,
+ Bitwise_Xor_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
+ >
+{};
+template<>
+struct BuildGuardsCases::case_<proto::tag::negate>
+ : proto::when<
+ proto::negate<BuildGuards >,
+ Unary_Minus_<BuildGuards(proto::_child)>()
+ >
+{};
+
+template<>
+struct BuildGuardsCases::case_<proto::tag::function>
+ : proto::or_<
+ proto::when<
+ proto::function<proto::terminal<if_tag>,BuildGuards,BuildGuards,BuildGuards >,
+ If_Else_<BuildGuards(proto::_child_c<1>),
+ BuildGuards(proto::_child_c<2>),
+ BuildGuards(proto::_child_c<3>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_> >,
+ get_fct<proto::_child_c<0> >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions >,
+ get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>)
+ ,BuildActions(proto::_child_c<2>),BuildActions(proto::_child_c<3>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>
+ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
+ ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>
+ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
+ ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>),BuildActions(proto::_child_c<5>) >()
+ >
+#ifdef BOOST_MSVC
+ ,proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>
+ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
+ ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>)
+ ,BuildActions(proto::_child_c<5>),BuildActions(proto::_child_c<6>) >()
+ >
+#endif
+ >
+{};
+
+template<>
+struct BuildGuardsCases::case_<proto::tag::terminal>
+ : proto::or_<
+ proto::when <
+ proto::terminal<action_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<state_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<flag_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<event_tag>,
+ proto::_
+ >
+ >
+{};
+
+struct BuildGuards
+ : proto::switch_<BuildGuardsCases>
+{};
+
+}}}}
+
+#endif //BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H

Added: sandbox/msm/boost/msm/front/euml/iteration.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/iteration.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,26 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_ITERATION_H
+#define BOOST_MSM_FRONT_EUML_ITERATION_H
+
+#include <algorithm>
+#include <numeric>
+#include <boost/msm/front/euml/common.hpp>
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+
+MSM_EUML_FUNCTION(ForEach_ , std::for_each , for_each_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(Accumulate_ , std::accumulate , accumulate_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+
+}}}}
+
+#endif //BOOST_MSM_FRONT_EUML_ITERATION_H

Added: sandbox/msm/boost/msm/front/euml/operator.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/operator.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,1560 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_OPERATOR_H
+#define BOOST_MSM_FRONT_EUML_OPERATOR_H
+
+#include <iterator>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/has_key.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/set.hpp>
+#include <boost/proto/core.hpp>
+#include <boost/msm/front/euml/common.hpp>
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(reference)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(key_type)
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+
+template <class T1,class T2>
+struct Or_ : euml_action<Or_<T1,T2> >
+{
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ return (T1()(evt,fsm,src,tgt) || T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)
+ {
+ return (T1()(evt,fsm,state) || T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct And_ : euml_action<And_<T1,T2> >
+{
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ return (T1()(evt,fsm,src,tgt) && T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)
+ {
+ return (T1()(evt,fsm,state) && T2()(evt,fsm,state));
+ }
+};
+template <class T1>
+struct Not_ : euml_action<Not_<T1> >
+{
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ return !(T1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)
+ {
+ return !(T1()(evt,fsm,state));
+ }
+};
+
+template <class Condition,class Action1,class Action2, class Enable=void >
+struct If_Else_ : euml_action<If_Else_<Condition,Action1,Action2,Enable> > {};
+
+template <class Condition,class Action1,class Action2>
+struct If_Else_<Condition,Action1,Action2
+ , typename ::boost::enable_if<typename has_tag_type<Action1>::type >::type>
+ : euml_action<If_Else_<Condition,Action1,Action2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Action1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Action1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Action1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ if (Condition()(evt,fsm,src,tgt))
+ {
+ return Action1()(evt,fsm,src,tgt);
+ }
+ return Action2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Action1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ if (Condition()(evt,fsm,state))
+ {
+ return Action1()(evt,fsm,state);
+ }
+ return Action2()(evt,fsm,state);
+ }
+};
+
+template <class Condition,class Action1,class Action2>
+struct If_Else_<Condition,Action1,Action2
+ , typename ::boost::disable_if<typename has_tag_type<Action1>::type >::type>
+ : euml_action<If_Else_<Condition,Action1,Action2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ if (Condition()(evt,fsm,src,tgt))
+ {
+ return Action1()(evt,fsm,src,tgt);
+ }
+ return Action2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ if (Condition()(evt,fsm,state))
+ {
+ return Action1()(evt,fsm,state);
+ }
+ return Action2()(evt,fsm,state);
+ }
+};
+
+struct if_tag
+{
+};
+struct If : proto::extends<proto::terminal<if_tag>::type, If, sm_domain>
+{
+ using proto::extends< proto::terminal<if_tag>::type, If, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef If_Else_<Arg1,Arg2,Arg3> type;
+ };
+};
+If const if_then_else_;
+
+template <class Condition,class Action1, class Enable=void >
+struct If_Then_ : euml_action<If_Then_<Condition,Action1,Enable> > {};
+
+template <class Condition,class Action1>
+struct If_Then_<Condition,Action1
+ , typename ::boost::enable_if<typename has_tag_type<Action1>::type >::type>
+ : euml_action<If_Then_<Condition,Action1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Action1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Action1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Action1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ if (Condition()(evt,fsm,src,tgt))
+ {
+ return Action1()(evt,fsm,src,tgt);
+ }
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Action1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ if (Condition()(evt,fsm,state))
+ {
+ return Action1()(evt,fsm,state);
+ }
+ }
+};
+
+template <class Condition,class Action1>
+struct If_Then_<Condition,Action1
+ , typename ::boost::disable_if<typename has_tag_type<Action1>::type >::type>
+ : euml_action<If_Then_<Condition,Action1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ if (Condition()(evt,fsm,src,tgt))
+ {
+ return Action1()(evt,fsm,src,tgt);
+ }
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ if (Condition()(evt,fsm,state))
+ {
+ return Action1()(evt,fsm,state);
+ }
+ }
+};
+struct if_then_tag
+{
+};
+struct If_Then : proto::extends< proto::terminal<if_then_tag>::type, If_Then, sm_domain>
+{
+ using proto::extends< proto::terminal<if_then_tag>::type, If_Then, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef If_Then_<Arg1,Arg2> type;
+ };
+};
+If_Then const if_then_;
+
+template <class Condition,class Body>
+struct While_Do_ : euml_action<While_Do_<Condition,Body> >
+{
+ 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
+ {
+ Body body_;
+ Condition cond_;
+ while (cond_(evt,fsm,src,tgt))
+ {
+ body_(evt,fsm,src,tgt);
+ }
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ Body body_;
+ Condition cond_;
+ while (cond_(evt,fsm,state))
+ {
+ body_(evt,fsm,state);
+ }
+ }
+};
+struct while_do_tag
+{
+};
+struct While_Do_Helper : proto::extends< proto::terminal<while_do_tag>::type, While_Do_Helper, sm_domain>
+{
+ using proto::extends< proto::terminal<while_do_tag>::type, While_Do_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef While_Do_<Arg1,Arg2> type;
+ };
+};
+While_Do_Helper const while_;
+
+template <class Condition,class Body>
+struct Do_While_ : euml_action<Do_While_<Condition,Body> >
+{
+ 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
+ {
+ Condition cond_;
+ Body body_;
+ do
+ {
+ body_(evt,fsm,src,tgt);
+ } while (cond_(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ Condition cond_;
+ Body body_;
+ do
+ {
+ body_(evt,fsm,state);
+ } while (cond_(evt,fsm,state));
+ }
+};
+struct do_while_tag
+{
+};
+struct Do_While_Helper : proto::extends< proto::terminal<do_while_tag>::type, Do_While_Helper, sm_domain>
+{
+ using proto::extends< proto::terminal<do_while_tag>::type, Do_While_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Do_While_<Arg1,Arg2> type;
+ };
+};
+Do_While_Helper const do_while_;
+
+template <class Begin,class End,class EndLoop,class Body>
+struct For_Loop_ : euml_action<For_Loop_<Begin,End,EndLoop,Body> >
+{
+ 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
+ {
+ End end_;
+ EndLoop end_loop_;
+ Body body_;
+ for(Begin()(evt,fsm,src,tgt);end_(evt,fsm,src,tgt);end_loop_(evt,fsm,src,tgt))
+ {
+ body_(evt,fsm,src,tgt);
+ }
+ }
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ End end_;
+ EndLoop end_loop_;
+ Body body_;
+ for(Begin()(evt,fsm,state);end_(evt,fsm,state);end_loop_(evt,fsm,state))
+ {
+ body_(evt,fsm,state);
+ }
+ }
+};
+struct for_loop_tag
+{
+};
+struct For_Loop_Helper : proto::extends< proto::terminal<for_loop_tag>::type, For_Loop_Helper, sm_domain>
+{
+ using proto::extends< proto::terminal<for_loop_tag>::type, For_Loop_Helper, sm_domain>::operator=;
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef For_Loop_<Arg1,Arg2,Arg3,Arg4> type;
+ };
+};
+For_Loop_Helper const for_;
+
+
+
+
+template <class T>
+struct Deref_ : euml_action<Deref_<T> >
+{
+ using euml_action<Deref_<T> >::operator=;
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::add_reference<
+ typename std::iterator_traits <
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type>::value_type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::add_reference<
+ typename std::iterator_traits<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type
+ >::value_type
+ >::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return *(T()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return *(T()(evt,fsm,state));
+ }
+};
+
+template <class T>
+struct Pre_inc_ : euml_action<Pre_inc_<T> >
+{
+ using euml_action<Pre_inc_<T> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return ++T()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return ++T()(evt,fsm,state);
+ }
+};
+template <class T>
+struct Pre_dec_ : euml_action<Pre_dec_<T> >
+{
+ using euml_action<Pre_dec_<T> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return --T()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return --T()(evt,fsm,state);
+ }
+};
+template <class T>
+struct Post_inc_ : euml_action<Post_inc_<T> >
+{
+ using euml_action<Post_inc_<T> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T()(evt,fsm,src,tgt)++;
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T()(evt,fsm,state)++;
+ }
+};
+template <class T>
+struct Post_dec_ : euml_action<Post_dec_<T> >
+{
+ using euml_action<Post_dec_<T> >::operator=;
+
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T()(evt,fsm,src,tgt)--;
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T()(evt,fsm,state)--;
+ }
+};
+
+template <class T1,class T2>
+struct Plus_ : euml_action<Plus_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)+T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)+T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Minus_ : euml_action<Minus_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)-T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)-T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Multiplies_ : euml_action<Multiplies_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)*T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)*T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Divides_ : euml_action<Divides_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)/T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)/T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Modulus_ : euml_action<Modulus_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)%T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)%T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Bitwise_And_ : euml_action<Bitwise_And_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)&T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)&T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Bitwise_Or_ : euml_action<Bitwise_Or_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)|T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)|T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Bitwise_Xor_ : euml_action<Bitwise_Xor_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)^T2()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)^T2()(evt,fsm,state);
+ }
+};
+template <class T1,class T2>
+struct Subscript_ : euml_action<Subscript_<T1,T2> >
+{
+ template <class T>
+ struct get_reference
+ {
+ typedef typename T::reference type;
+ };
+ template <class T>
+ struct get_mapped_type
+ {
+ typedef typename T::value_type::second_type& type;
+ };
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type container_type;
+ typedef typename ::boost::mpl::eval_if<
+ typename has_key_type<container_type>::type,
+ get_mapped_type<container_type>,
+ ::boost::mpl::eval_if<
+ typename ::boost::is_pointer<container_type>::type,
+ ::boost::add_reference<typename ::boost::remove_pointer<container_type>::type >,
+ get_reference<container_type>
+ >
+ >::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type container_type;
+ typedef typename ::boost::mpl::eval_if<
+ typename has_key_type<container_type>::type,
+ get_mapped_type<container_type>,
+ ::boost::mpl::eval_if<
+ typename ::boost::is_pointer<container_type>::type,
+ ::boost::add_reference<typename ::boost::remove_pointer<container_type>::type >,
+ get_reference<container_type>
+ >
+ >::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return T1()(evt,fsm,src,tgt)[T2()(evt,fsm,src,tgt)];
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return T1()(evt,fsm,state)[T2()(evt,fsm,state)];
+ }
+};
+template <class T1,class T2>
+struct Plus_Assign_ : euml_action<Plus_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)+=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)+=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Minus_Assign_ : euml_action<Minus_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)-=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)-=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Multiplies_Assign_ : euml_action<Multiplies_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)*=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)*=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Divides_Assign_ : euml_action<Divides_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)/=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)/=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Modulus_Assign_ : euml_action<Modulus_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)%=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)%=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct ShiftLeft_Assign_ : euml_action<ShiftLeft_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)<<=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)<<=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct ShiftRight_Assign_ : euml_action<ShiftRight_Assign_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)>>=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)>>=T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct ShiftLeft_ : euml_action<ShiftLeft_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)<<T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)<<T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct ShiftRight_ : euml_action<ShiftRight_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)>>T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)>>T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Assign_ : euml_action<Assign_<T1,T2> >
+{
+ using euml_action< Assign_<T1,T2> >::operator=;
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<T1,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt)=T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return (T1()(evt,fsm,state)=T2()(evt,fsm,state));
+ }
+};
+template <class T1>
+struct Unary_Plus_ : euml_action<Unary_Plus_<T1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return +T1()(evt,fsm,src,tgt);
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return +T1()(evt,fsm,state);
+ }
+};
+template <class T1>
+struct Unary_Minus_ : euml_action<Unary_Minus_<T1> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type2<T1,Event,FSM,STATE>::type>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename ::boost::remove_reference<
+ typename get_result_type<T1,EVT,FSM,SourceState,TargetState>::type>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return -(T1()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return -(T1()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Less_ : euml_action<Less_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt) < T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (T1()(evt,fsm,state) < T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct LessEqual_ : euml_action<LessEqual_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt) <= T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (T1()(evt,fsm,state) <= T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct Greater_ : euml_action<Greater_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt) > T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (T1()(evt,fsm,state) > T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct GreaterEqual_ : euml_action<GreaterEqual_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt) >= T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (T1()(evt,fsm,state) >= T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct EqualTo_ : euml_action<EqualTo_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt) == T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (T1()(evt,fsm,state) == T2()(evt,fsm,state));
+ }
+};
+template <class T1,class T2>
+struct NotEqualTo_ : euml_action<NotEqualTo_<T1,T2> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef bool type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef bool type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return (T1()(evt,fsm,src,tgt) != T2()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ bool operator()(Event const& evt,FSM& fsm,STATE& state)const
+ {
+ return (T1()(evt,fsm,state) != T2()(evt,fsm,state));
+ }
+};
+
+}}}}
+
+#endif // BOOST_MSM_FRONT_EUML_OPERATOR_H

Added: sandbox/msm/boost/msm/front/euml/querying.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/querying.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,43 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_QUERYING_H
+#define BOOST_MSM_FRONT_EUML_QUERYING_H
+
+#include <algorithm>
+#include <boost/msm/front/euml/common.hpp>
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+
+MSM_EUML_FUNCTION(Find_ , std::find , find_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(FindIf_ , std::find_if , find_if_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(LowerBound_ , std::lower_bound , lower_bound_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(UpperBound_ , std::upper_bound , upper_bound_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(BinarySearch_ , std::binary_search , binary_search_ , bool , bool )
+MSM_EUML_FUNCTION(MinElement_ , std::min_element , min_element_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(MaxElement_ , std::max_element , max_element_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(AdjacentFind_ , std::adjacent_find , adjacent_find_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(FindEnd_ , std::find_end , find_end_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(FindFirstOf_ , std::find_first_of , find_first_of_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(Equal_ , std::equal , equal_ , bool , bool )
+MSM_EUML_FUNCTION(Search_ , std::search , search_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(Includes_ , std::includes , includes_ , bool , bool )
+MSM_EUML_FUNCTION(LexicographicalCompare_ , std::lexicographical_compare , lexicographical_compare_ , bool , bool )
+MSM_EUML_FUNCTION(Count_ , std::count , count_ , RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 , RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 )
+MSM_EUML_FUNCTION(CountIf_ , std::count_if , count_if_ , RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 , RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 )
+MSM_EUML_FUNCTION(Distance_ , std::distance , distance_ , RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 , RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 )
+MSM_EUML_FUNCTION(EqualRange_ , std::equal_range , equal_range_ , RESULT_TYPE_PAIR_REMOVE_REF_PARAM1 , RESULT_TYPE2_PAIR_REMOVE_REF_PARAM1 )
+MSM_EUML_FUNCTION(Mismatch_ , std::mismatch , mismatch_ , RESULT_TYPE_PAIR_REMOVE_REF_PARAM1 , RESULT_TYPE2_PAIR_REMOVE_REF_PARAM1 )
+
+
+}}}}
+
+#endif //BOOST_MSM_FRONT_EUML_QUERYING_H

Added: sandbox/msm/boost/msm/front/euml/state_grammar.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/state_grammar.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,1637 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_STATE_GRAMMAR_H
+#define BOOST_MSM_FRONT_EUML_STATE_GRAMMAR_H
+
+#include <boost/proto/core.hpp>
+#include <boost/proto/transform.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/mpl/remove_if.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+#include <boost/msm/row_tags.hpp>
+#include <boost/msm/front/common_states.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+#include <boost/msm/front/euml/common.hpp>
+#include <boost/msm/front/euml/operator.hpp>
+#include <boost/msm/front/euml/guard_grammar.hpp>
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(attribute_tag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(flag_create_tag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(defer_create_tag)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(control_configure_tag)
+
+namespace proto = boost::proto;
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+
+// provides the typedefs and interface. Concrete states derive from it.
+template<class EntryFunctor=NoAction,
+ class ExitFunctor=NoAction,
+ class Attributes= ::boost::fusion::vector<>,
+ class Flags = ::boost::mpl::vector0<>,
+ class Defer = ::boost::mpl::vector0<>,
+ class BASE = default_base_state>
+struct func_state : public ::boost::msm::front::state_base<BASE,Attributes>,
+ euml_state<func_state<EntryFunctor,ExitFunctor,Attributes,Flags,Defer,BASE> >
+{
+ // grammar testing
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<EntryFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<ExitFunctor,invalid_type> ));
+
+ // flags
+ typedef Flags flag_list;
+ // deferred events
+ typedef Defer deferred_events;
+
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& fsm)
+ {
+ EntryFunctor()(evt,fsm,*this);
+ }
+ template <class Event,class FSM>
+ void on_exit(Event const& evt,FSM& fsm)
+ {
+ ExitFunctor()(evt,fsm,*this);
+ }
+};
+
+// provides the typedefs and interface. Concrete states derive from it.
+template<int ZoneIndex=-1,
+ class EntryFunctor=NoAction,
+ class ExitFunctor=NoAction,
+ class Attributes= ::boost::fusion::vector<>,
+ class Flags = ::boost::mpl::vector0<>,
+ class Defer = ::boost::mpl::vector0<>,
+ class BASE = default_base_state>
+struct entry_func_state : public ::boost::msm::front::state_base<BASE,Attributes>,
+ euml_state<entry_func_state<ZoneIndex,EntryFunctor,ExitFunctor,Attributes,Flags,Defer,BASE> >
+{
+ // grammar testing
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<EntryFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<ExitFunctor,invalid_type> ));
+
+ // tags
+ typedef int pseudo_entry;
+ enum {zone_index=ZoneIndex};
+ typedef int explicit_entry_state;
+
+ // flags
+ typedef Flags flag_list;
+ // deferred events
+ typedef Defer deferred_events;
+
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& fsm)
+ {
+ EntryFunctor()(evt,fsm,*this);
+ }
+ template <class Event,class FSM>
+ void on_exit(Event const& evt,FSM& fsm)
+ {
+ ExitFunctor()(evt,fsm,*this);
+ }
+};
+// provides the typedefs and interface. Concrete states derive from it.
+template<int ZoneIndex=-1,
+ class EntryFunctor=NoAction,
+ class ExitFunctor=NoAction,
+ class Attributes= ::boost::fusion::vector<>,
+ class Flags = ::boost::mpl::vector0<>,
+ class Defer = ::boost::mpl::vector0<>,
+ class BASE = default_base_state>
+struct explicit_entry_func_state : public ::boost::msm::front::state_base<BASE,Attributes>,
+ public ::boost::msm::front::explicit_entry<ZoneIndex>,
+ euml_state<explicit_entry_func_state<
+ ZoneIndex,EntryFunctor,ExitFunctor,Attributes,Flags,Defer,BASE> >
+{
+ // grammar testing
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<EntryFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<ExitFunctor,invalid_type> ));
+
+ // flags
+ typedef Flags flag_list;
+ // deferred events
+ typedef Defer deferred_events;
+
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& fsm)
+ {
+ EntryFunctor()(evt,fsm,*this);
+ }
+ template <class Event,class FSM>
+ void on_exit(Event const& evt,FSM& fsm)
+ {
+ ExitFunctor()(evt,fsm,*this);
+ }
+};
+
+// provides the typedefs and interface. Concrete states derive from it.
+template<class Event,
+ class EntryFunctor=NoAction,
+ class ExitFunctor=NoAction,
+ class Attributes= ::boost::fusion::vector<>,
+ class Flags = ::boost::mpl::vector0<>,
+ class Defer = ::boost::mpl::vector0<>,
+ class BASE = default_base_state>
+struct exit_func_state : public ::boost::msm::front::state_base<BASE,Attributes>,
+ euml_state<exit_func_state<Event,EntryFunctor,ExitFunctor,Attributes,Flags,Defer,BASE> >
+{
+ // grammar testing
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<EntryFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<ExitFunctor,invalid_type> ));
+
+ // tags
+ typedef Event event;
+ typedef BASE Base;
+ typedef int pseudo_exit;
+
+ // flags
+ typedef Flags flag_list;
+ // deferred events
+ typedef Defer deferred_events;
+
+ template <class Evt,class FSM>
+ void on_entry(Evt const& evt,FSM& fsm)
+ {
+ EntryFunctor()(evt,fsm,*this);
+ }
+ template <class Evt,class FSM>
+ void on_exit(Evt const& evt,FSM& fsm)
+ {
+ ExitFunctor()(evt,fsm,*this);
+ }
+};
+
+struct BuildActions;
+struct BuildGuards;
+
+struct BuildActionSequence
+ : proto::or_<
+ proto::when <
+ BuildActions,
+ ActionSequence<make_vector_one_row<BuildActions(proto::_)>()>()
+ >,
+ proto::when <
+ proto::comma<BuildActions,BuildActions >,
+ ActionSequence<boost::mpl::push_back<
+ make_vector_one_row<BuildActions(proto::_left)>(),
+ BuildActions(proto::_right)>()>()
+ >,
+ proto::when <
+ proto::comma<BuildActionSequence,BuildActions >,
+ ActionSequence<boost::mpl::push_back<
+ get_sequence<BuildActionSequence(proto::_left) >(),
+ BuildActions(proto::_right) >() >()
+ >
+ >
+{};
+
+struct BuildActionsCases
+{
+ // The primary template matches nothing:
+ template<typename Tag>
+ struct case_
+ : proto::not_<proto::_>
+ {};
+};
+
+template<>
+struct BuildActionsCases::case_<proto::tag::pre_inc>
+ : proto::when<
+ proto::pre_inc<BuildActions >,
+ Pre_inc_< BuildActions(proto::_child)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::pre_dec>
+ : proto::when<
+ proto::pre_dec<BuildActions >,
+ Pre_dec_< BuildActions(proto::_child)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::post_inc>
+ : proto::when<
+ proto::post_inc<BuildActions >,
+ Post_inc_< BuildActions(proto::_child)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::post_dec>
+ : proto::when<
+ proto::post_dec<BuildActions >,
+ Post_dec_< BuildActions(proto::_child)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::dereference>
+ : proto::when<
+ proto::dereference<BuildActions >,
+ Deref_< BuildActions(proto::_child)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::plus>
+ : proto::when<
+ proto::plus<BuildActions,BuildActions >,
+ Plus_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::minus>
+ : proto::when<
+ proto::minus<BuildActions,BuildActions >,
+ Minus_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::multiplies>
+ : proto::when<
+ proto::multiplies<BuildActions,BuildActions >,
+ Multiplies_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::divides>
+ : proto::when<
+ proto::divides<BuildActions,BuildActions >,
+ Divides_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::modulus>
+ : proto::when<
+ proto::modulus<BuildActions,BuildActions >,
+ Modulus_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::bitwise_and>
+ : proto::when<
+ proto::bitwise_and<BuildActions,BuildActions >,
+ Bitwise_And_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::bitwise_or>
+ : proto::when<
+ proto::bitwise_or<BuildActions,BuildActions >,
+ Bitwise_Or_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::bitwise_xor>
+ : proto::when<
+ proto::bitwise_xor<BuildActions,BuildActions >,
+ Bitwise_Xor_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+
+template<>
+struct BuildActionsCases::case_<proto::tag::plus_assign>
+ : proto::when<
+ proto::plus_assign<BuildActions,BuildActions >,
+ Plus_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::minus_assign>
+ : proto::when<
+ proto::minus_assign<BuildActions,BuildActions >,
+ Minus_Assign_<BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::multiplies_assign>
+ : proto::when<
+ proto::multiplies_assign<BuildActions,BuildActions >,
+ Multiplies_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::divides_assign>
+ : proto::when<
+ proto::divides_assign<BuildActions,BuildActions >,
+ Divides_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::modulus_assign>
+ : proto::when<
+ proto::modulus_assign<BuildActions,BuildActions >,
+ Modulus_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::shift_left_assign>
+ : proto::when<
+ proto::shift_left_assign<BuildActions,BuildActions >,
+ ShiftLeft_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::shift_right_assign>
+ : proto::when<
+ proto::shift_right_assign<BuildActions,BuildActions >,
+ ShiftRight_Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::shift_left>
+ : proto::when<
+ proto::shift_left<BuildActions,BuildActions >,
+ ShiftLeft_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::shift_right>
+ : proto::when<
+ proto::shift_right<BuildActions,BuildActions >,
+ ShiftRight_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::assign>
+ : proto::when<
+ proto::assign<BuildActions,BuildActions >,
+ Assign_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::subscript>
+ : proto::when<
+ proto::subscript<BuildActions,BuildActions >,
+ Subscript_< BuildActions(proto::_left),BuildActions(proto::_right)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::unary_plus>
+ : proto::when<
+ proto::unary_plus<BuildActions >,
+ Unary_Plus_< BuildActions(proto::_child)>()
+ >
+{};
+template<>
+struct BuildActionsCases::case_<proto::tag::negate>
+ : proto::when<
+ proto::negate<BuildActions >,
+ Unary_Minus_< BuildActions(proto::_child)>()
+ >
+{};
+
+template<>
+struct BuildActionsCases::case_<proto::tag::function>
+ : proto::or_<
+ proto::when<
+ proto::function<proto::terminal<if_tag>,BuildGuards,BuildActionSequence,BuildActionSequence >,
+ If_Else_<BuildGuards(proto::_child_c<1>),
+ BuildActionSequence(proto::_child_c<2>),
+ BuildActionSequence(proto::_child_c<3>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<if_then_tag>,BuildGuards,BuildActionSequence >,
+ If_Then_<BuildGuards(proto::_child_c<1>),
+ BuildActionSequence(proto::_child_c<2>)>()
+ >,
+ proto::when<
+ proto::function<proto::terminal<while_do_tag>,BuildGuards,BuildActionSequence >,
+ While_Do_<BuildGuards(proto::_child_c<1>),
+ BuildActionSequence(proto::_child_c<2>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<do_while_tag>,BuildGuards,BuildActionSequence >,
+ Do_While_<BuildGuards(proto::_child_c<1>),
+ BuildActionSequence(proto::_child_c<2>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<for_loop_tag>,
+ BuildActionSequence,BuildGuards,BuildActionSequence,BuildActionSequence>,
+ For_Loop_<BuildActionSequence(proto::_child_c<1>),
+ BuildGuards(proto::_child_c<2>),
+ BuildActionSequence(proto::_child_c<3>),
+ BuildActionSequence(proto::_child_c<4>) >()
+ >,
+ proto::or_<
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions >,
+ get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_> >,
+ get_fct<proto::_child_c<0> >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>)
+ ,BuildActions(proto::_child_c<2>),BuildActions(proto::_child_c<3>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>
+ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
+ ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) >()
+ >,
+ proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>
+ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
+ ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>)
+ ,BuildActions(proto::_child_c<5>) >()
+ >
+#ifdef BOOST_MSVC
+ ,proto::when<
+ proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >,
+ get_fct<proto::_child_c<0>
+ ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
+ ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>)
+ ,BuildActions(proto::_child_c<5>),BuildActions(proto::_child_c<6>) >()
+ >
+#endif
+ >
+ >
+{};
+
+template<>
+struct BuildActionsCases::case_<proto::tag::terminal>
+ : proto::or_<
+ proto::when<
+ proto::terminal<action_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<state_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<flag_tag>,
+ proto::_
+ >,
+ proto::when<
+ proto::terminal<event_tag>,
+ proto::_
+ >
+ >
+{};
+struct BuildActions
+ : proto::switch_<BuildActionsCases>
+{};
+
+// attributes building
+struct make_attributes_tag
+{
+ typedef int attribute_tag;
+};
+
+template<class X = proto::is_proto_expr>
+struct attribute
+{
+ BOOST_PROTO_BASIC_EXTENDS(
+ proto::terminal<make_attributes_tag>::type
+ , attribute
+ , proto::default_domain
+ )
+};
+
+ attribute<> const attributes_ = {{}};
+ attribute<> const no_attributes_ = {{}};
+
+ struct BuildAttributesHelper
+ : proto::make<
+ ::boost::mpl::pop_front<
+ proto::fold_tree<
+ proto::_
+ , ::boost::fusion::vector<>()
+ , ::boost::mpl::push_back<proto::_state, proto::_value>()
+ >
+ >
+ >
+ {};
+struct BuildAttributes
+ : proto::make<
+ ::boost::mpl::if_<
+ has_attribute_tag< ::boost::mpl::deref< ::boost::mpl::prior< ::boost::mpl::end< BuildAttributesHelper > > > >,
+ ::boost::mpl::pop_back< BuildAttributesHelper >,
+ BuildAttributesHelper >
+ >
+{};
+
+// helper to build a mpl::vector from a << list
+ struct BuildMplVectorHelper
+ : proto::make<
+ ::boost::mpl::pop_front<
+ proto::fold_tree<
+ proto::_
+ , ::boost::mpl::vector0<>()
+ , ::boost::mpl::push_back<proto::_state, proto::_>()
+ >
+ >
+ >
+ {};
+
+// flags building
+struct BuildFlags
+ : proto::make<
+ ::boost::mpl::remove_if<
+ BuildMplVectorHelper,
+ ::boost::mpl::not_< ::boost::is_same<get_euml_tag_type< ::boost::mpl::placeholders::_ >, flag_tag > >
+ >
+ >
+{};
+
+struct control_configure_tag {};
+
+// configuration building
+struct make_configure_tag
+{
+ typedef int control_configure_tag;
+};
+
+template<class X = proto::is_proto_expr>
+struct configure
+{
+ typedef not_euml_tag euml_tag_type;
+ BOOST_PROTO_BASIC_EXTENDS(
+ proto::terminal<make_configure_tag>::type
+ , configure
+ , sm_domain
+ )
+};
+
+ configure<> const configure_ = {{}};
+ configure<> const no_configure_ = {{}};
+
+struct BuildConfigure
+ : proto::make<
+ ::boost::mpl::remove_if<
+ BuildMplVectorHelper,
+ ::boost::mpl::not_< ::boost::is_same<get_euml_tag_type< ::boost::mpl::placeholders::_ >, config_tag > >
+ >
+ >
+{};
+
+struct BuildDeferred
+ : proto::make<
+ ::boost::mpl::remove_if<
+ BuildMplVectorHelper,
+ ::boost::mpl::not_< ::boost::is_same<get_euml_tag_type< ::boost::mpl::placeholders::_ >, event_tag > >
+ >
+ >
+{};
+
+template<class X = proto::is_proto_expr>
+struct define_init
+{
+ typedef int defer_create_tag;
+ BOOST_PROTO_BASIC_EXTENDS(
+ proto::terminal<state_tag>::type
+ , define_init
+ , sm_domain
+ )
+};
+
+define_init<> const init_ = {{}};
+struct BuildInit
+ : proto::make<
+ ::boost::mpl::pop_front<
+ proto::fold_tree<
+ proto::_
+ , ::boost::mpl::vector0<>()
+ , ::boost::mpl::push_back<proto::_state, proto::_>()
+ >
+ >
+ >
+ {};
+
+template <class Expr1,class Expr2,class Attr,class Configure,class BASE>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+BASE
+>
+build_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ return func_state<entry_action,exit_action,attributes_type,flags_type,deferred_type,BASE>();
+}
+
+template <class Expr1,class Expr2,class Attr,class Configure>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type
+>
+build_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ return func_state<entry_action,exit_action,attributes_type,flags_type,deferred_type>();
+}
+
+template <class Expr1,class Expr2,class Attr>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type
+>
+build_state(Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state<entry_action,exit_action,attributes_type>();
+}
+
+template <class Expr1,class Expr2>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type
+>
+build_state(Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return func_state<entry_action,exit_action>();
+}
+
+template <class Expr1>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+NoAction
+>
+build_state(Expr1 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ return func_state<entry_action,NoAction>();
+}
+func_state<
+NoAction,
+NoAction
+>
+build_state()
+{
+ return func_state<NoAction,NoAction>();
+}
+
+// provides the typedefs and interface. Concrete states derive from it.
+template<class STT,
+ class Init,
+ class EntryFunctor=NoAction,
+ class ExitFunctor=NoAction,
+ class Attributes= ::boost::fusion::vector<>,
+ class Flags = ::boost::mpl::vector0<>,
+ class Defer = ::boost::mpl::vector0<>,
+ class Configuration = ::boost::mpl::vector0<>,
+ class NoTransitionFunctor = NoAction,
+ class OnExceptionFunctor = NoAction,
+ class BASE = ::boost::msm::front::default_base_state>
+struct func_state_machine : public ::boost::msm::front::state_base<BASE,Attributes>,
+ euml_state<func_state_machine<STT,Init,EntryFunctor,ExitFunctor,Attributes,Flags,
+ Defer,NoTransitionFunctor,OnExceptionFunctor,BASE> >
+{
+ // grammar testing
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<EntryFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<ExitFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<NoTransitionFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<OnExceptionFunctor,invalid_type> ));
+ BOOST_MPL_ASSERT_NOT(( boost::is_same<STT,invalid_type> ));
+
+ // flags
+ typedef Flags flag_list;
+ // deferred events
+ typedef Defer deferred_events;
+ // customization (message queue, exceptions)
+ typedef Configuration configuration;
+
+
+ typedef BASE BaseAllStates;
+ typedef STT transition_table;
+ // the initial state of the player SM. Must be defined
+ typedef Init initial_state;
+
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& fsm)
+ {
+ EntryFunctor()(evt,fsm,*this);
+ }
+ template <class Event,class FSM>
+ void on_exit(Event const& evt,FSM& fsm)
+ {
+ ExitFunctor()(evt,fsm,*this);
+ }
+protected:
+ // Default no-transition handler. Can be replaced in the Derived SM class.
+ template <class FSM,class Event>
+ void no_transition(Event const& evt,FSM& fsm,int state)
+ {
+ NoTransitionFunctor()(evt,fsm,state);
+ }
+ // default exception handler. Can be replaced in the Derived SM class.
+ template <class FSM,class Event>
+ void exception_caught (Event const& evt,FSM& fsm,std::exception& e)
+ {
+ OnExceptionFunctor()(evt,fsm,e);
+ }
+};
+
+template <class STT,class Init>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type
+>
+build_sm(STT ,Init)
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ return func_state_machine<STT,init_type>();
+}
+
+template <class STT,class Init,class Expr1>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type
+>
+build_sm(STT ,Init , Expr1 const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ return func_state_machine<STT,init_type,entry_action>();
+}
+
+template <class STT,class Init,class Expr1,class Expr2>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type
+>
+build_sm(STT ,Init , Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return func_state_machine<STT,init_type,entry_action,exit_action>();
+}
+
+template <class STT,class Init,class Expr1,class Expr2,class Attr>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type
+>
+build_sm(STT ,Init , Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state_machine<STT,init_type,entry_action,exit_action,attributes_type>();
+}
+
+template <class STT,class Init,class Expr1,class Expr2,class Attr,class Configure>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+typename boost::result_of<BuildConfigure(Configure)>::type
+>
+build_sm(STT ,Init , Expr1 const& ,Expr2 const& , Attr const&, Configure const& )
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildConfigure(Configure)>::type config_type;
+ return func_state_machine<STT,init_type,entry_action,exit_action,attributes_type,flags_type,
+ deferred_type,config_type>();
+
+}
+
+template <class STT,class Init,class Expr1,class Expr2,class Attr,class Configure,class Expr3>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+typename boost::result_of<BuildConfigure(Configure)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr3,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr3)>,
+ make_invalid_type>::type
+>
+build_sm(STT ,Init , Expr1 const& ,Expr2 const& ,Attr const&, Configure const&, Expr3 const& )
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr3)>::type no_transition_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildConfigure(Configure)>::type config_type;
+ return func_state_machine<STT,init_type,entry_action,exit_action,attributes_type,flags_type,deferred_type,
+ config_type,no_transition_action>();
+}
+
+template <class STT,class Init,class Expr1,class Expr2,class Attr,class Configure,class Expr3,class Expr4>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+typename boost::result_of<BuildConfigure(Configure)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr3,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr3)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr4,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr4)>,
+ make_invalid_type>::type
+>
+build_sm(STT ,Init , Expr1 const& ,Expr2 const& , Attr const&, Configure const&, Expr3 const&, Expr4 const& )
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildConfigure(Configure)>::type config_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr3)>::type no_transition_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr4)>::type on_exception_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state_machine<STT,init_type,entry_action,exit_action,attributes_type,flags_type,deferred_type,
+ config_type,no_transition_action,on_exception_action>();
+}
+
+template <class STT,class Init,class Expr1,class Expr2,class Attr,class Configure,class Expr3,class Expr4,class BASE>
+func_state_machine<
+STT,
+typename boost::result_of<BuildInit(Init)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+typename boost::result_of<BuildConfigure(Configure)>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr3,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr3)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr4,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr4)>,
+ make_invalid_type>::type,
+BASE
+>
+build_sm(STT ,Init , Expr1 const& ,Expr2 const& ,Attr const& , Configure const&, Expr3 const&, Expr4 const& , BASE )
+{
+ typedef typename boost::result_of<BuildInit(Init)>::type init_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildConfigure(Configure)>::type config_type;
+ typedef typename boost::result_of<BuildActionSequence(Expr3)>::type no_transition_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr4)>::type on_exception_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state_machine<STT,init_type,entry_action,exit_action,attributes_type,flags_type,deferred_type,
+ config_type,no_transition_action,on_exception_action,BASE>();
+}
+
+template <class Expr>
+inherit_attributes<typename boost::result_of<BuildAttributes(Expr)>::type>
+build_attributes (Expr const&)
+{
+ return inherit_attributes<typename boost::result_of<BuildAttributes(Expr)>::type> ();
+}
+
+template <class Expr1,class Expr2,class Attr,class Configure,class BASE>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename ::boost::mpl::push_back< typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::TerminateFlag>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+BASE
+>
+build_terminate_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename ::boost::mpl::push_back<
+ typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::TerminateFlag >::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state<entry_action,exit_action,attributes_type,flags_type,deferred_type,BASE>();
+}
+
+template <class Expr1,class Expr2,class Attr,class Configure>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename ::boost::mpl::push_back< typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::TerminateFlag>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type
+>
+build_terminate_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename ::boost::mpl::push_back<
+ typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::TerminateFlag >::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+
+ return func_state<entry_action,exit_action,attributes_type,flags_type,deferred_type>();
+}
+
+template <class Expr1,class Expr2,class Attr>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+::boost::mpl::vector<boost::msm::TerminateFlag>
+>
+build_terminate_state(Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state<entry_action,exit_action,attributes_type, ::boost::mpl::vector< ::boost::msm::TerminateFlag> >();
+}
+
+template <class Expr1,class Expr2>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+::boost::fusion::vector<>,
+::boost::mpl::vector<boost::msm::TerminateFlag>
+>
+build_terminate_state(Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return func_state<entry_action,exit_action,
+ ::boost::fusion::vector<>, ::boost::mpl::vector< ::boost::msm::TerminateFlag> >();
+}
+
+template <class Expr1>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+NoAction,
+::boost::fusion::vector<>,
+::boost::mpl::vector<boost::msm::TerminateFlag>
+>
+build_terminate_state(Expr1 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ return func_state<entry_action,NoAction,::boost::fusion::vector<>,::boost::mpl::vector<boost::msm::TerminateFlag> >();
+}
+func_state<
+NoAction,
+NoAction,
+::boost::fusion::vector<>,
+::boost::mpl::vector<boost::msm::TerminateFlag>
+>
+build_terminate_state()
+{
+ return func_state<NoAction,NoAction,::boost::fusion::vector<>,::boost::mpl::vector<boost::msm::TerminateFlag> >();
+}
+
+template <class Expr1,class Expr2,class Attr,class Configure,class BASE,class EndInterruptEvent>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename ::boost::mpl::push_back<
+ typename ::boost::mpl::push_back< typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::InterruptedFlag>::type,
+ boost::msm::EndInterruptFlag<EndInterruptEvent>
+ >::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+BASE
+>
+build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ typedef typename ::boost::mpl::push_back<
+ typename ::boost::mpl::push_back<
+ typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::InterruptedFlag>::type,
+ boost::msm::EndInterruptFlag<EndInterruptEvent>
+ >::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ return func_state<entry_action,exit_action,attributes_type,flags_type,deferred_type,BASE>();
+}
+
+template <class Expr1,class Expr2,class Attr,class Configure,class EndInterruptEvent>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename ::boost::mpl::push_back<
+ typename ::boost::mpl::push_back< typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::InterruptedFlag>::type,
+ boost::msm::EndInterruptFlag<EndInterruptEvent>
+ >::type,
+typename boost::result_of<BuildDeferred(Configure)>::type
+>
+build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& ,Attr const&, Configure const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+
+ typedef typename ::boost::mpl::push_back<
+ typename ::boost::mpl::push_back<
+ typename boost::result_of<BuildFlags(Configure)>::type,
+ ::boost::msm::InterruptedFlag>::type,
+ boost::msm::EndInterruptFlag<EndInterruptEvent>
+ >::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+
+ return func_state<entry_action,exit_action,attributes_type,flags_type,deferred_type>();
+}
+
+template <class Expr1,class Expr2,class Attr,class EndInterruptEvent>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+::boost::mpl::vector<boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> >
+>
+build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return func_state<entry_action,exit_action,attributes_type,
+ ::boost::mpl::vector< boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> > >();
+}
+
+template <class Expr1,class Expr2,class EndInterruptEvent>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+::boost::fusion::vector<>,
+::boost::mpl::vector<boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> >
+>
+build_interrupt_state(EndInterruptEvent const&,Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return func_state<entry_action,exit_action,
+ ::boost::fusion::vector<>,
+ ::boost::mpl::vector< boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> > >();
+}
+
+template <class Expr1,class EndInterruptEvent>
+func_state<
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+NoAction,
+::boost::fusion::vector<>,
+::boost::mpl::vector<boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> >
+>
+build_interrupt_state(EndInterruptEvent const&, Expr1 const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ return func_state<entry_action,NoAction, ::boost::fusion::vector<>,
+ ::boost::mpl::vector<boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> > >();
+}
+
+template <class EndInterruptEvent>
+func_state<
+NoAction,
+NoAction,
+::boost::fusion::vector<>,
+::boost::mpl::vector<boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> >
+>
+build_interrupt_state(EndInterruptEvent const&)
+{
+ return func_state<NoAction,NoAction, ::boost::fusion::vector<>,
+ ::boost::mpl::vector<boost::msm::InterruptedFlag, boost::msm::EndInterruptFlag<EndInterruptEvent> > >();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2,class Attr,class Configure,class BASE>
+entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+BASE
+>
+build_entry_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return entry_func_state<ZoneIndex,entry_action,exit_action,attributes_type,flags_type,deferred_type,BASE>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2,class Attr,class Configure>
+entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type
+>
+build_entry_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return entry_func_state<ZoneIndex,entry_action,exit_action,attributes_type,flags_type,deferred_type>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2,class Attr>
+entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type
+>
+build_entry_state(Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return entry_func_state<ZoneIndex,entry_action,exit_action,attributes_type>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2>
+entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type
+>
+build_entry_state(Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return entry_func_state<ZoneIndex,entry_action,exit_action>();
+}
+
+template <int ZoneIndex,class Expr1>
+entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+NoAction
+>
+build_entry_state(Expr1 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ return entry_func_state<ZoneIndex,entry_action,NoAction>();
+}
+
+template <int ZoneIndex>
+entry_func_state<
+ZoneIndex,
+NoAction,
+NoAction
+>
+build_entry_state()
+{
+ return entry_func_state<ZoneIndex,NoAction,NoAction>();
+}
+
+template <class Event,class Expr1,class Expr2,class Attr,class Configure,class BASE>
+exit_func_state<
+Event,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+BASE
+>
+build_exit_state(Event const&,Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return exit_func_state<Event,entry_action,exit_action,attributes_type,flags_type,deferred_type,BASE>();
+}
+
+template <class Event,class Expr1,class Expr2,class Attr,class Configure>
+exit_func_state<
+Event,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type
+>
+build_exit_state(Event const&,Expr1 const& ,Expr2 const& ,Attr const&, Configure const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return exit_func_state<Event,entry_action,exit_action,attributes_type,flags_type,deferred_type>();
+}
+
+template <class Event,class Expr1,class Expr2,class Attr>
+exit_func_state<
+Event,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type
+>
+build_exit_state(Event const&,Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return exit_func_state<Event,entry_action,exit_action,attributes_type>();
+}
+
+template <class Event,class Expr1,class Expr2>
+exit_func_state<
+Event,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type
+>
+build_exit_state(Event const&,Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return exit_func_state<Event,entry_action,exit_action>();
+}
+
+template <class Event,class Expr1>
+exit_func_state<
+Event,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+NoAction
+>
+build_exit_state(Event const&, Expr1 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ return exit_func_state<Event,entry_action,NoAction>();
+}
+
+template <class Event>
+exit_func_state<
+Event,
+NoAction,
+NoAction
+>
+build_exit_state(Event const&)
+{
+ return exit_func_state<Event,NoAction,NoAction>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2,class Attr,class Configure,class BASE>
+explicit_entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type,
+BASE
+>
+build_explicit_entry_state(Expr1 const& ,Expr2 const& , Attr const&, Configure const&, BASE )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return explicit_entry_func_state<ZoneIndex,entry_action,exit_action,attributes_type,flags_type,deferred_type,BASE>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2,class Attr,class Configure>
+explicit_entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type,
+typename boost::result_of<BuildFlags(Configure)>::type,
+typename boost::result_of<BuildDeferred(Configure)>::type
+>
+build_explicit_entry_state(Expr1 const& ,Expr2 const& ,Attr const&, Configure const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildFlags(Configure)>::type flags_type;
+ typedef typename boost::result_of<BuildDeferred(Configure)>::type deferred_type;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return explicit_entry_func_state<ZoneIndex,entry_action,exit_action,attributes_type,flags_type,deferred_type>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2,class Attr>
+explicit_entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type,
+typename boost::result_of<BuildAttributes(Attr)>::type
+>
+build_explicit_entry_state(Expr1 const& ,Expr2 const& ,Attr const&)
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ typedef typename boost::result_of<BuildAttributes(Attr)>::type attributes_type;
+ return explicit_entry_func_state<ZoneIndex,entry_action,exit_action,attributes_type>();
+}
+
+template <int ZoneIndex,class Expr1,class Expr2>
+explicit_entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr2,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr2)>,
+ make_invalid_type>::type
+>
+build_explicit_entry_state(Expr1 const& ,Expr2 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ typedef typename boost::result_of<BuildActionSequence(Expr2)>::type exit_action;
+ return explicit_entry_func_state<ZoneIndex,entry_action,exit_action>();
+}
+
+template <int ZoneIndex,class Expr1>
+explicit_entry_func_state<
+ZoneIndex,
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr1,BuildActionSequence>::type,
+ boost::result_of<BuildActionSequence(Expr1)>,
+ make_invalid_type>::type,
+NoAction
+>
+build_explicit_entry_state(Expr1 const& )
+{
+ typedef typename boost::result_of<BuildActionSequence(Expr1)>::type entry_action;
+ return explicit_entry_func_state<ZoneIndex,entry_action,NoAction>();
+}
+
+template <int ZoneIndex>
+explicit_entry_func_state<
+ZoneIndex,
+NoAction,
+NoAction
+>
+build_explicit_entry_state()
+{
+ return explicit_entry_func_state<ZoneIndex,NoAction,NoAction>();
+}
+
+
+
+}}}}
+
+#endif //BOOST_MSM_FRONT_EUML_STATE_GRAMMAR_H
+

Added: sandbox/msm/boost/msm/front/euml/stl.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/stl.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,17 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_STL_H
+#define BOOST_MSM_FRONT_EUML_STL_H
+
+#include <boost/msm/front/euml/container.hpp>
+#include <boost/msm/front/euml/algorithm.hpp>
+
+#endif //BOOST_MSM_FRONT_EUML_STL_H
\ No newline at end of file

Added: sandbox/msm/boost/msm/front/euml/stt_grammar.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/stt_grammar.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,152 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_STT_GRAMMAR_H
+#define BOOST_MSM_FRONT_EUML_STT_GRAMMAR_H
+
+#include <boost/proto/transform.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+#include <boost/msm/front/euml/common.hpp>
+#include <boost/msm/front/euml/operator.hpp>
+#include <boost/msm/front/euml/guard_grammar.hpp>
+#include <boost/msm/front/euml/state_grammar.hpp>
+
+namespace proto = boost::proto;
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+template <class Left,class Right>
+struct fusion_left_right
+{
+ typedef Row<typename Left::Source,typename Left::Evt,typename Right::Target
+ ,typename Right::Action,typename Right::Guard> type;
+};
+template <class TargetGuard,class ActionClass>
+struct fusion_target_action_guard
+{
+ typedef Row<none,none,typename TargetGuard::Target,typename ActionClass::Action,typename TargetGuard::Guard> type;
+};
+
+// row grammar
+struct BuildSourcePlusEvent
+ : proto::or_<
+ proto::when<
+ proto::plus<proto::terminal<state_tag>,proto::terminal<event_tag> >,
+ Row<proto::_left,proto::_right,none>()
+ >,
+ proto::when<
+ proto::terminal<state_tag>,
+ Row<proto::_,none,none>()
+ >
+ >
+{};
+struct BuildActionPlusGuard
+ : proto::when<
+ proto::subscript<BuildActionSequence,BuildGuards >,
+ Row<none,none,none,
+ BuildActionSequence(proto::_left),
+ BuildGuards(proto::_right)>()
+ >
+{};
+
+struct BuildNextStates
+ : proto::or_<
+ proto::when<
+ proto::terminal<state_tag>,
+ proto::_
+ >,
+ proto::when <
+ proto::comma<proto::terminal<state_tag>,proto::terminal<state_tag> >,
+ ::boost::mpl::push_back<
+ make_vector_one_row<proto::_left>(),
+ proto::_right>()
+ >,
+ proto::when <
+ proto::comma<BuildNextStates,proto::terminal<state_tag> >,
+ ::boost::mpl::push_back<
+ BuildNextStates(proto::_left),
+ proto::_right >()
+ >
+ >
+{};
+
+struct BuildTargetPlusGuard
+ : proto::when<
+ proto::subscript<BuildNextStates,BuildGuards >,
+ Row<none,none,BuildNextStates(proto::_left),none,BuildGuards(proto::_right)>()
+ >
+{};
+
+
+struct BuildRight
+ : proto::or_<
+ // after == if just state without guard/action
+ proto::when<
+ BuildNextStates,
+ Row<none,none,BuildNextStates(proto::_),none>() >
+ // == target / action
+ , proto::when<
+ proto::divides<BuildNextStates,BuildActionSequence >,
+ Row<none,none,BuildNextStates(proto::_left),
+ BuildActionSequence(proto::_right) >() >
+ // == target [ guard ]
+ , proto::when<
+ proto::subscript<BuildNextStates,BuildGuards >,
+ Row<none,none,BuildNextStates(proto::_left),none,BuildGuards(proto::_right)>() >
+ // == target [ guard ] / action
+ , proto::when<
+ proto::divides<BuildTargetPlusGuard,
+ BuildActionSequence >,
+ fusion_target_action_guard<BuildTargetPlusGuard(proto::_left),
+ Row<none,none,none,BuildActionSequence(proto::_right)>()
+ >()
+ >
+ >
+{};
+
+struct BuildRow
+ : proto::or_<
+ proto::when<
+ proto::equal_to<BuildSourcePlusEvent,BuildRight >,
+ fusion_left_right<BuildSourcePlusEvent(proto::_left),BuildRight(proto::_right)>()
+ >
+ >
+{};
+
+// stt grammar
+struct BuildStt
+ : proto::or_<
+ proto::when<
+ proto::comma<BuildStt,BuildStt>,
+ boost::mpl::push_back<BuildStt(proto::_left),BuildRow(proto::_right)>()
+ >,
+ proto::when <
+ BuildRow,
+ make_vector_one_row<BuildRow(proto::_)>()
+ >
+ >
+{};
+
+
+template <class Expr>
+typename ::boost::mpl::eval_if<
+ typename proto::matches<Expr,BuildStt>::type,
+ boost::result_of<BuildStt(Expr)>,
+ make_invalid_type>::type
+build_stt(Expr const& expr)
+{
+ return typename boost::result_of<BuildStt(Expr)>::type();
+}
+
+
+}}}}
+#endif //BOOST_MSM_FRONT_EUML_STT_GRAMMAR_H

Added: sandbox/msm/boost/msm/front/euml/transformation.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/euml/transformation.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,331 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_EUML_TRANSFORMATION_H
+#define BOOST_MSM_FRONT_EUML_TRANSFORMATION_H
+
+#include <algorithm>
+#include <boost/msm/front/euml/common.hpp>
+
+namespace boost { namespace msm { namespace front { namespace euml
+{
+#ifdef __STL_CONFIG_H
+MSM_EUML_FUNCTION(FillN_ , std::fill_n , fill_n_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(Rotate_ , std::rotate , rotate_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(GenerateN_ , std::generate_n , generate_n_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+
+#else
+MSM_EUML_FUNCTION(FillN_ , std::fill_n , fill_n_ , void , void )
+MSM_EUML_FUNCTION(Rotate_ , std::rotate , rotate_ , void , void )
+MSM_EUML_FUNCTION(GenerateN_ , std::generate_n , generate_n_ , void , void )
+#endif
+
+MSM_EUML_FUNCTION(Copy_ , std::copy , copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(CopyBackward_ , std::copy_backward , copy_backward_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(Reverse_ , std::reverse , reverse_ , void , void )
+MSM_EUML_FUNCTION(ReverseCopy_ , std::reverse_copy , reverse_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(Remove_ , std::remove , remove_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(RemoveIf_ , std::remove_if , remove_if_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(RemoveCopy_ , std::remove_copy , remove_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(RemoveCopyIf_ , std::remove_copy_if , remove_copy_if_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(Fill_ , std::fill , fill_ , void , void )
+MSM_EUML_FUNCTION(Generate_ , std::generate , generate_ , void , void )
+MSM_EUML_FUNCTION(Unique_ , std::unique , unique_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(UniqueCopy_ , std::unique_copy , unique_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(RandomShuffle_ , std::random_shuffle , random_shuffle_ , void , void )
+MSM_EUML_FUNCTION(RotateCopy_ , std::rotate_copy , rotate_copy_ , RESULT_TYPE_PARAM4 , RESULT_TYPE2_PARAM4 )
+MSM_EUML_FUNCTION(Partition_ , std::partition , partition_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(StablePartition_ , std::stable_partition , stable_partition_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
+MSM_EUML_FUNCTION(Sort_ , std::sort , sort_ , void , void )
+MSM_EUML_FUNCTION(StableSort_ , std::stable_sort , stable_sort_ , void , void )
+MSM_EUML_FUNCTION(PartialSort_ , std::partial_sort , partial_sort_ , void , void )
+MSM_EUML_FUNCTION(PartialSortCopy_ , std::partial_sort_copy , partial_sort_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(NthElement_ , std::nth_element , nth_element_ , void , void )
+MSM_EUML_FUNCTION(Merge_ , std::merge , merge_ , RESULT_TYPE_PARAM5 , RESULT_TYPE2_PARAM5 )
+MSM_EUML_FUNCTION(InplaceMerge_ , std::inplace_merge , inplace_merge_ , void , void )
+MSM_EUML_FUNCTION(SetUnion_ , std::set_union , set_union_ , RESULT_TYPE_PARAM5 , RESULT_TYPE2_PARAM5 )
+MSM_EUML_FUNCTION(PushHeap_ , std::push_heap , push_heap_ , void , void )
+MSM_EUML_FUNCTION(PopHeap_ , std::pop_heap , pop_heap_ , void , void )
+MSM_EUML_FUNCTION(MakeHeap_ , std::make_heap , make_heap_ , void , void )
+MSM_EUML_FUNCTION(SortHeap_ , std::sort_heap , sort_heap_ , void , void )
+MSM_EUML_FUNCTION(NextPermutation_ , std::next_permutation , next_permutation_ , bool , bool )
+MSM_EUML_FUNCTION(PrevPermutation_ , std::prev_permutation , prev_permutation_ , bool , bool )
+MSM_EUML_FUNCTION(InnerProduct_ , std::inner_product , inner_product_ , RESULT_TYPE_PARAM4 , RESULT_TYPE2_PARAM4 )
+MSM_EUML_FUNCTION(PartialSum_ , std::partial_sum , partial_sum_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(AdjacentDifference_ , std::adjacent_difference , adjacent_difference_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(Replace_ , std::replace , replace_ , void , void )
+MSM_EUML_FUNCTION(ReplaceIf_ , std::replace_if , replace_if_ , void , void )
+MSM_EUML_FUNCTION(ReplaceCopy_ , std::replace_copy , replace_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+MSM_EUML_FUNCTION(ReplaceCopyIf_ , std::replace_copy_if , replace_copy_if_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
+
+
+
+template <class T>
+struct BackInserter_ : euml_action<BackInserter_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef std::back_insert_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type> type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef std::back_insert_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type> type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return std::back_inserter(T()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return std::back_inserter(T()(evt,fsm,state));
+ }
+};
+
+struct back_inserter_tag {};
+struct BackInserter_Helper: proto::extends< proto::terminal<back_inserter_tag>::type, BackInserter_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef BackInserter_<Arg1> type;
+ };
+};
+BackInserter_Helper const back_inserter_;
+
+template <class T>
+struct FrontInserter_ : euml_action<FrontInserter_<T> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef std::front_insert_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type> type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef std::front_insert_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type> type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return std::front_inserter(T()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return std::front_inserter(T()(evt,fsm,state));
+ }
+};
+
+struct front_inserter_tag {};
+struct FrontInserter_Helper: proto::extends< proto::terminal<front_inserter_tag>::type, FrontInserter_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef FrontInserter_<Arg1> type;
+ };
+};
+FrontInserter_Helper const front_inserter_;
+
+template <class T,class Pos>
+struct Inserter_ : euml_action<Inserter_<T,Pos> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef std::insert_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type2<T,Event,FSM,STATE>::type>::type> type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef std::insert_iterator<
+ typename ::boost::remove_reference<
+ typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type> type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return std::inserter(T()(evt,fsm,src,tgt),Pos()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename T::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return std::inserter(T()(evt,fsm,state),Pos()(evt,fsm,state));
+ }
+};
+
+struct inserter_tag {};
+struct Inserter_Helper: proto::extends< proto::terminal<inserter_tag>::type, Inserter_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Inserter_<Arg1,Arg2> type;
+ };
+};
+Inserter_Helper const inserter_;
+
+template <class Param1, class Param2, class Param3, class Param4, class Param5, class Enable=void >
+struct Transform_ : euml_action<Transform_<Param1,Param2,Param3,Param4,Param5,Enable> >
+{
+};
+
+template <class Param1, class Param2, class Param3, class Param4, class Param5>
+struct Transform_<Param1,Param2,Param3,Param4,Param5,
+ typename ::boost::enable_if<typename ::boost::is_same<Param5,void>::type >::type>
+ : euml_action<Transform_<Param1,Param2,Param3,Param4,Param5> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Param3,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Param3,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Param1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return std::transform(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt),
+ Param4()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Param1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return std::transform(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state),
+ Param4()(evt,fsm,state));
+ }
+};
+
+template <class Param1, class Param2, class Param3, class Param4, class Param5>
+struct Transform_<Param1,Param2,Param3,Param4,Param5,
+ typename ::boost::disable_if<typename ::boost::is_same<Param5,void>::type >::type>
+ : euml_action<Transform_<Param1,Param2,Param3,Param4,Param5> >
+{
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef typename get_result_type2<Param4,Event,FSM,STATE>::type type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef typename get_result_type<Param4,EVT,FSM,SourceState,TargetState>::type type;
+ };
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Param1::tag_type,action_tag>::type,
+ typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
+ operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
+ {
+ return std::transform (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt),
+ Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));
+ }
+ template <class Event,class FSM,class STATE>
+ typename ::boost::enable_if<
+ typename ::boost::mpl::has_key<
+ typename Param1::tag_type,state_action_tag>::type,
+ typename state_action_result<Event,FSM,STATE>::type >::type
+ operator()(Event const& evt,FSM& fsm,STATE& state )const
+ {
+ return std::transform (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state),
+ Param4()(evt,fsm,state),Param5()(evt,fsm,state));
+ }
+};
+struct transform_tag {};
+struct Transform_Helper: proto::extends< proto::terminal<transform_tag>::type, Transform_Helper, sm_domain>
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
+#ifdef BOOST_MSVC
+ ,class Arg6
+#endif
+>
+ struct In
+ {
+ typedef Transform_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
+ };
+};
+Transform_Helper const transform_;
+
+}}}}
+
+#endif //BOOST_MSM_FRONT_EUML_TRANSFORMATION_H

Added: sandbox/msm/boost/msm/front/functor_row.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/functor_row.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,170 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_FUNCTOR_ROW_H
+#define BOOST_MSM_FRONT_FUNCTOR_ROW_H
+
+#include <boost/mpl/set.hpp>
+#include <boost/mpl/for_each.hpp>
+
+#include <boost/typeof/typeof.hpp>
+
+#include <boost/msm/front/automatic_event.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+namespace boost { namespace msm { namespace front
+{
+ template <class SOURCE,class EVENT,class TARGET,class ACTION=none,class GUARD=none>
+ struct Row
+ {
+ typedef SOURCE Source;
+ typedef EVENT Evt;
+ typedef TARGET Target;
+ typedef ACTION Action;
+ typedef GUARD Guard;
+ // action plus guard
+ typedef row_tag row_type_tag;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt)
+ {
+ // create functor, call it
+ Action()(evt,fsm,src,tgt);
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt)
+ {
+ // create functor, call it
+ return Guard()(evt,fsm,src,tgt);
+ }
+ };
+
+ template<class SOURCE,class EVENT,class TARGET>
+ struct Row<SOURCE,EVENT,TARGET,none,none>
+ {
+ typedef SOURCE Source;
+ typedef EVENT Evt;
+ typedef TARGET Target;
+ typedef none Action;
+ typedef none Guard;
+ // no action, no guard
+ typedef _row_tag row_type_tag;
+ };
+ template<class SOURCE,class EVENT,class TARGET,class ACTION>
+ struct Row<SOURCE,EVENT,TARGET,ACTION,none>
+ {
+ typedef SOURCE Source;
+ typedef EVENT Evt;
+ typedef TARGET Target;
+ typedef ACTION Action;
+ typedef none Guard;
+ // no guard
+ typedef a_row_tag row_type_tag;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt)
+ {
+ // create functor, call it
+ Action()(evt,fsm,src,tgt);
+ }
+ };
+ template<class SOURCE,class EVENT,class TARGET,class GUARD>
+ struct Row<SOURCE,EVENT,TARGET,none,GUARD>
+ {
+ typedef SOURCE Source;
+ typedef EVENT Evt;
+ typedef TARGET Target;
+ typedef none Action;
+ typedef GUARD Guard;
+ // no action
+ typedef g_row_tag row_type_tag;
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt)
+ {
+ // create functor, call it
+ return Guard()(evt,fsm,src,tgt);
+ }
+ };
+ template<class TGT>
+ struct get_row_target
+ {
+ typedef typename TGT::Target type;
+ };
+
+ struct state_tag{};
+ struct event_tag{};
+ struct action_tag{};
+ struct state_action_tag{};
+ struct flag_tag{};
+ struct config_tag{};
+ struct not_euml_tag{};
+
+ template <class Sequence>
+ struct ActionSequence
+ {
+ typedef Sequence sequence;
+ template <class Event,class FSM,class STATE >
+ struct state_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class STATE>
+ struct Call
+ {
+ Call(EVT const& evt,FSM& fsm,STATE& state):
+ evt_(evt),fsm_(fsm),state_(state){}
+ template <class FCT>
+ void operator()(::boost::msm::back::wrap<FCT> const& )
+ {
+ FCT()(evt_,fsm_,state_);
+ }
+ private:
+ EVT const& evt_;
+ FSM& fsm_;
+ STATE& state_;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct transition_action_result
+ {
+ typedef void type;
+ };
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ struct Call2
+ {
+ Call2(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt):
+ evt_(evt),fsm_(fsm),src_(src),tgt_(tgt){}
+ template <class FCT>
+ void operator()(::boost::msm::back::wrap<FCT> const& )
+ {
+ FCT()(evt_,fsm_,src_,tgt_);
+ }
+ private:
+ EVT const & evt_;
+ FSM& fsm_;
+ SourceState& src_;
+ TargetState& tgt_;
+ };
+
+ typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
+
+ template <class EVT,class FSM,class STATE>
+ void operator()(EVT const& evt,FSM& fsm,STATE& state)
+ {
+ mpl::for_each<Sequence,boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (Call<EVT,FSM,STATE>(evt,fsm,state));
+ }
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ mpl::for_each<Sequence,boost::msm::back::wrap< ::boost::mpl::placeholders::_1> >
+ (Call2<EVT,FSM,SourceState,TargetState>(evt,fsm,src,tgt));
+ }
+ };
+}}}
+#endif //BOOST_MSM_FRONT_FUNCTOR_ROW_H

Added: sandbox/msm/boost/msm/front/state_machine_def.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/state_machine_def.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,132 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_STATEMACHINE_DEF_H
+#define BOOST_MSM_FRONT_STATEMACHINE_DEF_H
+
+#include <boost/mpl/vector.hpp>
+
+#include <boost/msm/row_tags.hpp>
+#include <boost/msm/front/states.hpp>
+#include <boost/msm/front/automatic_event.hpp>
+#include <boost/msm/front/common_states.hpp>
+
+namespace boost { namespace msm { namespace front
+{
+
+template<class Derived,class BaseState = default_base_state>
+struct state_machine_def : public state_base<BaseState>
+{
+ // tags
+ // default: no flag
+ typedef ::boost::mpl::vector0<> flag_list;
+ //default: no deferred events
+ typedef ::boost::mpl::vector0<> deferred_events;
+ // customization (message queue, exceptions)
+ typedef ::boost::mpl::vector0<> configuration;
+
+ typedef BaseState BaseAllStates;
+ template<
+ typename T1
+ , class Event
+ , typename T2
+ , void (Derived::*action)(Event const&)
+ >
+ struct a_row
+ {
+ typedef a_row_tag row_type_tag;
+ typedef T1 Source;
+ typedef T2 Target;
+ typedef Event Evt;
+ template <class FSM,class SourceState,class TargetState>
+ static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&)
+ {
+ // in this front-end, we don't need to know source and target states
+ (fsm.*action)(evt);
+ }
+ };
+
+ template<
+ typename T1
+ , class Event
+ , typename T2
+ >
+ struct _row
+ {
+ typedef _row_tag row_type_tag;
+ typedef T1 Source;
+ typedef T2 Target;
+ typedef Event Evt;
+ };
+
+ template<
+ typename T1
+ , class Event
+ , typename T2
+ , void (Derived::*action)(Event const&)
+ , bool (Derived::*guard)(Event const&)
+ >
+ struct row
+ {
+ typedef row_tag row_type_tag;
+ typedef T1 Source;
+ typedef T2 Target;
+ typedef Event Evt;
+ template <class FSM,class SourceState,class TargetState>
+ static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&)
+ {
+ // in this front-end, we don't need to know source and target states
+ (fsm.*action)(evt);
+ }
+ template <class FSM,class SourceState,class TargetState>
+ static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&)
+ {
+ // in this front-end, we don't need to know source and target states
+ return (fsm.*guard)(evt);
+ }
+ };
+ template<
+ typename T1
+ , class Event
+ , typename T2
+ , bool (Derived::*guard)(Event const&)
+ >
+ struct g_row
+ {
+ typedef g_row_tag row_type_tag;
+ typedef T1 Source;
+ typedef T2 Target;
+ typedef Event Evt;
+ template <class FSM,class SourceState,class TargetState>
+ static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&)
+ {
+ // in this front-end, we don't need to know source and target states
+ return (fsm.*guard)(evt);
+ }
+ };
+protected:
+ // Default no-transition handler. Can be replaced in the Derived SM class.
+ template <class FSM,class Event>
+ void no_transition(Event const& ,FSM&, int state)
+ {
+ BOOST_ASSERT(false);
+ }
+ // default exception handler. Can be replaced in the Derived SM class.
+ template <class FSM,class Event>
+ void exception_caught (Event const&,FSM&,std::exception& )
+ {
+ BOOST_ASSERT(false);
+ }
+};
+
+
+} } }// boost::msm::front
+#endif //BOOST_MSM_FRONT_STATEMACHINE_DEF_H
+

Added: sandbox/msm/boost/msm/front/states.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/front/states.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,129 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_FRONT_STATES_H
+#define BOOST_MSM_FRONT_STATES_H
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/msm/front/common_states.hpp>
+#include <boost/msm/row_tags.hpp>
+
+namespace boost { namespace msm { namespace front
+{
+
+struct no_sm_ptr
+{
+ // tags
+ typedef ::boost::mpl::bool_<false> needs_sm;
+};
+struct sm_ptr
+{
+ // tags
+ typedef ::boost::mpl::bool_<true> needs_sm;
+};
+// kept for backward compatibility
+struct NoSMPtr
+{
+ // tags
+ typedef ::boost::mpl::bool_<false> needs_sm;
+};
+struct SMPtr
+{
+ // tags
+ typedef ::boost::mpl::bool_<true> needs_sm;
+};
+
+// provides the typedefs and interface. Concrete states derive from it.
+// template argument: pointer-to-fsm policy
+template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
+struct state : public state_base<BASE>, SMPtrPolicy
+{
+ // tags
+ // default: no flag
+ typedef ::boost::mpl::vector0<> flag_list;
+ //default: no deferred events
+ typedef ::boost::mpl::vector0<> deferred_events;
+};
+
+// terminate state simply defines the TerminateFlag flag
+// template argument: pointer-to-fsm policy
+template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
+struct terminate_state : public state_base<BASE>, SMPtrPolicy
+{
+ // tags
+ typedef ::boost::mpl::vector<boost::msm::TerminateFlag> flag_list;
+ //default: no deferred events
+ typedef ::boost::mpl::vector0<> deferred_events;
+};
+
+// terminate state simply defines the InterruptedFlag and EndInterruptFlag<EndInterruptEvent> flags
+// template argument: event which ends the interrupt
+// template argument: pointer-to-fsm policy
+template <class EndInterruptEvent,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
+struct interrupt_state : public state_base<BASE>, SMPtrPolicy
+{
+ // tags
+ typedef ::boost::mpl::vector<boost::msm::InterruptedFlag,
+ boost::msm::EndInterruptFlag<EndInterruptEvent> >
+ flag_list;
+ //default: no deferred events
+ typedef ::boost::mpl::vector0<> deferred_events;
+};
+
+// not a state but a bunch of extra typedefs to handle direct entry into a composite state. To be derived from
+// template argument: zone index of this state
+template <int ZoneIndex=-1>
+struct explicit_entry
+{
+ typedef int no_automatic_create;
+ typedef int explicit_entry_state;
+ enum {zone_index=ZoneIndex};
+};
+
+// to be derived from. Makes a type an entry (pseudo) state. Actually an almost full-fledged state
+// template argument: containing composite
+// template argument: zone index of this state
+// template argument: pointer-to-fsm policy
+template<int ZoneIndex=-1,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
+struct entry_pseudo_state
+ : public state_base<BASE>,SMPtrPolicy
+{
+ // tags
+ typedef int pseudo_entry;
+ enum {zone_index=ZoneIndex};
+ typedef int explicit_entry_state;
+ // default: no flag
+ typedef ::boost::mpl::vector0<> flag_list;
+ //default: no deferred events
+ typedef ::boost::mpl::vector0<> deferred_events;
+};
+
+// to be derived from. Makes a state an exit (pseudo) state. Actually an almost full-fledged state
+// template argument: event to forward
+// template argument: pointer-to-fsm policy
+template<class Event,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
+struct exit_pseudo_state : public state_base<BASE> , SMPtrPolicy
+{
+ typedef Event event;
+ typedef BASE Base;
+ typedef SMPtrPolicy PtrPolicy;
+ typedef int pseudo_exit;
+
+ // default: no flag
+ typedef ::boost::mpl::vector< > flag_list;
+ //default: no deferred events
+ typedef ::boost::mpl::vector0<> deferred_events;
+};
+
+}}}
+
+#endif //BOOST_MSM_FRONT_STATES_H
+

Deleted: sandbox/msm/boost/msm/history_policies.hpp
==============================================================================
--- sandbox/msm/boost/msm/history_policies.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,105 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_HISTORY_POLICIES_H
-#define BOOST_MSM_HISTORY_POLICIES_H
-
-#include <vector>
-#include <boost/mpl/contains.hpp>
-
-namespace boost { namespace msm
-{
-
-// policy classes
-
-// Default: no history used
-class NoHistory
-{
-public:
- NoHistory():m_initialStates(){}
- ~NoHistory(){}
- void set_initial_states(std::vector<int>& initial_states)
- {
- m_initialStates = initial_states;
- }
- void history_exit(std::vector<int>& )
- {
- // ignore
- }
- // returns the state where the state machine should be at start
- template <class Event>
- std::vector<int>& history_entry(Event const& )
- {
- // always come back to the original state
- return m_initialStates;
- }
-private:
- std::vector<int> m_initialStates;
-};
-
-// not UML standard. Always activates history, no matter which event generated the transition
-class AlwaysHistory
-{
-public:
- AlwaysHistory():m_currentStates(){}
- ~AlwaysHistory(){}
- void set_initial_states(std::vector<int>& initial_states)
- {
- m_currentStates = initial_states;
- }
- void history_exit(std::vector<int>& current_states)
- {
- m_currentStates = current_states;
- }
- // returns the state where the state machine should be at start
- template <class Event>
- std::vector<int>& history_entry(Event const& )
- {
- // always load back the last active state
- return m_currentStates;
- }
-private:
- std::vector<int> m_currentStates;
-};
-
-// UML Shallow history. For deep history, just use this policy for all the contained state machines
-template <class Events>
-class ShallowHistory
-{
-public:
- ShallowHistory():m_initialStates(),m_currentStates(){}
- ~ShallowHistory(){}
- void set_initial_states(std::vector<int>& initial_states)
- {
- m_currentStates = initial_states;
- m_initialStates = initial_states;
- }
- void history_exit(std::vector<int>& current_states)
- {
- m_currentStates = current_states;
- }
- // returns the state where the state machine should be at start
- template <class Event>
- std::vector<int>& history_entry(Event const&)
- {
- if ( ::boost::mpl::contains<Events,Event>::value)
- {
- return m_currentStates;
- }
- // not one of our events, no history
- return m_initialStates;
- }
-private:
- std::vector<int> m_initialStates;
- std::vector<int> m_currentStates;
-};
-
-} }//boost::msm
-#endif //BOOST_MSM_HISTORY_POLICIES_H

Deleted: sandbox/msm/boost/msm/metafunctions.hpp
==============================================================================
--- sandbox/msm/boost/msm/metafunctions.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,505 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_METAFUNCTIONS_H
-#define BOOST_MSM_METAFUNCTIONS_H
-
-#include <boost/mpl/copy_if.hpp>
-#include <boost/mpl/unique.hpp>
-#include <boost/mpl/set.hpp>
-#include <boost/mpl/at.hpp>
-#include <boost/mpl/pair.hpp>
-#include <boost/mpl/map.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/find_if.hpp>
-#include <boost/mpl/count_if.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/insert.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/mpl/find.hpp>
-#include <boost/mpl/insert.hpp>
-#include <boost/mpl/insert_range.hpp>
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#include <boost/msm/common_types.hpp>
-
-namespace mpl = boost::mpl;
-BOOST_MPL_HAS_XXX_TRAIT_DEF(explicit_creation)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_entry)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_exit)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(concrete_exit_state)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(composite_tag)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(not_real_row_tag)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(event_blocking_flag)
-
-namespace boost { namespace msm
-{
-
-// returns the current state type of a transition
-template <class Transition>
-struct transition_source_type
-{
- typedef typename Transition::current_state_type type;
-};
-
-// returns the target state type of a transition
-template <class Transition>
-struct transition_target_type
-{
- typedef typename Transition::next_state_type type;
-};
-
-// helper functions for generate_state_ids
-// create a pair of a state and a passed id for source and target states
-template <class Id,class Transition>
-struct make_pair_source_state_id
-{
- typedef typename ::boost::mpl::pair<typename Transition::current_state_type,Id> type;
-};
-template <class Id,class Transition>
-struct make_pair_target_state_id
-{
- typedef typename ::boost::mpl::pair<typename Transition::next_state_type,Id> type;
-};
-
-// iterates through a transition table and automatically generates ids starting at 0
-// first the source states, transition up to down
-// then the target states, up to down
-template <class stt>
-struct generate_state_ids
-{
- typedef typename
- ::boost::mpl::fold<
- stt,::boost::mpl::pair< ::boost::mpl::map< >, ::boost::mpl::int_<0> >,
- ::boost::mpl::pair<
- ::boost::mpl::if_<
- ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- transition_source_type< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- ::boost::mpl::insert< ::boost::mpl::first<mpl::placeholders::_1>,
- make_pair_source_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
- ::boost::mpl::placeholders::_2> >
- >,
- ::boost::mpl::if_<
- ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- transition_source_type< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
- ::boost::mpl::next< ::boost::mpl::second<mpl::placeholders::_1 > >
- >
- > //pair
- >::type source_state_ids;
- typedef typename ::boost::mpl::first<source_state_ids>::type source_state_map;
- typedef typename ::boost::mpl::second<source_state_ids>::type highest_state_id;
-
-
- typedef typename
- ::boost::mpl::fold<
- stt,::boost::mpl::pair<source_state_map,highest_state_id >,
- ::boost::mpl::pair<
- ::boost::mpl::if_<
- ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- transition_target_type< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- ::boost::mpl::insert< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- make_pair_target_state_id< ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
- ::boost::mpl::placeholders::_2> >
- >,
- ::boost::mpl::if_<
- ::boost::mpl::has_key< ::boost::mpl::first< ::boost::mpl::placeholders::_1>,
- transition_target_type< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::second< ::boost::mpl::placeholders::_1 >,
- ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > >
- >
- > //pair
- >::type all_state_ids;
- typedef typename ::boost::mpl::first<all_state_ids>::type type;
-};
-
-// returns the id of a given state
-template <class stt,class State>
-struct get_state_id
-{
- typedef typename ::boost::mpl::at<typename generate_state_ids<stt>::type,State>::type type;
- enum {value = type::value};
-};
-
-// returns a mpl::vector containing the init states of a state machine
-template <class States>
-struct get_initial_states
-{
- typedef typename ::boost::mpl::if_<
- ::boost::mpl::is_sequence<States>,
- States,
- typename ::boost::mpl::push_back< ::boost::mpl::vector<>,States>::type >::type type;
-};
-
-// returns a mpl::int_ containing the size of a region. If the argument is not a sequence, returns 1
-template <class region>
-struct get_number_of_regions
-{
- typedef typename mpl::if_<
- ::boost::mpl::is_sequence<region>,
- ::boost::mpl::size<region>,
- ::boost::mpl::int_<1> >::type type;
-};
-
-// builds a mpl::vector of initial states
-template <class region>
-struct get_regions_as_sequence
-{
- typedef typename ::boost::mpl::if_<
- ::boost::mpl::is_sequence<region>,
- region,
- typename ::boost::mpl::push_back< ::boost::mpl::vector<>,region>::type >::type type;
-};
-
-template <class ToCreateSeq>
-struct get_explicit_creation_as_sequence
-{
- typedef typename ::boost::mpl::if_<
- ::boost::mpl::is_sequence<ToCreateSeq>,
- ToCreateSeq,
- typename ::boost::mpl::push_back< ::boost::mpl::vector<>,ToCreateSeq>::type >::type type;
-};
-
-// returns true if 2 transitions have the same source (used to remove duplicates in search of composite states)
-template <class stt,class Transition1,class Transition2>
-struct have_same_source
-{
- enum {current_state1 = get_state_id<stt,typename Transition1::current_state_type >::type::value};
- enum {current_state2 = get_state_id<stt,typename Transition2::current_state_type >::type::value};
- enum {value = ((int)current_state1 == (int)current_state2) };
-};
-
-
-// A metafunction that returns the Event associated with a transition.
-template <class Transition>
-struct transition_event
-{
- typedef typename Transition::event type;
-};
-
-// returns true for composite states
-template <class State>
-struct is_composite_state
-{
- enum {value = has_composite_tag<State>::type::value};
- typedef typename has_composite_tag<State>::type type;
-};
-
-// transform a transition table in a container of source states
-template <class stt>
-struct keep_source_names
-{
- // instead of the rows we want only the names of the states (from source)
- typedef typename
- ::boost::mpl::transform<
- stt,transition_source_type< ::boost::mpl::placeholders::_1> >::type type;
-};
-
-// transform a transition table in a container of target states
-template <class stt>
-struct keep_target_names
-{
- // instead of the rows we want only the names of the states (from source)
- typedef typename
- ::boost::mpl::transform<
- stt,transition_target_type< ::boost::mpl::placeholders::_1> >::type type;
-};
-
-template <class stt>
-struct generate_state_set
-{
- // keep in the original transition table only the source/target state types
- typedef typename keep_source_names<stt>::type sources;
- typedef typename keep_target_names<stt>::type targets;
- typedef typename
- ::boost::mpl::fold<
- sources, ::boost::mpl::set<>,
- ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>
- >::type source_set;
- typedef typename
- ::boost::mpl::fold<
- targets,source_set,
- ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>
- >::type type;
-};
-
-// iterates through the transition table and generate a mpl::set<> containing all the events
-template <class stt>
-struct generate_event_set
-{
- typedef typename
- ::boost::mpl::fold<
- stt, ::boost::mpl::set<>,
- ::boost::mpl::if_<
- ::boost::mpl::has_key< ::boost::mpl::placeholders::_1,
- transition_event< ::boost::mpl::placeholders::_2> >,
- ::boost::mpl::placeholders::_1,
- ::boost::mpl::insert< ::boost::mpl::placeholders::_1,
- transition_event< ::boost::mpl::placeholders::_2> > >
- >::type type;
-};
-
-// returns a mpl::bool_<true> if State has Event as delayed event
-template <class State, class Event>
-struct has_state_delayed_event
-{
- typedef typename ::boost::mpl::find<typename State::deferred_events,Event>::type found;
- typedef typename ::boost::mpl::if_<
- ::boost::is_same<found,typename ::boost::mpl::end<typename State::deferred_events>::type >,
- ::boost::mpl::bool_<false>,
- ::boost::mpl::bool_<true> >::type type;
-};
-// returns a mpl::bool_<true> if State has any delayed event
-template <class State>
-struct has_state_delayed_events
-{
- typedef typename ::boost::mpl::if_<
- ::boost::mpl::empty<typename State::deferred_events>,
- ::boost::mpl::bool_<false>,
- ::boost::mpl::bool_<true> >::type type;
-};
-
-// Template used to create dummy entries for initial states not found in the stt.
-template< typename T1 >
-struct not_a_row
-{
- typedef int not_real_row_tag;
- struct dummy_event
- {
- };
- typedef T1 current_state_type;
- typedef T1 next_state_type;
- typedef dummy_event event;
-};
-
-template <class StateType>
-struct get_explicit_creation
-{
- typedef typename StateType::explicit_creation type;
-};
-
-// add to the stt the initial states which could be missing (if not being involved in a transition)
-template <class Derived>
-struct create_stt
-{
- typedef typename Derived::transition_table stt;
- // get the state set
- typedef typename generate_state_set<stt>::type states;
- // transform the initial region(s) in a sequence
- typedef typename get_regions_as_sequence<typename Derived::initial_state>::type init_states;
- // iterate through the initial states and add them in the stt if not already there
- typedef typename
- ::boost::mpl::fold<
- init_states,stt,
- ::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>,
- not_a_row< ::boost::mpl::placeholders::_2 > >
- >
- >::type with_init;
- // do the same for states marked as explicitly created
- typedef typename get_explicit_creation_as_sequence<
- typename ::boost::mpl::eval_if<
- typename has_explicit_creation<Derived>::type,
- get_explicit_creation<Derived>,
- ::boost::mpl::vector<> >::type
- >::type explicit_created;
-
- typedef typename
- ::boost::mpl::fold<
- explicit_created,with_init,
- ::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>,
- not_a_row< ::boost::mpl::placeholders::_2 > >
- >
- >::type type;
-};
-
-// returns the transition table of a Composite state
-template <class Composite>
-struct get_transition_table
-{
- typedef typename create_stt<Composite>::type type;
-};
-// recursively get a transition table for a given composite state.
-// returns the transition table for this state + the tables of all composite sub states recursively
-template <class Composite>
-struct recursive_get_transition_table
-{
- // get the transition table of the state if it's a state machine
- typedef typename ::boost::mpl::eval_if<typename is_composite_state<Composite>::type,
- get_transition_table<Composite>,
- ::boost::mpl::vector0<> >::type org_table;
-
- typedef typename generate_state_set<org_table>::type states;
-
- // and for every substate, recursively get the transition table if it's a state machine
- typedef typename ::boost::mpl::fold<
- states,org_table,
- ::boost::mpl::insert_range< ::boost::mpl::placeholders::_1, ::boost::mpl::end<mpl::placeholders::_1>,
- recursive_get_transition_table< ::boost::mpl::placeholders::_2 > >
- >::type type;
-
-};
-
-// metafunction used to say if a SM has pseudo exit states
-template <class Derived>
-struct has_fsm_delayed_events
-{
- typedef typename create_stt<Derived>::type Stt;
- typedef typename generate_state_set<Stt>::type state_list;
-
- typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
- state_list,has_state_delayed_events< ::boost::mpl::placeholders::_1 > >::value != 0> type;
-};
-
-template <class Transition>
-struct make_vector
-{
- typedef ::boost::mpl::vector<Transition> type;
-};
-template< typename Entry >
-struct get_first_element_pair_second
-{
- typedef typename ::boost::mpl::front<typename Entry::second>::type type;
-};
-
-// returns the owner of an explicit_entry state
-// which is the containing SM if the transition originates from outside the containing SM
-// or else the explicit_entry state itself
-template <class State,class ContainingSM>
-struct get_owner
-{
- typedef typename ::boost::mpl::if_<
- typename ::boost::mpl::not_<typename ::boost::is_same<typename State::owner,ContainingSM>::type>::type,
- typename State::owner,
- State >::type type;
-};
-template <class Sequence,class ContainingSM>
-struct get_fork_owner
-{
- typedef typename ::boost::mpl::front<Sequence>::type seq_front;
- typedef typename ::boost::mpl::if_<
- typename ::boost::mpl::not_<
- typename ::boost::is_same<typename seq_front::owner,ContainingSM>::type>::type,
- typename seq_front::owner,
- seq_front >::type type;
-};
-
-// metafunctions used to find out if a state is entry, exit or something else
-template <class State>
-struct is_pseudo_entry
-{
- typedef typename ::boost::mpl::if_< typename has_pseudo_entry<State>::type,
- ::boost::mpl::bool_<true>,::boost::mpl::bool_<false>
- >::type type;
-};
-// says if a state is an exit pseudo state
-template <class State>
-struct is_pseudo_exit
-{
- typedef typename ::boost::mpl::if_< typename has_pseudo_exit<State>::type,
- ::boost::mpl::bool_<true>, ::boost::mpl::bool_<false>
- >::type type;
-};
-
-// metafunction used to say if a SM has pseudo exit states
-template <class StateType>
-struct has_exit_pseudo_states_helper
-{
- typedef typename create_stt<StateType>::type Stt;
- typedef typename generate_state_set<Stt>::type state_list;
-
- typedef ::boost::mpl::bool_< ::boost::mpl::count_if<
- state_list,is_pseudo_exit< ::boost::mpl::placeholders::_1> >::value != 0> type;
-};
-template <class StateType>
-struct has_exit_pseudo_states
-{
- typedef typename ::boost::mpl::eval_if<typename is_composite_state<StateType>::type,
- has_exit_pseudo_states_helper<StateType>,
- ::boost::mpl::bool_<false> >::type type;
-};
-
-template <class StateType>
-struct is_state_blocking
-{
- typedef typename ::boost::mpl::fold<
- typename StateType::flag_list, ::boost::mpl::set<>,
- ::boost::mpl::if_<
- has_event_blocking_flag< ::boost::mpl::placeholders::_2>,
- ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >,
- ::boost::mpl::placeholders::_1 >
- >::type blocking_flags;
-
- typedef typename ::boost::mpl::if_<
- ::boost::mpl::empty<blocking_flags>,
- ::boost::mpl::bool_<false>,
- ::boost::mpl::bool_<true> >::type type;
-};
-// returns a mpl::bool_<true> if fsm has an event blocking flag in one of its substates
-template <class StateType>
-struct has_fsm_blocking_states
-{
- typedef typename create_stt<StateType>::type Stt;
- typedef typename generate_state_set<Stt>::type state_list;
-
- typedef typename ::boost::mpl::fold<
- state_list, ::boost::mpl::set<>,
- ::boost::mpl::if_<
- is_state_blocking< ::boost::mpl::placeholders::_2>,
- ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 >,
- ::boost::mpl::placeholders::_1 >
- >::type blocking_states;
-
- typedef typename ::boost::mpl::if_<
- ::boost::mpl::empty<blocking_states>,
- ::boost::mpl::bool_<false>,
- ::boost::mpl::bool_<true> >::type type;
-};
-
-// 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
-typename ::boost::enable_if<typename ::boost::mpl::and_<typename is_composite_state<FSM>::type,
- typename is_pseudo_exit<StateType>::type>,bool >::type
-is_exit_state_active(FSM& fsm)
-{
- typedef typename OwnerFct::type Composite;
- typedef typename create_stt<Composite>::type stt;
- int state_id = get_state_id<stt,StateType>::type::value;
- Composite& comp = fsm.template get_state<Composite&>();
- return (std::find(comp.current_state().begin(),comp.current_state().end(),state_id)
- !=comp.current_state().end());
-}
-template <class StateType,class OwnerFct,class FSM>
-inline
-typename ::boost::disable_if<typename ::boost::mpl::and_<typename is_composite_state<FSM>::type,
- typename is_pseudo_exit<StateType>::type>,bool >::type
-is_exit_state_active(FSM& fsm)
-{
- return false;
-}
-
-} } //boost::msm
-
-#endif // BOOST_MSM_METAFUNCTIONS_H
-

Added: sandbox/msm/boost/msm/row_tags.hpp
==============================================================================
--- (empty file)
+++ sandbox/msm/boost/msm/row_tags.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,43 @@
+// Copyright 2008 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_ROW_TAGS_H
+#define BOOST_MSM_ROW_TAGS_H
+
+
+
+namespace boost { namespace msm
+{
+//tags
+struct a_row_tag {};
+struct g_row_tag {};
+struct _row_tag {};
+struct row_tag {};
+
+// flags used internally to handle terminate / interrupt states
+struct TerminateFlag
+{
+ typedef int non_forwarding_flag;
+ typedef int event_blocking_flag;
+};
+struct InterruptedFlag
+{
+ typedef int non_forwarding_flag;
+ typedef int event_blocking_flag;
+};
+template <class EndEvent>
+struct EndInterruptFlag
+{
+ typedef int non_forwarding_flag;
+};
+
+} } // boost::msm
+#endif //BOOST_MSM_ROW_TAGS_H
+

Deleted: sandbox/msm/boost/msm/state_machine.hpp
==============================================================================
--- sandbox/msm/boost/msm/state_machine.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,1540 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_STATEMACHINE_H
-#define BOOST_MSM_STATEMACHINE_H
-
-#include <vector>
-#include <queue>
-#include <functional>
-#include <numeric>
-#include <utility>
-
-#include <boost/mpl/fold.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/contains.hpp>
-#include <boost/mpl/insert_range.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/logical.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/not.hpp>
-
-#include <boost/assert.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/smart_ptr.hpp>
-
-#include <boost/bind.hpp>
-#include <boost/bind/apply.hpp>
-#include <boost/function.hpp>
-#include <boost/msm/metafunctions.hpp>
-#include <boost/msm/history_policies.hpp>
-#include <boost/msm/bind_helpers.hpp>
-#include <boost/msm/copy_policies.hpp>
-#include <boost/msm/common_types.hpp>
-#include <boost/msm/args.hpp>
-#include <boost/msm/dispatch_table.hpp>
-#include <boost/msm/states.hpp>
-
-BOOST_MPL_HAS_XXX_TRAIT_DEF(accept_sig)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(no_exception_thrown)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(no_message_queue)
-
-namespace boost { namespace msm
-{
-
-// This declares the statically-initialized dispatch_table instance.
-template <class Fsm, class HistoryPolicy,class BaseState, class CopyPolicy,class Stt, class Event>
-const dispatch_table<Fsm, HistoryPolicy,BaseState,CopyPolicy,Stt, Event>
-dispatch_table<Fsm, HistoryPolicy,BaseState,CopyPolicy,Stt, Event>::instance;
-
-// CRTP base class for state machines. Pass the actual FSM class as
-// the Derived parameter.
-template<class Derived,class HistoryPolicy=NoHistory,
- class BaseState=default_base_state, class CopyPolicy=NoCopy>
-class state_machine : public state_base<BaseState>,CopyPolicy
-{
-private:
- typedef ::boost::function<
- execute_return ()> transition_fct;
- typedef ::boost::function<
- execute_return () > deferred_fct;
- typedef std::queue<deferred_fct > deferred_events_queue_t;
- typedef std::queue<transition_fct > events_queue_t;
- typedef bool (*flag_handler)(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>&);
- // all state machines are friend with each other to allow embedding any of them in another fsm
- template <class ,class ,class,class > friend class state_machine;
-
- // helper to add, if needed, visitors to all states
- // version without visitors
- template <class StateType,class Enable=void>
- struct visitor_fct_helper
- {
- public:
- visitor_fct_helper(){}
- void fill_visitors(int number_of_states)
- {
- }
- template <class FCT>
- void insert(int index,FCT fct)
- {
- }
- template <class VISITOR>
- void execute(int index,VISITOR vis)
- {
- }
- };
- // version with visitors
- template <class StateType>
- struct visitor_fct_helper<StateType,typename ::boost::enable_if<has_accept_sig<StateType> >::type>
- {
- public:
- visitor_fct_helper():m_state_visitors(){}
- void fill_visitors(int number_of_states)
- {
- m_state_visitors.resize(number_of_states);
- }
- template <class FCT>
- void insert(int index,FCT fct)
- {
- m_state_visitors[index]=fct;
- }
- void execute(int index)
- {
- m_state_visitors[index]();
- }
-
-#define MSM_VISITOR_HELPER_EXECUTE_SUB(z, n, unused) ARG ## n vis ## n
-#define MSM_VISITOR_HELPER_EXECUTE(z, n, unused) \
- template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
- void execute(int index BOOST_PP_COMMA_IF(n) \
- BOOST_PP_ENUM(n, MSM_VISITOR_HELPER_EXECUTE_SUB, ~ ) ) \
- { \
- m_state_visitors[index](BOOST_PP_ENUM_PARAMS(n,vis)); \
- }
- BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_HELPER_EXECUTE, ~)
-#undef MSM_VISITOR_HELPER_EXECUTE
-#undef MSM_VISITOR_HELPER_EXECUTE_SUB
- private:
- typedef typename StateType::accept_sig::type visitor_fct;
- typedef std::vector<visitor_fct> visitors;
-
- visitors m_state_visitors;
- };
-
- public:
- // tags
- typedef int composite_tag;
-
- // default: no flag
- typedef ::boost::mpl::vector0<> flag_list;
- //default: no deferred events
- typedef ::boost::mpl::vector<> deferred_events;
- // in case someone needs to know
- typedef HistoryPolicy history_policy;
- typedef CopyPolicy copy_policy;
-
- struct InitEvent { };
- // flag handling
- struct Flag_AND
- {
- typedef std::logical_and<bool> type;
- };
- struct Flag_OR
- {
- typedef std::logical_or<bool> type;
- };
- typedef ::boost::shared_ptr<BaseState> pBaseState;
-
- // Member functions
-
- // start the state machine (calls entry of the initial state)
- void start()
- {
- // call on_entry on this SM
- (static_cast<Derived*>(this))->on_entry(InitEvent());
- typedef typename get_initial_states<typename Derived::initial_state>::type init_states;
- ::boost::mpl::for_each<init_states, boost::msm::wrap<mpl::placeholders::_1> >
- (call_init<InitEvent>(&m_state_list[0],InitEvent()));
- }
-
- // Main function used by clients of the derived FSM to make
- // transitions. Can also be called for internally (for example in an action method) generated events.
- template<class Event>
- execute_return process_event(Event const& evt)
- {
- // extend the table with tables from composite states
- typedef typename extend_table<Derived>::type complete_table;
- // use this table as if it came directly from the user
- typedef dispatch_table<Derived,HistoryPolicy,BaseState,CopyPolicy,complete_table,Event> table;
-
- HandledEnum ret_handled=HANDLED_FALSE;
- // if the state machine has terminate or interrupt flags, check them, otherwise skip
- if (is_event_handling_blocked_helper<Derived,Event>())
- return ::boost::make_tuple(HANDLED_TRUE,&this->m_states);
- // if a message queue is needed and processing is on the way
- if (!do_pre_msg_queue_helper<Derived,Event>(evt))
- {
- // wait for the end of current processing
- return ::boost::make_tuple(HANDLED_TRUE,&this->m_states);
- }
- else
- {
- // event can be handled, processing
- // prepare the next deferred event for handling
- // if one defer is found in the SM, otherwise skip
- handle_defer_helper<Derived> defer_helper(m_deferred_events_queue);
- defer_helper.do_pre_handle_deferred();
- // process event
- bool handled = this->do_process_helper<Derived,Event>(evt);
- if (handled)
- {
- ret_handled = HANDLED_TRUE;
- }
- // after handling, take care of the deferred events
- defer_helper.do_post_handle_deferred();
-
- // now check if some events were generated in a transition and was not handled
- // because of another processing, and if yes, start handling them
- do_post_msg_queue_helper<Derived>();
- return ::boost::make_tuple(ret_handled,&this->m_states);
- }
- }
-
- // Getter that returns the current state of the FSM
- const std::vector<int>& current_state() const
- {
- return this->m_states;
- }
-
- // return the state whose id is passed or 0 if not found
- // caution if you need this, you probably need polymorphic states
- const BaseState* get_state_by_id(int id) const
- {
- typedef typename create_stt<Derived>::type stt;
- typedef typename generate_state_set<stt>::type state_list;
- BOOST_STATIC_CONSTANT(int, max_state = ( ::boost::mpl::size<state_list>::value));
- BOOST_ASSERT(id < (max_state));
- if (id < max_state)
- return (this->m_state_list[id]).get();
- // error
- return 0;
- }
- // true if the sm is used in another sm
- bool is_contained() const
- {
- return m_is_included;
- }
- // get a state
- // as a pointer
- template <class State>
- typename ::boost::enable_if<typename ::boost::is_pointer<State>::type,State >::type
- get_state(::boost::msm::dummy<0> = 0)
- {
- typedef typename create_stt<Derived>::type stt;
- return &(static_cast<typename boost::add_reference<typename ::boost::remove_pointer<State>::type>::type >
- (*(m_state_list[get_state_id<stt,typename ::boost::remove_pointer<State>::type>::type::value])));
- }
- // as a reference
- template <class State>
- typename ::boost::enable_if<typename ::boost::is_reference<State>::type,State >::type
- get_state(::boost::msm::dummy<1> = 0)
- {
- typedef typename create_stt<Derived>::type stt;
- return static_cast<State >
- (*(m_state_list[get_state_id<stt,typename ::boost::remove_reference<State>::type>::type::value]));
- }
-
- // checks if a flag is active using the BinaryOp as folding function
- template <class Flag,class BinaryOp>
- bool is_flag_active()
- {
- flag_handler* flags_entries = get_entries_for_flag<Flag>();
-
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- return std::accumulate(m_states.begin(),
- m_states.end(),false,
- ::boost::bind(typename BinaryOp::type(),
- ::boost::bind(::boost::apply<bool>(),
- ::boost::bind(::boost::msm::deref<flag_handler>(),
- ::boost::bind(::boost::msm::plus2<flag_handler*,int>(),
- flags_entries, _2)),
- ::boost::ref(*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()
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- return FlagHelper<Flag,(nr_regions::value>1)>::helper(*this,get_entries_for_flag<Flag>());
- }
- // visit the currently active states (if these are defined as visitable
- // by implementing accept)
- void visit_current_states()
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- for (int i=0; i<nr_regions::value;++i)
- {
- m_visitors.execute(m_states[i]);
- }
- }
-#define MSM_VISIT_STATE_SUB(z, n, unused) ARG ## n vis ## n
-#define MSM_VISIT_STATE_EXECUTE(z, n, unused) \
- template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
- void visit_current_states(BOOST_PP_ENUM(n, MSM_VISIT_STATE_SUB, ~ ) ) \
- { \
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions; \
- for (int i=0; i<nr_regions::value;++i) \
- { \
- m_visitors.execute(m_states[i],BOOST_PP_ENUM_PARAMS(n,vis)); \
- } \
- }
- BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISIT_STATE_EXECUTE, ~)
-#undef MSM_VISIT_STATE_EXECUTE
-#undef MSM_VISIT_STATE_SUB
-
- protected: // interface for the derived class
- typedef std::vector<pBaseState> pstate_base_list;
-
- // helper used to fill the initial states
- struct init_states
- {
- init_states(std::vector<int>& init):m_initial_states(init){}
-
- // History initializer function object, used with mpl::for_each
- template <class State>
- void operator()(::boost::msm::wrap<State> const&)
- {
- typedef typename create_stt<Derived>::type stt;
- m_initial_states.push_back(get_state_id<stt,State>::type::value);
- }
- std::vector<int>& m_initial_states;
- };
- // Construct with the default initial states
- state_machine()
- :state_base<BaseState>()
- ,CopyPolicy()
- ,m_states()
- ,m_events_queue()
- ,m_deferred_events_queue()
- ,m_history()
- ,m_state_list()
- ,m_event_processing(false)
- ,m_is_included(false)
- ,m_visitors()
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- m_states.reserve(nr_regions::value);
- // build a sequence of regions if needed
- typedef typename get_regions_as_sequence<typename Derived::initial_state>::type initial_states;
- // initialize our list of states with the ones defined in Derived::initial_state
- ::boost::mpl::for_each< initial_states, ::boost::msm::wrap<mpl::placeholders::_1> >
- (init_states(m_states));
- m_history.set_initial_states(m_states);
- // create states
- fill_states(this);
- }
- // template constructor. Needed only for sub-fsms having exit pseudo states.
- template <class ContainingSM>
- state_machine(ContainingSM* containing_sm)
- :state_base<BaseState>()
- ,CopyPolicy()
- ,m_states()
- ,m_events_queue()
- ,m_deferred_events_queue()
- ,m_history()
- ,m_state_list()
- ,m_event_processing(false)
- ,m_is_included(true)
- ,m_visitors()
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- m_states.reserve(nr_regions::value);
- // build a sequence of regions if needed
- typedef typename get_regions_as_sequence<typename Derived::initial_state>::type initial_states;
- // initialize our list of states with the ones defined in Derived::initial_state
- ::boost::mpl::for_each< initial_states, boost::msm::wrap<mpl::placeholders::_1> >
- (init_states(m_states));
- m_history.set_initial_states(m_states);
- // create states
- fill_states(containing_sm);
- }
- // assignment operator using the copy policy to decide if non_copyable, shallow or deep copying is necessary
- state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>& operator=
- (state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy> const& rhs)
- {
- if (this != &rhs)
- {
- CopyPolicy::operator=(rhs);
- do_copy<mpl::bool_<CopyPolicy::shallow_copy::value> >(rhs);
- }
- return *this;
- }
- state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>
- (state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy> const& rhs):CopyPolicy(rhs)
- {
- if (this != &rhs)
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- m_states.reserve(nr_regions::value);
- // build a sequence of regions if needed
- typedef typename get_regions_as_sequence<typename Derived::initial_state>::type initial_states;
- // initialize our list of states with the ones defined in Derived::initial_state
- fill_states(this);
- do_copy<mpl::bool_<CopyPolicy::shallow_copy::value> >(rhs);
- }
- }
-
- // the following 2 functions handle the terminate/interrupt states handling
- // if one of these states is found, the first one is used
- template <class StateType,class Event>
- typename ::boost::enable_if<typename has_fsm_blocking_states<StateType>::type,bool >::type
- is_event_handling_blocked_helper( ::boost::msm::dummy<0> = 0)
- {
- // if the state machine is terminated, do not handle any event
- if (is_flag_active< ::boost::msm::TerminateFlag>())
- return true;
- // if the state machine is interrupted, do not handle any event
- // unless the event is the end interrupt event
- if ( is_flag_active< ::boost::msm::InterruptedFlag>() &&
- !is_flag_active< ::boost::msm::EndInterruptFlag<Event> >())
- return true;
- return false;
- }
- // otherwise simple handling, no flag => continue
- template <class StateType,class Event>
- typename ::boost::disable_if<typename has_fsm_blocking_states<StateType>::type,bool >::type
- is_event_handling_blocked_helper( ::boost::msm::dummy<1> = 0)
- {
- // no terminate/interrupt states detected
- return false;
- }
- // the following functions handle pre/post-process handling of a message queue
- template <class StateType,class EventType>
- typename ::boost::enable_if<typename has_no_message_queue<StateType>::type,bool >::type
- do_pre_msg_queue_helper(EventType const& evt, ::boost::msm::dummy<0> = 0)
- {
- // no message queue needed
- return true;
- }
- template <class StateType,class EventType>
- typename ::boost::disable_if<typename has_no_message_queue<StateType>::type,bool >::type
- do_pre_msg_queue_helper(EventType const& evt, ::boost::msm::dummy<1> = 0)
- {
- execute_return (state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>::*pf) (EventType const& evt) =
- &state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>::process_event;
- // if we are already processing an event
- if (m_event_processing)
- {
- // event has to be put into the queue
- transition_fct f = ::boost::bind(pf,this,evt);
- m_events_queue.push(f);
- return false;
- }
- // event can be handled, processing
- m_event_processing = true;
- return true;
- }
- template <class StateType>
- typename ::boost::enable_if<typename has_no_message_queue<StateType>::type,void >::type
- do_post_msg_queue_helper( ::boost::msm::dummy<0> = 0)
- {
- // no message queue needed
- }
- template <class StateType>
- typename ::boost::disable_if<typename has_no_message_queue<StateType>::type,void >::type
- do_post_msg_queue_helper( ::boost::msm::dummy<1> = 0)
- {
- m_event_processing = false;
- process_message_queue();
- }
- // the following 2 functions handle the processing either with a try/catch protection or without
- template <class StateType,class EventType>
- typename ::boost::enable_if<typename has_no_exception_thrown<StateType>::type,bool >::type
- do_process_helper(EventType const& evt, ::boost::msm::dummy<0> = 0)
- {
- return this->do_process_event(evt);
- }
- template <class StateType,class EventType>
- typename ::boost::disable_if<typename has_no_exception_thrown<StateType>::type,bool >::type
- do_process_helper(EventType const& evt, ::boost::msm::dummy<1> = 0)
- {
- try
- {
- return this->do_process_event(evt);
- }
- catch (std::exception& e)
- {
- // give a chance to the concrete state machine to handle
- (static_cast<Derived*>(this))->exception_caught(e);
- }
- return false;
- }
- // handling of deferred events
- // if none is found in the SM, take the following empty main version
- template <class StateType, class Enable = void>
- struct handle_defer_helper
- {
- handle_defer_helper(deferred_events_queue_t& a_queue){}
- void do_pre_handle_deferred()
- {
- }
-
- void do_post_handle_deferred()
- {
- }
- };
- // otherwise the standard version handling the deferred events
- template <class StateType>
- struct handle_defer_helper
- <StateType, typename enable_if< typename ::boost::msm::has_fsm_delayed_events<StateType>::type >::type>
- {
- handle_defer_helper(deferred_events_queue_t& a_queue):events_queue(a_queue),next_deferred_event(){}
- void do_pre_handle_deferred()
- {
- if (!events_queue.empty())
- {
- next_deferred_event = events_queue.front();
- events_queue.pop();
- }
- }
-
- void do_post_handle_deferred()
- {
- if (next_deferred_event)
- {
- next_deferred_event();
- }
- }
-
- private:
- deferred_events_queue_t& events_queue;
- deferred_fct next_deferred_event;
- };
-
- // minimum event processing without exceptions, queues, etc.
- template<class Event>
- bool do_process_event(Event const& evt)
- {
- // extend the table with tables from composite states
- typedef typename extend_table<Derived>::type complete_table;
- // use this table as if it came directly from the user
- typedef dispatch_table<Derived,HistoryPolicy,BaseState,CopyPolicy,
- complete_table,Event> table;
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
-
- bool handled = false;
- // dispatch the event to every region
- for (int i=0; i<nr_regions::value;++i)
- {
- std::pair<int,HandledEnum> res =
- table::instance.entries[this->m_states[i]](
- *static_cast<Derived*>(this), this->m_states[i], &m_state_list[0],evt);
- this->m_states[i] = res.first;
- handled = (handled || res.second);
- }
- // if the event has not been handled and we have orthogonal zones, then
- // generate an error on every active state
- // for state machine states contained in other state machines, do not handle
- // but let the containing sm handle the error
- if (!handled && !is_contained())
- {
- for (int i=0; i<nr_regions::value;++i)
- {
- (static_cast<Derived*>(this))->no_transition(this->m_states[i],evt);
- }
- }
- return handled;
- }
-
- // default row arguments for the compilers which accept this
- template <class Event>
- bool no_guard(Event const&){return true;}
- template <class Event>
- void no_action(Event const&){}
-
- // Template used to form rows in the transition table
- template<
- typename T1
- , class Event
- , typename T2
- , void (Derived::*action)(Event const&)
-#if !defined(__GNUC__)
- = static_cast<void (Derived::*)(Event const&)>(&no_action<Event>)
-#endif
- , bool (Derived::*guard)(Event const&)
-#if !defined(__GNUC__)
- = static_cast<bool (Derived::*)(Event const&)>(&no_guard<Event>)
-#endif
- >
- struct row
- {
- // if the source has no automatic creation (i.e. is an exit pseudo state), then
- // current_state_type becomes the result of get_owner
- // meaning the containing SM from which the exit occurs
- typedef typename ::boost::mpl::eval_if<
- typename has_no_automatic_create<T1>::type,
- get_owner<T1,Derived>,
- ::boost::mpl::identity<T1> >::type current_state_type;
-
- // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
- // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
- // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
- typedef typename ::boost::mpl::eval_if<
- typename ::boost::mpl::is_sequence<T2>::type,
- get_fork_owner<T2,Derived>,
- ::boost::mpl::eval_if<
- typename has_no_automatic_create<T2>::type,
- get_owner<T2,Derived>,
- ::boost::mpl::identity<T2> >
- >::type next_state_type;
-
- typedef Event event;
-
- // if a guard condition is here, call it to check that the event is accepted
- static bool check_guard(Derived& fsm,Event const& evt)
- {
- if (!guard || (guard && (fsm.*guard)(evt)))
- return true;
- return false;
- }
- // Take the transition action and return the next state.
- static std::pair<int,HandledEnum> execute(Derived& fsm, int state, pBaseState* all_states, Event const& evt)
- {
- typedef typename create_stt<Derived>::type stt;
-
- BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
- BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
- BOOST_ASSERT(state == (current_state));
- // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
- if (!::boost::is_same<T1,current_state_type>::value &&
- !is_exit_state_active<T1,get_owner<T1,Derived> >(fsm))
- {
- return std::make_pair(current_state,HANDLED_FALSE);
- }
- if (!check_guard(fsm,evt))
- {
- // guard rejected the event, we stay in the current one
- return std::make_pair(current_state,HANDLED_GUARD_REJECT);
- }
-
- // the guard condition has already been checked
- execute_exit<current_state_type>(all_states[current_state].get(),evt);
- if (action)
- {
- // then call the action method
- (fsm.*action)(evt);
- }
- // and finally the entry method of the new current state
- convert_event_and_execute_entry<next_state_type,T2>(all_states[next_state].get(),evt);
- return std::make_pair(next_state,HANDLED_TRUE);
- }
- };
-
- // row having only a guard condition
- template<
- typename T1
- , class Event
- , typename T2
- , bool (Derived::*guard)(Event const&)
- >
- struct g_row
- {
- // if the source has no automatic creation (i.e. is an exit pseudo state), then
- // current_state_type becomes the result of get_owner
- // meaning the containing SM from which the exit occurs
- typedef typename ::boost::mpl::eval_if<
- typename has_no_automatic_create<T1>::type,
- get_owner<T1,Derived>,
- ::boost::mpl::identity<T1> >::type current_state_type;
-
- // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
- // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
- // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
- typedef typename ::boost::mpl::eval_if<
- typename ::boost::mpl::is_sequence<T2>::type,
- get_fork_owner<T2,Derived>,
- ::boost::mpl::eval_if<
- typename has_no_automatic_create<T2>::type,
- get_owner<T2,Derived>,
- ::boost::mpl::identity<T2> >
- >::type next_state_type;
-
- typedef Event event;
-
- // if a guard condition is defined, call it to check that the event is accepted
- static bool check_guard(Derived& fsm,Event const& evt)
- {
- if (!guard || (guard && (fsm.*guard)(evt)))
- return true;
- return false;
- }
- // Take the transition action and return the next state.
- static std::pair<int,HandledEnum> execute(Derived& fsm, int state, pBaseState* all_states, Event const& evt)
- {
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
- BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
- BOOST_ASSERT(state == (current_state));
- // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
- if (!::boost::is_same<T1,current_state_type>::value &&
- !is_exit_state_active<T1,get_owner<T1,Derived> >(fsm))
- {
- return std::make_pair(current_state,HANDLED_FALSE);
- }
- if (!check_guard(fsm,evt))
- {
- // guard rejected the event, we stay in the current one
- return std::make_pair(current_state,HANDLED_GUARD_REJECT);
- }
- // the guard condition has already been checked
- execute_exit<current_state_type>(all_states[current_state].get(),evt);
-
- // and finally the entry method of the new current state
- convert_event_and_execute_entry<next_state_type,T2>(all_states[next_state].get(),evt);
- return std::make_pair(next_state,HANDLED_TRUE);
- }
- };
-
- // row having only an action method
- template<
- typename T1
- , class Event
- , typename T2
- , void (Derived::*action)(Event const&)
- >
- struct a_row
- {
- // if the source has no automatic creation (i.e. is an exit pseudo state), then
- // current_state_type becomes the result of get_owner
- // meaning the containing SM from which the exit occurs
- typedef typename ::boost::mpl::eval_if<
- typename has_no_automatic_create<T1>::type,
- get_owner<T1,Derived>,
- ::boost::mpl::identity<T1> >::type current_state_type;
-
- // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
- // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
- // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
- typedef typename ::boost::mpl::eval_if<
- typename ::boost::mpl::is_sequence<T2>::type,
- get_fork_owner<T2,Derived>,
- ::boost::mpl::eval_if<
- typename has_no_automatic_create<T2>::type,
- get_owner<T2,Derived>,
- ::boost::mpl::identity<T2> >
- >::type next_state_type;
-
- typedef Event event;
-
- // Take the transition action and return the next state.
- static std::pair<int,HandledEnum> execute(Derived& fsm, int state, pBaseState* all_states, Event const& evt)
- {
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
- BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
- BOOST_ASSERT(state == (current_state));
-
- // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
- if (!::boost::is_same<T1,current_state_type>::value &&
- !is_exit_state_active<T1,get_owner<T1,Derived> >(fsm))
- {
- return std::make_pair(current_state,HANDLED_FALSE);
- }
- // no need to check the guard condition
- // first call the exit method of the current state
- execute_exit<current_state_type>(all_states[current_state].get(),evt);
- if (action)
- {
- // then call the action method
- (fsm.*action)(evt);
- }
- // and finally the entry method of the new current state
- convert_event_and_execute_entry<next_state_type,T2>(all_states[next_state].get(),evt);
- return std::make_pair(next_state,HANDLED_TRUE);
- }
- };
-
- // row having no guard condition or action, simply transitions
- template<
- typename T1
- , class Event
- , typename T2
- >
- struct _row
- {
- // if the source has no automatic creation (i.e. is an exit pseudo state), then
- // current_state_type becomes the result of get_owner
- // meaning the containing SM from which the exit occurs
- typedef typename ::boost::mpl::eval_if<
- typename has_no_automatic_create<T1>::type,
- get_owner<T1,Derived>,
- ::boost::mpl::identity<T1> >::type current_state_type;
-
- // if Target is a sequence, then we have a fork and expect a sequence of explicit_entry
- // else if Target is an explicit_entry, next_state_type becomes the result of get_owner
- // meaning the containing SM if the row is "outside" the containing SM or else the explicit_entry state itself
- typedef typename ::boost::mpl::eval_if<
- typename ::boost::mpl::is_sequence<T2>::type,
- get_fork_owner<T2,Derived>,
- ::boost::mpl::eval_if<
- typename has_no_automatic_create<T2>::type,
- get_owner<T2,Derived>,
- ::boost::mpl::identity<T2> >
- >::type next_state_type;
-
- typedef Event event;
-
- // Take the transition action and return the next state.
- static std::pair<int,HandledEnum> execute(Derived& fsm, int state, pBaseState* all_states, Event const& evt)
- {
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, current_state = (get_state_id<stt,current_state_type>::type::value));
- BOOST_STATIC_CONSTANT(int, next_state = (get_state_id<stt,next_state_type>::type::value));
- BOOST_ASSERT(state == (current_state));
-
- // if T1 is an exit pseudo state, then take the transition only if the pseudo exit state is active
- if (!::boost::is_same<T1,current_state_type>::value &&
- !is_exit_state_active<T1,get_owner<T1,Derived> >(fsm))
- {
- return std::make_pair(current_state,HANDLED_FALSE);
- }
- // first call the exit method of the current state
- execute_exit<current_state_type>(all_states[current_state].get(),evt);
-
- // and finally the entry method of the new current state
- convert_event_and_execute_entry<next_state_type,T2>(all_states[next_state].get(),evt);
- return std::make_pair(next_state,HANDLED_TRUE);
- }
- };
-private:
-
- // helper used to call the init states at the start of the state machine
- template <class Event>
- struct call_init
- {
- call_init(pBaseState* states,Event const& an_event):all_states(states),evt(an_event){}
- template <class State>
- void operator()(boost::msm::wrap<State> const&)
- {
- typedef typename create_stt<Derived>::type stt;
- execute_entry<State>(all_states[get_state_id<stt,State>::type::value].get(),evt);
- }
- private:
- pBaseState* all_states;
- Event const& evt;
- };
- // helper for flag handling. Uses OR by default on orthogonal zones.
- template <class Flag,bool orthogonalStates>
- struct FlagHelper
- {
- static bool helper(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>& sm,flag_handler* )
- {
- // by default we use OR to accumulate the flags
- return sm.is_flag_active<Flag,Flag_OR>();
- }
- };
- template <class Flag>
- struct FlagHelper<Flag,false>
- {
- static bool helper(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>& sm,flag_handler* flags_entries)
- {
- // just one active state, so we can call operator[] with 0
- return flags_entries[sm.current_state()[0]](sm);
- }
- };
- // handling of flag
- // defines a true and false functions plus a forwarding one for composite states
- template <class StateType,class Flag>
- struct FlagHandler
- {
- static bool flag_true(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>& )
- {
- return true;
- }
- static bool flag_false(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>& )
- {
- return false;
- }
- static bool forward(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>& fsm)
- {
- typedef typename create_stt<Derived>::type stt;
- return (static_cast<StateType& >
- (*(fsm.m_state_list[get_state_id<stt,StateType>::type::value]))).is_flag_active<Flag>();
- }
- };
- template <class Flag>
- struct init_flags
- {
- private:
- // helper function, helps hiding the forward function for non-state machines states.
- template <class T>
- typename ::boost::enable_if<
- typename ::boost::mpl::and_<
- typename is_composite_state<T>::type,
- typename ::boost::mpl::not_<
- typename has_non_forwarding_flag<Flag>::type>::type >::type
- ,void >::type
- helper (flag_handler* an_entry,int offset,boost::msm::dummy<0> = 0 )
- {
- // composite => forward
- an_entry[offset] = &FlagHandler<T,Flag>::forward;
- }
- template <class T>
- typename ::boost::disable_if<
- typename ::boost::mpl::and_<
- typename is_composite_state<T>::type,
- typename ::boost::mpl::not_<
- typename has_non_forwarding_flag<Flag>::type>::type >::type
- ,void >::type
- helper (flag_handler* an_entry,int offset,boost::msm::dummy<1> = 0 )
- {
- // default no flag
- an_entry[offset] = &FlagHandler<T,Flag>::flag_false;
- }
- // attributes
- flag_handler* entries;
-
- public:
- init_flags(flag_handler* entries_)
- : entries(entries_)
- {}
-
- // Flags initializer function object, used with mpl::for_each
- template <class StateType>
- void operator()( ::boost::msm::wrap<StateType> const& )
- {
- typedef typename StateType::flag_list flags;
- typedef typename ::boost::mpl::contains<flags,Flag >::type found;
- typedef typename is_composite_state<StateType>::type composite;
- typedef typename create_stt<Derived>::type stt;
-
- BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,StateType>::type::value));
- if (found::type::value)
- {
- // the type defined the flag => true
- entries[state_id] = &FlagHandler<StateType,Flag>::flag_true;
- }
- else
- {
- // false or forward
- helper<StateType>(entries,state_id);
- }
- }
- };
- // maintains for every flag a static array containing the flag value for every state
- template <class Flag>
- flag_handler* get_entries_for_flag()
- {
- typedef typename create_stt<Derived>::type Stt;
- typedef typename generate_state_set<Stt>::type state_list;
- BOOST_STATIC_CONSTANT(int, max_state = (mpl::size<state_list>::value));
-
- static flag_handler flags_entries[max_state];
- // build a state list
- ::boost::mpl::for_each<state_list, boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (init_flags<Flag>(flags_entries));
- return flags_entries;
- }
-
- // helper used to create a state using the correct constructor
- template <class State, class Enable=void>
- struct create_state_helper
- {
- static void set_sm(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* ,pBaseState )
- {
- // state doesn't need its sm
- }
- };
- // create a state requiring a pointer to the state machine
- template <class State>
- struct create_state_helper<State,typename boost::enable_if<typename State::needs_sm >::type>
- {
- static void set_sm(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* sm,pBaseState new_state)
- {
- // create and set the fsm
- static_cast<State*>(new_state.get())->set_sm_ptr(static_cast<Derived*>(sm));
- }
- };
- // A function object for use with mpl::for_each that stuffs
- // states into the state list.
- template<class ContainingSM>
- struct add_state
- {
- add_state(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* self_,ContainingSM* sm)
- : self(self_),containing_sm(sm){}
-
- // State is a sub fsm with exit pseudo states and gets a pointer to this fsm, so it can build a callback
- template <class StateType>
- typename ::boost::enable_if<
- typename has_exit_pseudo_states<StateType>::type,pBaseState >::type
- new_state_helper(boost::msm::dummy<0> = 0) const
- {
- return pBaseState(new StateType(containing_sm));
- }
- // State is a sub fsm without exit pseudo states and does not get a callback to this fsm
- // or state is a normal state and needs nothing except creation
- template <class StateType>
- typename ::boost::enable_if<
- typename boost::mpl::and_<typename boost::mpl::not_
- <typename has_exit_pseudo_states<StateType>::type>::type,
- typename boost::mpl::not_
- <typename is_pseudo_exit<StateType>::type>::type
- >::type,pBaseState>::type
- new_state_helper( ::boost::msm::dummy<1> = 0) const
- {
- return pBaseState(new StateType);
- }
- // state is exit pseudo state and gets callback to target fsm
- template <class StateType>
- typename ::boost::enable_if<typename is_pseudo_exit<StateType>::type,pBaseState >::type
- new_state_helper( ::boost::msm::dummy<2> = 0) const
- {
- pBaseState to_return (new StateType());
- execute_return (ContainingSM::*pf) (typename StateType::event const& evt)=
- &ContainingSM::process_event;
- ::boost::function<execute_return (typename StateType::event const&)> fct =
- ::boost::bind(pf,containing_sm,_1);
- static_cast<StateType*>(to_return.get())->set_forward_fct(fct);
- return to_return;
- }
- // for every defined state in the sm
- template <class State>
- void operator()( ::boost::msm::wrap<State> const&) const
- {
- //create a new state with the defined id and type
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,State>::value));
-
- pBaseState new_state (this->new_state_helper<State>());
- self->m_state_list[state_id]= new_state;
- create_state_helper<State>::set_sm(self,new_state);
- // create a visitor callback
- visitor_helper<State>(state_id,new_state.get());
- }
- private:
- // support possible use of a visitor if accept_sig is defined
- template <class StateType>
- typename ::boost::enable_if<typename has_accept_sig<StateType>::type,void >::type
- visitor_helper(int id,BaseState* astate,::boost::msm::dummy<0> = 0) const
- {
- visitor_args<StateType,StateType::accept_sig::args_number>::helper(self,id,astate);
- }
- template <class StateType>
- typename ::boost::disable_if<typename has_accept_sig<StateType>::type,void >::type
- visitor_helper(int id,BaseState* astate,::boost::msm::dummy<1> = 0) const
- {
- // nothing to do
- }
- // main unspecialized helper class
- template <class StateType,int ARGS>
- struct visitor_args;
-#define MSM_VISITOR_ARGS_SUB(z, n, unused) BOOST_PP_CAT(_,BOOST_PP_ADD(n,1))
-#define MSM_VISITOR_ARGS_EXECUTE(z, n, unused) \
- template <class StateType> \
- struct visitor_args<StateType,n> \
- { \
- static void helper (state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* sm, \
- int id,BaseState* astate) \
- { \
- sm->m_visitors.insert(id, boost::bind(&StateType::accept, \
- static_cast<StateType*>(astate) BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM(n, MSM_VISITOR_ARGS_SUB, ~) )); \
- } \
- };
-BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXECUTE, ~)
-#undef MSM_VISITOR_ARGS_EXECUTE
-#undef MSM_VISITOR_ARGS_SUB
-
- state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* self;
- ContainingSM* containing_sm;
- };
-
- // helper used to copy every state if needed
- struct copy_helper
- {
- copy_helper(pstate_base_list& to_fill,const pstate_base_list& rhs,
- state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* sm):
- m_tofill_states(to_fill),m_rhs(rhs),m_sm(sm){}
- template <class StateType>
- void operator()( ::boost::msm::wrap<StateType> const& )
- {
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, state_id = (get_state_id<stt,StateType>::type::value));
- if (m_rhs.empty())
- return;
- pBaseState copiedState
- (new StateType (*static_cast<StateType*> (m_rhs[state_id].get())));
- m_tofill_states[state_id] = copiedState;
- // possibly also set the visitor
- visitor_helper<StateType>(state_id,copiedState.get());
-
- // and for states that keep a pointer to the fsm, reset the pointer
- create_state_helper<StateType>::set_sm(m_sm,copiedState);
- }
- template <class StateType>
- typename ::boost::enable_if<typename has_accept_sig<StateType>::type,void >::type
- visitor_helper(int id,BaseState* astate) const
- {
- m_sm->m_visitors.insert(id, ::boost::bind(&StateType::accept,
- static_cast<StateType*>(astate),_1));
- }
- template <class StateType>
- typename ::boost::disable_if<typename has_accept_sig<StateType>::type,void >::type
- visitor_helper(int id,BaseState* astate) const
- {
- // nothing to do
- }
-
- pstate_base_list& m_tofill_states;
- const pstate_base_list& m_rhs;
- state_machine<Derived,HistoryPolicy,
- BaseState,CopyPolicy>* m_sm;
- };
-
- // copy functions for shallow or deep copy (no need of a 3rd version for NoCopy as noncopyable handles it)
- template <class IsShallowCopy>
- typename ::boost::disable_if<typename IsShallowCopy::type,void >::type
- do_copy (state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy> const& rhs,
- ::boost::msm::dummy<0> = 0)
- {
- // deep copy simply assigns the data
- m_states = rhs.m_states;
- m_events_queue = rhs.m_events_queue;
- m_deferred_events_queue = rhs.m_deferred_events_queue;
- m_history = rhs.m_history;
- m_event_processing = rhs.m_event_processing;
- m_is_included = rhs.m_is_included;
- // except for the states themselves, which get duplicated
- typedef typename create_stt<Derived>::type Stt;
-
- typedef typename generate_state_set<Stt>::type state_list;
- ::boost::mpl::for_each<state_list, ::boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (copy_helper(m_state_list,rhs.m_state_list,this));
- }
- template <class IsShallowCopy>
- typename ::boost::enable_if<typename IsShallowCopy::type,void >::type
- do_copy (state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy> const& rhs,
- ::boost::msm::dummy<1> = 0)
- {
- // shallow copy simply assigns the data
- m_states = rhs.m_states;
- m_events_queue = rhs.m_events_queue;
- m_deferred_events_queue = rhs.m_deferred_events_queue;
- m_history = rhs.m_history;
- m_state_list = rhs.m_state_list;
- m_event_processing = rhs.m_event_processing;
- m_is_included = rhs.m_is_included;
- m_visitors = rhs.m_visitors;
- }
-
- // helper used to call the correct entry/exit method
- // unfortunately in O(number of states in the sub-sm) but should be better than a virtual call
- template<class Event,bool is_entry>
- struct entry_exit_helper
- {
- entry_exit_helper(int id,Event const& e,pBaseState* states):state_id(id),evt(e),all_states(states){}
- // helper for entry actions
- template <class IsEntry,class State>
- typename ::boost::enable_if<typename IsEntry::type,void >::type
- helper( ::boost::msm::dummy<0> = 0)
- {
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, id = (get_state_id<stt,State>::value));
- if (id == state_id)
- {
- execute_entry<State>(all_states[id].get(),evt);
- }
- }
- // helper for exit actions
- template <class IsEntry,class State>
- typename boost::disable_if<typename IsEntry::type,void >::type
- helper( ::boost::msm::dummy<1> = 0)
- {
- typedef typename create_stt<Derived>::type stt;
- BOOST_STATIC_CONSTANT(int, id = (get_state_id<stt,State>::value));
- if (id == state_id)
- {
- execute_exit<State>(all_states[id].get(),evt);
- }
- }
- // iterates through all states to find the one to be activated
- template <class State>
- void operator()( ::boost::msm::wrap<State> const&)
- {
- entry_exit_helper<Event,is_entry>::template helper< ::boost::mpl::bool_<is_entry>,State >();
- }
- private:
- int state_id;
- Event const& evt;
- pBaseState* all_states;
- };
- // start for states machines which are themselves embedded in other state machines (composites)
- template <class Event>
- void start(Event const& incomingEvent)
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- typedef typename create_stt<Derived>::type stt;
- typedef typename generate_state_set<stt>::type state_list;
- for (int i=0; i<nr_regions::value;++i)
- {
- //forward the event for handling by sub state machines
- ::boost::mpl::for_each<state_list, ::boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (entry_exit_helper<Event,true>(m_states[i],incomingEvent,&m_state_list[0]));
- }
- }
-
- // helper used to set the correct state as active state upon entry into a fsm
- struct direct_event_start_helper
- {
- direct_event_start_helper(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* self_):self(self_){}
- // this variant is for the standard case, entry due to activation of the containing FSM
- template <class EventType>
- typename ::boost::disable_if<typename has_direct_entry<EventType>::type,void>::type
- operator()(EventType const& evt, ::boost::msm::dummy<0> = 0)
- {
- (static_cast<Derived*>(self))->on_entry(evt);
- self->start(evt);
- }
-
- // this variant is for the direct entry case (just one entry, not a sequence of entries)
- template <class EventType>
- typename ::boost::enable_if<
- typename ::boost::mpl::and_<
- typename ::boost::mpl::not_< typename is_pseudo_entry<
- typename EventType::active_state>::type >::type,
- typename ::boost::mpl::and_<typename has_direct_entry<EventType>::type,
- typename ::boost::mpl::not_<typename ::boost::mpl::is_sequence
- <typename EventType::active_state>::type >::type
- >::type>::type,void
- >::type
- operator()(EventType const& evt, ::boost::msm::dummy<1> = 0)
- {
- (static_cast<Derived*>(self))->on_entry(evt);
- typedef typename create_stt<Derived>::type stt;
- int state_id = get_state_id<stt,typename EventType::active_state>::value;
- BOOST_STATIC_ASSERT(EventType::active_state::zone_index >= 0);
- BOOST_STATIC_ASSERT(EventType::active_state::zone_index <=
- get_number_of_regions<typename Derived::initial_state>::type::value);
- // just set the correct zone, the others will be default/history initialized
- self->m_states[EventType::active_state::zone_index] = state_id;
- self->start(evt.m_event);
- }
-
- // this variant is for the fork entry case (a sequence on entries)
- template <class EventType>
- typename ::boost::enable_if<
- typename ::boost::mpl::and_<
- typename ::boost::mpl::not_<
- typename is_pseudo_entry<typename EventType::active_state>::type >::type,
- typename ::boost::mpl::and_<typename has_direct_entry<EventType>::type,
- typename ::boost::mpl::is_sequence<
- typename EventType::active_state>::type
- >::type>::type,void
- >::type
- operator()(EventType const& evt, ::boost::msm::dummy<2> = 0)
- {
- (static_cast<Derived*>(self))->on_entry(evt);
- ::boost::mpl::for_each<typename EventType::active_state,
- ::boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (fork_helper<EventType>(self,evt));
- // set the correct zones, the others (if any) will be default/history initialized
- self->start(evt.m_event);
- }
-
- // this variant is for the pseudo state entry case
- template <class EventType>
- typename ::boost::enable_if<
- typename is_pseudo_entry<typename EventType::active_state >::type,void
- >::type
- operator()(EventType const& evt, ::boost::msm::dummy<3> = 0)
- {
- // entry on the FSM
- (static_cast<Derived*>(self))->on_entry(evt);
- typedef typename create_stt<Derived>::type stt;
- int state_id = get_state_id<stt,typename EventType::active_state>::value;
- // given region starts with the entry pseudo state as active state
- self->m_states[EventType::active_state::zone_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
- self->process_event(evt.m_event);
- }
- private:
- // helper for the fork case, does almost like the direct entry
- state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* self;
- template <class EventType>
- struct fork_helper
- {
- fork_helper(state_machine<Derived,HistoryPolicy,BaseState,CopyPolicy>* self_,EventType const& evt_):
- helper_self(self_),helper_evt(evt_){}
- template <class StateType>
- void operator()( ::boost::msm::wrap<StateType> const& )
- {
- typedef typename create_stt<Derived>::type stt;
- int state_id = get_state_id<stt,StateType>::value;
- BOOST_STATIC_ASSERT(StateType::zone_index >= 0);
- BOOST_STATIC_ASSERT(StateType::zone_index <=
- get_number_of_regions<typename Derived::initial_state>::type::value);
- helper_self->m_states[StateType::zone_index] = state_id;
- }
- private:
- state_machine<Derived,HistoryPolicy,
- BaseState,CopyPolicy>* helper_self;
- EventType const& helper_evt;
- };
- };
-
- // entry/exit for states machines which are themselves embedded in other state machines (composites)
- template <class Event>
- void entry(Event const& incomingEvent)
- {
- // by default we activate the history/init states, can be overwritten by direct_event_start_helper
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- for (int i=0; i<nr_regions::value;++i)
- {
- this->m_states[i] = m_history.history_entry(incomingEvent)[i];
- }
- // block immediate handling of events
- m_event_processing = true;
- // if the event is generating a direct entry/fork, set the current state(s) to the direct state(s)
- direct_event_start_helper(this)(incomingEvent);
- // handle messages which were generated and blocked in the init calls
- m_event_processing = false;
- process_message_queue();
- }
- template <class Event>
- void exit(Event const& incomingEvent)
- {
- typedef typename get_number_of_regions<typename Derived::initial_state>::type nr_regions;
- typedef typename create_stt<Derived>::type stt;
- typedef typename generate_state_set<stt>::type state_list;
- for (int i=0; i<nr_regions::value;++i)
- {
- // first recursively exit the sub machines
- // forward the event for handling by sub state machines
- ::boost::mpl::for_each<state_list, ::boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (entry_exit_helper<Event,false>(m_states[i],incomingEvent,&m_state_list[0]));
- }
- // then call our own exit
- (static_cast<Derived*>(this))->on_exit(incomingEvent);
- // give the history a chance to handle this (or not).
- m_history.history_exit(this->m_states);
- }
-
- // no transition for event.
- template <class Event>
- static std::pair<int,HandledEnum> call_no_transition(Derived& , int state, pBaseState* ,Event const& )
- {
- return std::make_pair(state,HANDLED_FALSE);
- }
- // called for deferred events. Address set in the dispatch_table at init
- template <class Event>
- static std::pair<int,HandledEnum> defer_transition(Derived& fsm, int state, pBaseState*,Event const& e)
- {
- execute_return (Derived::*pf) (Event const& evt)= &Derived::process_event;
- Event temp (e);
- ::boost::function<execute_return () > f= ::boost::bind(pf,&fsm,temp);
- fsm.post_deferred_event(f);
- return std::make_pair(state,HANDLED_TRUE);
- }
-
- // Default no-transition handler. Can be replaced in the Derived SM class.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- BOOST_ASSERT(false);
- return state;
- }
- // default exception handler. Can be replaced in the Derived SM class.
- void exception_caught (std::exception& )
- {
- BOOST_ASSERT(false);
- }
- // puts a deferred event in the queue
- void post_deferred_event(deferred_fct& deferred)
- {
- m_deferred_events_queue.push(deferred);
- }
- // removes one event from the message queue and processes it
- void process_message_queue()
- {
- if (!m_events_queue.empty())
- {
- transition_fct to_call = m_events_queue.front();
- m_events_queue.pop();
- to_call();
- }
- }
-
- // calls the entry/exit or on_entry/on_exit depending on the state type
- // (avoids calling virtually)
- // variant for FSMs
- template <class StateType,class EventType>
- static
- typename boost::enable_if<typename is_composite_state<StateType>::type,void >::type
- execute_entry(BaseState* astate,EventType const& evt,boost::msm::dummy<0> = 0)
- {
- // calls on_entry on the fsm then handles direct entries, fork, entry pseudo state
- (static_cast<StateType*>(astate))->entry(evt);
- }
- // variant for states
- template <class StateType,class EventType>
- static
- typename ::boost::disable_if<
- typename ::boost::mpl::or_<typename is_composite_state<StateType>::type,
- typename is_pseudo_exit<StateType>::type >::type,void >::type
- execute_entry(BaseState* astate,EventType const& evt, ::boost::msm::dummy<1> = 0)
- {
- // simple call to on_entry
- (static_cast<StateType*>(astate))->on_entry(evt);
- }
- // variant for exit pseudo states
- template <class StateType,class EventType>
- static
- typename ::boost::enable_if<typename is_pseudo_exit<StateType>::type,void >::type
- execute_entry(BaseState* astate,EventType const& evt, ::boost::msm::dummy<2> = 0)
- {
- // calls on_entry on the state then forward the event to the transition which should be defined inside the
- // contained fsm
- (static_cast<StateType*>(astate))->on_entry(evt);
- (static_cast<StateType*>(astate))->forward_event(evt);
- }
- template <class StateType,class EventType>
- static
- typename ::boost::enable_if<typename is_composite_state<StateType>::type,void >::type
- execute_exit(BaseState* astate,EventType const& evt, ::boost::msm::dummy<0> = 0)
- {
- (static_cast<StateType*>(astate))->exit(evt);
- }
- template <class StateType,class EventType>
- static
- typename ::boost::disable_if<typename is_composite_state<StateType>::type,void >::type
- execute_exit(BaseState* astate,EventType const& evt, ::boost::msm::dummy<1> = 0)
- {
- // simple call to on_exit
- (static_cast<StateType*>(astate))->on_exit(evt);
- }
-
- // helper allowing special handling of direct entries / fork
- template <class StateType,class TargetType,class EventType>
- static
- typename ::boost::disable_if<
- typename ::boost::mpl::or_<typename has_explicit_entry_state<TargetType>::type,
- ::boost::mpl::is_sequence<TargetType> >::type,void>::type
- convert_event_and_execute_entry(BaseState* astate,EventType const& evt, ::boost::msm::dummy<1> = 0)
- {
- // if the target is a normal state, do the standard entry handling
- execute_entry<StateType>(astate,evt);
- }
- template <class StateType,class TargetType,class EventType>
- static
- typename ::boost::enable_if<
- typename ::boost::mpl::or_<typename has_explicit_entry_state<TargetType>::type,
- ::boost::mpl::is_sequence<TargetType> >::type,void >::type
- convert_event_and_execute_entry(BaseState* astate,EventType const& evt, ::boost::msm::dummy<0> = 0)
- {
- // for the direct entry, pack the event in a wrapper so that we handle it differently during fsm entry
- execute_entry<StateType>(astate,direct_entry_event<TargetType,EventType>(evt));
- }
-
- // creates all the states
- template <class ContainingSM>
- void fill_states(ContainingSM* containing_sm=0)
- {
- typedef typename create_stt<Derived>::type stt;
- typedef typename generate_state_set<stt>::type state_list;
- BOOST_STATIC_CONSTANT(int, max_state = (mpl::size<state_list>::value));
- // allocate the place without reallocation
- m_state_list.resize(max_state);
- m_visitors.fill_visitors(max_state);
- ::boost::mpl::for_each<state_list, ::boost::msm::wrap< ::boost::mpl::placeholders::_1> >
- (add_state<ContainingSM>(this,containing_sm));
- }
-
- // Template used to form forwarding rows in the transition table for every row of a composite SM
- template<
- typename T1
- , class Event
- >
- struct frow
- {
- typedef T1 current_state_type;
- typedef T1 next_state_type;
- typedef Event event;
-
- // Take the transition action and return the next state.
- static std::pair<int,HandledEnum> execute(Derived& fsm, int state, pBaseState* ,Event const& evt)
- {
- execute_return res =
- (static_cast<T1& > (*(fsm.m_state_list[state]))).process_event(evt);
- typedef typename create_stt<Derived>::type stt;
- return std::make_pair(get_state_id<stt,T1>::type::value,res.get<0>());
- }
- };
-public:
- template <class Composite,class Event>
- struct make_frow
- {
- typedef frow<Composite,Event> type;
- };
- // gets the transition table from a composite and make from it a forwarding row
- template <class Composite>
- struct get_transition_table_as_frow
- {
- // first get the table of a composite
- typedef typename recursive_get_transition_table<Composite>::type original_table;
- // and add for every event a forwarding row
- typedef typename generate_event_set<original_table>::type all_events;
- typedef typename ::boost::mpl::fold<
- all_events, ::boost::mpl::vector<>,
- ::boost::mpl::push_back< ::boost::mpl::placeholders::_1,
- frow<Composite, ::boost::mpl::placeholders::_2> > >::type type;
- };
-
- // extends the transition table with rows from composite states
- template <class Composite>
- struct extend_table
- {
- // add the init states
- typedef typename create_stt<Composite>::type stt;
- // get the state set
- typedef typename generate_state_set<stt>::type states;
- // for every state, add its transition table (if any)
- // transformed as frow
- typedef typename ::boost::mpl::fold<states,stt,
- ::boost::mpl::insert_range< ::boost::mpl::placeholders::_1,
- ::boost::mpl::end< ::boost::mpl::placeholders::_1>,
- get_transition_table_as_frow< ::boost::mpl::placeholders::_2> >
- >::type type;
- };
-private:
- template <class Fsm, class History,class UserBaseState, class Copy,class Stt, class Event>
- friend struct dispatch_table;
- template <typename T1,class Event> friend struct frow;
-
- // data members
- std::vector<int> m_states;
- events_queue_t m_events_queue;
- deferred_events_queue_t m_deferred_events_queue;
- HistoryPolicy m_history;
- pstate_base_list m_state_list;
- bool m_event_processing;
- bool m_is_included;
- visitor_fct_helper<BaseState>
- m_visitors;
-};
-
-} } // boost::msm
-#endif //BOOST_MSM_STATEMACHINE_H
-

Deleted: sandbox/msm/boost/msm/states.hpp
==============================================================================
--- sandbox/msm/boost/msm/states.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,241 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_STATES_H
-#define BOOST_MSM_STATES_H
-
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/function.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/msm/common_types.hpp>
-
-
-// traits used for entry/exit states
-BOOST_MPL_HAS_XXX_TRAIT_DEF(no_automatic_create)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(direct_entry)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(explicit_entry_state)
-BOOST_MPL_HAS_XXX_TRAIT_DEF(non_forwarding_flag)
-
-namespace boost { namespace msm
-{
-// default base: non-polymorphic, not visitable
-struct default_base_state
-{
- ~default_base_state(){}
-};
-// default polymorphic base state. Derive all states from it to get polymorphic behavior
-struct polymorphic_state
-{
- virtual ~polymorphic_state() {}
-};
-
-// the interface for all states. Defines entry and exit functions. Overwrite to implement for any state needing it.
-template<class USERBASE>
-struct state_base : USERBASE
-{
- typedef USERBASE user_state_base;
-
- // empty implementation for the states not wishing to define an entry condition
- // will not be called polymorphic way
- template <class Event>
- void on_entry(Event const& ){}
- template <class Event>
- void on_exit(Event const& ){}
-};
-struct no_sm_ptr
-{
- // tags
- typedef ::boost::mpl::bool_<false> needs_sm;
-};
-struct sm_ptr
-{
- // tags
- typedef ::boost::mpl::bool_<true> needs_sm;
-};
-// kept for backward compatibility
-struct NoSMPtr
-{
- // tags
- typedef ::boost::mpl::bool_<false> needs_sm;
-};
-struct SMPtr
-{
- // tags
- typedef ::boost::mpl::bool_<true> needs_sm;
-};
-
-// provides the typedefs and interface. Concrete states derive from it.
-// template argument: pointer-to-fsm policy
-template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
-struct state : public state_base<BASE>, SMPtrPolicy
-{
- // tags
- // default: no flag
- typedef ::boost::mpl::vector<> flag_list;
- //default: no deferred events
- typedef ::boost::mpl::vector<> deferred_events;
-};
-
-// flags used internally to handle terminate / interrupt states
-struct TerminateFlag
-{
- typedef int non_forwarding_flag;
- typedef int event_blocking_flag;
-};
-struct InterruptedFlag
-{
- typedef int non_forwarding_flag;
- typedef int event_blocking_flag;
-};
-template <class EndEvent>
-struct EndInterruptFlag
-{
- typedef int non_forwarding_flag;
-};
-
-// terminate state simply defines the TerminateFlag flag
-// template argument: pointer-to-fsm policy
-template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
-struct terminate_state : public state_base<BASE>, SMPtrPolicy
-{
- // tags
- typedef ::boost::mpl::vector<boost::msm::TerminateFlag> flag_list;
- //default: no deferred events
- typedef ::boost::mpl::vector<> deferred_events;
-};
-
-// terminate state simply defines the InterruptedFlag and EndInterruptFlag<EndInterruptEvent> flags
-// template argument: event which ends the interrupt
-// template argument: pointer-to-fsm policy
-template <class EndInterruptEvent,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
-struct interrupt_state : public state_base<BASE>, SMPtrPolicy
-{
- // tags
- typedef ::boost::mpl::vector<boost::msm::InterruptedFlag,
- boost::msm::EndInterruptFlag<EndInterruptEvent> >
- flag_list;
- //default: no deferred events
- typedef ::boost::mpl::vector<> deferred_events;
-};
-
-// not a state but a bunch of extra typedefs to handle direct entry into a composite state. To be derived from
-// template argument: containing composite
-// template argument: zone index of this state
-template <class Composite,int ZoneIndex=-1>
-struct explicit_entry
-{
- typedef int no_automatic_create;
- typedef int explicit_entry_state;
- typedef Composite owner;
- enum {zone_index=ZoneIndex};
- template <class ToTest>
- // metafunction helping determine who needs to create this state
- struct is_owning_composite
- {
- typedef typename ::boost::is_same<Composite,ToTest>::type type;
- };
-};
-
-// to be derived from. Makes a type an entry (pseudo) state. Actually an almost full-fledged state
-// template argument: containing composite
-// template argument: zone index of this state
-// template argument: pointer-to-fsm policy
-template<class Composite,int ZoneIndex=-1,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
-struct entry_pseudo_state
- : public state_base<BASE>, explicit_entry<Composite,ZoneIndex> ,SMPtrPolicy
-{
- // tags
- typedef int pseudo_entry;
- // default: no flag
- typedef ::boost::mpl::vector<> flag_list;
- //default: no deferred events
- typedef ::boost::mpl::vector<> deferred_events;
-};
-
-// to be derived from. Makes a state an exit (pseudo) state. Actually an almost full-fledged state
-// template argument: containing composite
-// template argument: event to forward
-// template argument: pointer-to-fsm policy
-template<class Composite,class Event,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
-struct exit_pseudo_state : public state_base<BASE> , SMPtrPolicy
-{
- // tags
- typedef int pseudo_exit;
- typedef int no_automatic_create;
- typedef Composite owner;
- typedef Event event;
-
- // metafunction helping determine who needs to create this state
- template <class ToTest>
- struct is_owning_composite
- {
- typedef typename boost::is_same<Composite,ToTest>::type type;
- };
- // default: no flag
- typedef ::boost::mpl::vector< > flag_list;
- //default: no deferred events
- typedef ::boost::mpl::vector<> deferred_events;
-
- // forward event to the higher-level FSM
- template <class ForwardEvent>
- void forward_event(ForwardEvent const& incomingEvent)
- {
- // use helper to forward or not
- helper(incomingEvent);
- }
- void set_forward_fct(::boost::function<execute_return (Event const&)> fct)
- {
- m_forward = fct;
- }
- exit_pseudo_state():m_forward(){}
- // by assignments, we keep our forwarding functor unchanged as our containing SM did not change
- exit_pseudo_state(exit_pseudo_state<Composite,Event,BASE,SMPtrPolicy>& rhs){}
- exit_pseudo_state<Composite,Event,BASE,SMPtrPolicy>& operator= (const exit_pseudo_state<Composite,Event,BASE,SMPtrPolicy>& )
- {
- return *this;
- }
-private:
- ::boost::function<execute_return (Event const&)> m_forward;
-
- // helper used to forward an event if it is the one we are supposed to
- template <class ForwardEvent>
- typename ::boost::enable_if<typename ::boost::is_convertible<ForwardEvent,Event>::type,void >::type
- helper(ForwardEvent const& incomingEvent,boost::msm::dummy<0> = 0)
- {
- // call if handler set, if not, this state is simply a terminate state
- if (m_forward)
- m_forward(incomingEvent);
- }
- template <class ForwardEvent>
- typename ::boost::disable_if<typename ::boost::is_convertible<ForwardEvent,Event>::type,void >::type
- helper(ForwardEvent const& incomingEvent,boost::msm::dummy<1> = 0)
- {
- // Not our event, ignore
- }
-};
-
-// event used internally for wrapping a direct entry
-template <class StateType,class Event>
-struct direct_entry_event
-{
- typedef int direct_entry;
- typedef StateType active_state;
-
- direct_entry_event(Event const& evt):m_event(evt){}
- Event const& m_event;
-};
-
-}}
-
-#endif //BOOST_MSM_STATES_H
-

Deleted: sandbox/msm/boost/msm/tools.hpp
==============================================================================
--- sandbox/msm/boost/msm/tools.hpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,67 +0,0 @@
-// Copyright 2008 Christophe Henry
-// henry UNDERSCORE christophe AT hotmail DOT com
-// This is an extended version of the state machine available in the boost::mpl library
-// Distributed under the same license as the original.
-// Copyright for the original version:
-// Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_MSM_TOOLS_H
-#define BOOST_MSM_TOOLS_H
-
-
-#include <string>
-#include <iostream>
-#include <boost/msm/metafunctions.hpp>
-
-namespace boost { namespace msm
-{
-
-// fills the array passed in with the state names in the correct order
-// the array must be big enough. To know the needed size, use mpl::size
-// on fsm::generate_state_set
-template <class stt>
-struct fill_state_names
-{
- fill_state_names(char const** names):m_names(names){}
- template <class StateType>
- void operator()(boost::msm::wrap<StateType> const&)
- {
- m_names[get_state_id<stt,StateType>::value]= typeid(StateType).name();
- }
-private:
- char const** m_names;
-};
-
-// fills the typeid-generated name of the given state in the string passed as argument
-template <class stt>
-struct get_state_name
-{
- get_state_name(std::string& name_to_fill, int state_id):m_name(name_to_fill),m_state_id(state_id){}
- template <class StateType>
- void operator()(boost::msm::wrap<StateType> const&)
- {
- if (get_state_id<stt,StateType>::value == m_state_id)
- {
- m_name = typeid(StateType).name();
- }
- }
-private:
- std::string& m_name;
- int m_state_id;
-};
-
-// displays the typeid of the given Type
-struct display_type
-{
- template <class Type>
- void operator()(boost::msm::wrap<Type> const&)
- {
- std::cout << typeid(Type).name() << std::endl;
- }
-};
-
-} } //boost::msm
-#endif //BOOST_MSM_TOOLS_H

Added: sandbox/msm/libs/msm/doc/AnnexA.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/Anonymous.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/AnonymousTutorial.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/AnonymousTutorial.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,122 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+using namespace boost::msm::front;
+
+namespace
+{
+ // events
+ struct event1 {};
+
+
+ // front-end: define the FSM structure
+ struct my_machine_ : public msm::front::state_machine_def<my_machine_>
+ {
+ // The list of FSM states
+ struct State1 : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
+ };
+ struct State2 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State2" << std::endl;}
+ };
+
+ struct State3 : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State3" << std::endl;}
+ };
+
+ struct State4 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State4" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State4" << std::endl;}
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef State1 initial_state;
+
+ // transition actions
+ void State2ToState3(none const&) { std::cout << "my_machine::State2ToState3\n"; }
+ void State3ToState4(none const&) { std::cout << "my_machine::State3ToState4\n"; }
+ // guard conditions
+ bool always_true(none const& evt)
+ {
+ std::cout << "always_true" << std::endl;
+ return true;
+ }
+ bool always_false(none const& evt)
+ {
+ std::cout << "always_false" << std::endl;
+ return false;
+ }
+
+ typedef my_machine_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ _row < State1 , none , State2 >,
+ a_row < State2 , none , State3 , &p::State2ToState3 >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ row < State3 , none , State4 , &p::State3ToState4 , &p::always_true >,
+ g_row < State3 , none , State4 , &p::always_false >,
+ _row < State4 , event1 , State1 >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<my_machine_> my_machine;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "State1", "State2", "State3", "State4" };
+ void pstate(my_machine const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ my_machine p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ // in this case it will also immediately trigger all anonymous transitions
+ p.start();
+ // this event will bring us back to the initial state and thus, a new "loop" will be started
+ p.process_event(event1());
+
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/AnonymousTutorialEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/AnonymousTutorialEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,164 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+namespace msm = boost::msm;
+using namespace boost::msm::front::euml;
+
+namespace
+{
+ // events
+ struct event1 : euml_event<event1> {};
+
+ struct State1_Entry : euml_action<State1_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State1" << std::endl;
+ }
+ };
+ struct State1_Exit : euml_action<State1_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State1" << std::endl;
+ }
+ };
+ struct State2_Entry : euml_action<State2_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State2" << std::endl;
+ }
+ };
+ struct State2_Exit : euml_action<State2_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State2" << std::endl;
+ }
+ };
+ struct State3_Entry : euml_action<State3_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State3" << std::endl;
+ }
+ };
+ struct State3_Exit : euml_action<State3_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State3" << std::endl;
+ }
+ };
+ struct State4_Entry : euml_action<State4_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State4" << std::endl;
+ }
+ };
+ struct State4_Exit : euml_action<State4_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State4" << std::endl;
+ }
+ };
+
+ // The list of FSM states
+ typedef BOOST_TYPEOF(build_state(State1_Entry(),State1_Exit())) State1;
+ typedef BOOST_TYPEOF(build_state(State2_Entry(),State2_Exit())) State2;
+ typedef BOOST_TYPEOF(build_state(State3_Entry(),State3_Exit())) State3;
+ typedef BOOST_TYPEOF(build_state(State4_Entry(),State4_Exit())) State4;
+
+ // transition actions
+ struct State2ToState3 : euml_action<State2ToState3>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ std::cout << "my_machine::State2ToState3" << std::endl;
+ }
+ };
+ struct State3ToState4 : euml_action<State3ToState4>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ std::cout << "my_machine::State3ToState4" << std::endl;
+ }
+ };
+ // guard conditions
+ struct always_true : euml_action<always_true>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM&,SourceState& ,TargetState& )
+ {
+ std::cout << "always_true" << std::endl;
+ return true;
+ }
+ };
+ struct always_false : euml_action<always_false>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM&,SourceState& ,TargetState& )
+ {
+ std::cout << "always_false" << std::endl;
+ return false;
+ }
+ };
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((State1() == State2() ,
+ State2() == State3() / State2ToState3(),
+ State3() == State4() [always_true()] / State3ToState4(),
+ State3() == State4() [always_false()],
+ State4() + event1() == State1()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << State1() // Init State
+ )) my_machine_;
+
+ // Pick a back-end
+ typedef msm::back::state_machine<my_machine_> my_machine;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "State1", "State2", "State3", "State4" };
+ void pstate(my_machine const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ my_machine p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ // in this case it will also immediately trigger all anonymous transitions
+ p.start();
+ // this event will bring us back to the initial state and thus, a new "loop" will be started
+ p.process_event(event1());
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/AnonymousTutorialWithFunctors.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/AnonymousTutorialWithFunctors.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,147 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+// functors
+#include <boost/msm/front/functor_row.hpp>
+#include <boost/msm/front/euml/common.hpp>
+
+namespace msm = boost::msm;
+using namespace boost::msm::front;
+
+namespace
+{
+ // events
+ struct event1 {};
+
+
+ // front-end: define the FSM structure
+ struct my_machine_ : public msm::front::state_machine_def<my_machine_>
+ {
+ // The list of FSM states
+ struct State1 : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
+ };
+ struct State2 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State2" << std::endl;}
+ };
+
+ struct State3 : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State3" << std::endl;}
+ };
+
+ struct State4 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State4" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State4" << std::endl;}
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef State1 initial_state;
+
+ // transition actions
+ struct State2ToState3
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ std::cout << "my_machine::State2ToState3" << std::endl;
+ }
+ };
+ struct State3ToState4
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ std::cout << "my_machine::State3ToState4" << std::endl;
+ }
+ };
+ // guard conditions
+ struct always_true
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ std::cout << "always_true" << std::endl;
+ return true;
+ }
+ };
+ struct always_false
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ std::cout << "always_false" << std::endl;
+ return true;
+ }
+ };
+
+ typedef my_machine_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ Row < State1 , none , State2 >,
+ Row < State2 , none , State3 , State2ToState3 >,
+ Row < State3 , none , State4 , always_false >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ Row < State3 , none , State4 , State3ToState4 , always_true >,
+ Row < State4 , event1 , State1 >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<my_machine_> my_machine;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "State1", "State2", "State3", "State4" };
+ void pstate(my_machine const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ my_machine p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ // in this case it will also immediately trigger all anonymous transitions
+ p.start();
+ // this event will bring us back to the initial state and thus, a new "loop" will be started
+ p.process_event(event1());
+
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/CompilerStressTestEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/CompilerStressTestEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,420 @@
+#include <vector>
+#include <list>
+#include <set>
+#include <map>
+#include <iostream>
+
+#define FUSION_MAX_VECTOR_SIZE 15
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+#include <boost/msm/front/euml/stl.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// how long the timer will ring when countdown elapsed.
+#define RINGING_TIME 5
+
+#define m_src_container 0
+#define m_tgt_container 1
+#define m_test_container 2
+#define m_song 0
+#define m_letters 0
+#define m_src_it 0
+
+namespace // Concrete FSM implementation
+{
+ // flag
+ struct SomeFlag : euml_flag<SomeFlag>{};
+
+ // events
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << string() << int()/*m_song*/ )) OneSongDef;
+ struct OneSong : euml_event<OneSong>,OneSongDef
+ {
+ OneSong(){}
+ OneSong(const string& asong)
+ {
+ get_attribute<m_song>()=asong;
+ get_attribute<1>()=1;
+ }
+ OneSong(const OneSong& asong)
+ {
+ get_attribute<m_song>()=asong.get_attribute<m_song>();
+ get_attribute<1>()=1;
+ }
+ const string& get_data() const {return get_attribute<m_song>();}
+ };
+ struct SongComparator : euml_action<SongComparator>
+ {
+ bool operator()(const OneSong& lhs,const OneSong& rhs)const
+ {
+ return lhs.get_data() == rhs.get_data();
+ }
+ };
+ struct SongLessComparator : euml_action<SongLessComparator>
+ {
+ bool operator()(const OneSong& lhs,const OneSong& rhs)const
+ {
+ return lhs.get_data() < rhs.get_data();
+ }
+ };
+ struct Comparator
+ {
+ template <class T>
+ bool operator()(const T& lhs,const T& rhs)const
+ {
+ return lhs < rhs;
+ }
+ };
+ struct RemoveDummy
+ {
+ bool operator()(const OneSong& lhs)const
+ {
+ return (lhs.get_attribute<m_song>().compare(std::string("She-Dummy. Remove this one"))==0 );
+ }
+ };
+ template <int val>
+ struct LookFor
+ {
+ template <class T>
+ bool operator()(const T& lhs)const
+ {
+ return lhs == val;
+ }
+ };
+ template <int val>
+ struct LessThan
+ {
+ template <class T>
+ bool operator()(const T& lhs)const
+ {
+ return lhs < val;
+ }
+ };
+ struct SongDeleter : euml_action<SongDeleter>
+ {
+ bool operator()(const OneSong& lhs)const
+ {
+ return lhs.get_data() == "Twist and Shout";
+ }
+ };
+ struct Generator
+ {
+ int operator()()const
+ {
+ return 1;
+ }
+ };
+ struct Print
+ {
+ template <class T>
+ void operator()(const T& lhs)const
+ {
+ std::cout << "Song:" << lhs.get_data() << endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << string()/*m_song*/ )) NotFoundDef;
+ struct NotFound : euml_event<NotFound>,NotFoundDef
+ {
+ NotFound(){}
+ NotFound (const string& data)
+ {
+ get_attribute<m_song>()=data;
+ }
+ };
+
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << string()/*m_song*/ )) FoundDef;
+ struct Found : euml_event<Found>,FoundDef
+ {
+ Found(){}
+ Found (const string& data)
+ {
+ get_attribute<m_song>()=data;
+ }
+ int foo()const {std::cout << "foo()" << std::endl; return 0;}
+ int foo(int i)const {std::cout << "foo(int):" << i << std::endl; return 1;}
+ int foo(int i,int j)const {std::cout << "foo(int,int):" << i <<"," << j << std::endl; return 2;}
+
+ };
+ // some functions to call
+ MSM_EUML_METHOD(FoundFoo_ , foo , foo_ , int , int )
+
+ template <class T>
+ int do_print(T& t ) {std::cout << "print(T):" << typeid(T).name() << std::endl;return 1;}
+ MSM_EUML_FUNCTION(PrintState_ , do_print , print_ , int , int )
+
+ struct Done : euml_event<Done> {};
+
+
+ // Concrete FSM implementation
+ struct some_base
+ {
+ int foobar()const {std::cout << "foobar()" << std::endl; return 0;}
+ int foobar(int i)const {std::cout << "foobar(int):" << i << std::endl; return 1;}
+ int foobar(int i,int j)const {std::cout << "foobar(int,int):" << i <<"," << j << std::endl; return 2;}
+ };
+ // some functions to call
+ MSM_EUML_METHOD(FooBar_ , foobar , foobar_ , int , int )
+
+ // The list of FSM states
+ typedef BOOST_TYPEOF(build_state( ( insert_(Fsm_<m_tgt_container>(),end_(Fsm_<m_tgt_container>()),
+ append_(Event_<m_song>(),Fsm_<7>()) ),//foo_(event_(),Int_<0>()) ,
+ //foo_(event_(),Int_<0>(),Int_<1>()),print_(state_()),
+ process_(Done()/*,fsm_()*/),if_then_(True_(),True_()) ),
+ NoAction()
+ )) Insert;
+
+
+ typedef BOOST_TYPEOF(build_state( if_then_else_( (string_find_(Event_<m_song>(),State_<m_letters>(),Size_t_<0>()) != Npos_<string>()&&
+ string_find_(Event_<m_song>(),Char_<'S'>(),Size_t_<0>()) != Npos_<string>()&&
+ string_find_first_of_(Event_<m_song>(),Char_<'S'>()) == Size_t_<0>() &&
+ string_compare_(Event_<m_song>(),Int_<0>(),size_(Event_<m_song>()),Event_<m_song>()) == Int_<0>()
+ //&& is_flag_(SomeFlag(),fsm_())
+ //&& ( attribute_(event_(),Int_<1>()) == Int_<1>())
+ //&& string_find_(Event_<m_song>(),String_<mpl::string<'Sh','e'> >())
+ // != Npos_<string>()
+
+ ),
+ process2_(Found(),
+ //string_insert_(Event_<m_song>(),Size_t_<0>(),Fsm_<6>()) ),
+ string_replace_(
+ string_assign_(
+ string_erase_(
+ string_insert_(
+ substr_(Event_<m_song>(),Size_t_<1>()),
+ Size_t_<0>(),
+ Size_t_<1>(),
+ Char_<'S'>()),
+ Size_t_<0>(),
+ Size_t_<1>() ),
+ Event_<m_song>() ),
+ Size_t_<0>(),
+ Size_t_<1>(),
+ c_str_(Fsm_<6>())
+ /*Size_t_<1>(),
+ Char_<'s'>()*/ ) ),
+ process2_(NotFound(),Event_<m_song>(),fsm_()) ) ,
+ NoAction(),
+ attributes_ << string()/*m_letters*/,
+ configure_<< SomeFlag() ))
+ StringFind;
+
+ typedef BOOST_TYPEOF(build_state( if_then_( (State_<m_src_it>() != end_(Fsm_<m_src_container>()) &&
+ //associative_find_(Fsm_<4>(),Int_<9>()) != end_(Fsm_<4>())&&
+ //associative_count_(Fsm_<4>(),Int_<9>()) == Size_t_<1>() &&
+ //*associative_upper_bound_(Fsm_<4>(),Int_<8>()) == Int_<9>()&&
+ //*associative_lower_bound_(Fsm_<4>(),Int_<9>()) == Int_<9>() &&
+ //second_(associative_equal_range_(Fsm_<4>(),Int_<8>())) == associative_upper_bound_(Fsm_<4>(),Int_<8>()) &&
+ //first_(associative_equal_range_(Fsm_<4>(),Int_<8>())) == associative_lower_bound_(Fsm_<4>(),Int_<8>())&&
+ //second_(*associative_lower_bound_(Fsm_<5>(),Int_<0>())) == Int_<0>() && //map => pair as return
+ //find_if_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Predicate_<LookFor<8> >()) != end_(Fsm_<4>())&&
+ //*lower_bound_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<9>(),Predicate_<std::less<int> >()) == Int_<9>()&&
+ //*upper_bound_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<8>(),Predicate_<std::less<int> >()) == Int_<9>() &&
+ //second_(equal_range_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<8>()))
+ // == upper_bound_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<8>()) &&
+ //first_(equal_range_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<9>(),Predicate_<std::less<int> >()))
+ // == lower_bound_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<9>(),Predicate_<std::less<int> >())&&
+ //binary_search_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<9>(),Predicate_<std::less<int> >())&&
+ //binary_search_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<9>())&&
+ //count_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Int_<9>()) == Int_<1>()&&
+ //count_if_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Predicate_<LookFor<9> >()) == Int_<1>()&&
+ //distance_(begin_(Fsm_<4>()),end_(Fsm_<4>())) == Int_<2>()&&
+ //*min_element_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Predicate_<std::less<int> >()) == Int_<8>()&&
+ //*max_element_(begin_(Fsm_<4>()),end_(Fsm_<4>()),Predicate_<std::less<int> >()) == Int_<9>()&&
+ //adjacent_find_(begin_(Fsm_<4>()),end_(Fsm_<4>())) == end_(Fsm_<4>())&&
+ //*find_end_(begin_(Fsm_<8>()),end_(Fsm_<8>()),begin_(Fsm_<9>()),end_(Fsm_<9>()))
+ // == Int_<1>()&&
+ //*find_first_of_(begin_(Fsm_<8>()),end_(Fsm_<8>()),begin_(Fsm_<9>()),end_(Fsm_<9>()))
+ // == Int_<1>()&&
+ //equal_(begin_(Fsm_<9>()),end_(Fsm_<9>()),begin_(Fsm_<8>()))&&
+ //*search_(begin_(Fsm_<8>()),end_(Fsm_<8>()),begin_(Fsm_<9>()),end_(Fsm_<9>()))
+ // == Int_<1>()&&
+ //includes_(begin_(Fsm_<8>()),end_(Fsm_<8>()),begin_(Fsm_<9>()),end_(Fsm_<9>()))&&
+ //!lexicographical_compare_(begin_(Fsm_<8>()),end_(Fsm_<8>()),
+ // begin_(Fsm_<9>()),end_(Fsm_<9>()))&&
+ //first_(mismatch_(begin_(Fsm_<9>()),end_(Fsm_<9>()),begin_(Fsm_<8>())))
+ // == end_(Fsm_<9>()) &&
+ accumulate_(begin_(Fsm_<9>()),end_(Fsm_<9>()),Int_<1>(),
+ Predicate_<std::plus<int> >()) == Int_<1>()
+ ),
+ (process2_(OneSong(),*(State_<m_src_it>()++))/*,foobar_(fsm_(),Int_<0>())*/ ) ),
+ NoAction(),
+ attributes_ << vector<OneSong>::iterator()/*m_src_it*/
+ , configure_<< SomeFlag() )) Foreach;
+
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Foreach() + OneSong() == StringFind() [if_then_else_(True_(),True_(),True_())],
+ StringFind() + Found() == Insert() / (if_then_(True_(),NoAction())),
+ StringFind() + NotFound() == Foreach() ,
+ Insert() + Done() == Foreach()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+ struct Log_No_Transition : euml_action<Log_No_Transition>
+ {
+ template <class FSM,class Event>
+ void operator()(Event const& e,FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Foreach(), // Init
+ //insert_(State_<4>(),begin_(State_<2>()),end_(State_<2>())),
+ (insert_(State_<4>(),Int_<5>()),insert_(State_<4>(),Int_<6>()),insert_(State_<4>(),Int_<7>()),
+ insert_(State_<4>(),Int_<8>()),insert_(State_<4>(),Int_<9>()),
+ associative_erase_(State_<4>(),Int_<6>()),associative_erase_(State_<4>(),begin_(State_<4>())),
+ associative_erase_(State_<4>(),begin_(State_<4>()),++begin_(State_<4>())),
+ insert_(State_<2>(),begin_(State_<2>()),begin_(State_<3>()),end_(State_<3>())),
+ State_<5>()[Int_<0>()]=Int_<0>(),State_<5>()[Int_<1>()]=Int_<1>()
+ ,attribute_(substate_(Foreach(),fsm_()),Int_<m_src_it>())
+ = begin_(attribute_(fsm_(),Int_<m_src_container>()))
+ //,fill_(begin_(State_<9>()),end_(State_<9>()),Int_<0>())
+ //,fill_n_(begin_(State_<9>()),Size_t_<2>(),Int_<0>())
+ //,transform_(begin_(State_<4>()),end_(State_<4>()),begin_(State_<2>()),begin_(State_<4>()),
+ // Predicate_<std::plus<int> >())
+ //,process_(Done(),fsm_(),fsm_())
+ //,process_(Done(),fsm_())
+ //,fsm_()
+ //,foobar_(state_(),Int_<0>(),Int_<1>())
+ //,nth_element_(begin_(State_<9>()),++begin_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,partial_sort_(begin_(State_<9>()),end_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,partial_sort_copy_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,list_sort_(State_<2>())
+ //,sort_(begin_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,inner_product_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()),Int_<1>())
+ //,replace_copy_(begin_(State_<4>()),end_(State_<4>()),begin_(State_<4>()),Int_<8>(),Int_<7>())
+ //,replace_copy_if_(begin_(State_<4>()),end_(State_<4>()),begin_(State_<4>()),Predicate_<LookFor<9> >(),Int_<8>())
+ //,replace_(begin_(State_<4>()),end_(State_<4>()),Int_<8>(),Int_<7>())
+ //,replace_if_(begin_(State_<4>()),end_(State_<4>()),Predicate_<LookFor<9> >(),Int_<8>())
+ //,adjacent_difference_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()))
+ //,partial_sum_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()))
+ //,inner_product_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()),Int_<1>())
+ //,next_permutation_(begin_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,prev_permutation_(begin_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,set_union_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()))
+ //,inplace_merge_(begin_(State_<9>()),end_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,merge_(begin_(State_<9>()),end_(State_<9>()),begin_(State_<9>()),end_(State_<9>())
+ // ,begin_(State_<9>()),Predicate_<std::less<int> >())
+ //,stable_sort_(begin_(State_<9>()),end_(State_<9>()),Predicate_<std::less<int> >())
+ //,partition_(begin_(State_<2>()),end_(State_<2>()),Predicate_<LessThan<3> >())
+ //,stable_partition_(begin_(State_<2>()),end_(State_<2>()),Predicate_<LessThan<3> >())
+ //,rotate_copy_(begin_(State_<2>()),++begin_(State_<2>()),end_(State_<2>()),begin_(State_<2>()))
+ //,rotate_(begin_(State_<2>()),++begin_(State_<2>()),end_(State_<2>()))
+ //,unique_(begin_(State_<2>()),end_(State_<2>()))
+ //,unique_copy_(begin_(State_<2>()),end_(State_<2>()),begin_(State_<2>()))
+ //,random_shuffle_(begin_(State_<9>()),end_(State_<9>()))
+ //,generate_(begin_(State_<9>()),end_(State_<9>()),Predicate_<Generator>())
+ //,generate_n_(begin_(State_<9>()),Int_<2>(),Predicate_<Generator>())
+ //,reverse_copy_(begin_(State_<2>()),end_(State_<2>()),begin_(State_<2>()))
+ //erase_(State_<m_src_container>(),
+ // remove_if_(begin_(State_<m_src_container>()),end_(State_<m_src_container>()),
+ // Predicate_<RemoveDummy>()),
+ // end_(State_<m_src_container>())),
+ //list_remove_(State_<2>(),Int_<3>()),
+ //remove_copy_if_(begin_(State_<9>()),end_(State_<9>()),back_inserter_(State_<2>()),
+ // Predicate_<LookFor<2> >() )
+ //for_each_(begin_(State_<m_src_container>()),end_(State_<m_src_container>()),
+ // Predicate_<Print>() ),
+ //copy_(begin_(State_<9>()),end_(State_<9>()),inserter_(State_<2>(),end_(State_<2>()))),
+ //reverse_(begin_(State_<2>()),end_(State_<2>()))
+ ),
+ //NoAction(), // Entry
+ //splice_(State_<2>(),begin_(State_<2>()),State_<3>(),begin_(State_<3>()),end_(State_<3>())),
+ //(list_remove_(State_<2>(),Int_<3>()),list_merge_(State_<2>(),State_<3>(),Comparator())),//NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << vector<OneSong>() /*m_src_container*/ // song list
+ << list<OneSong>() /*m_tgt_container*/ // result
+ << list<int>()
+ << list<int>()
+ << std::set<int>()
+ << std::map<int,int>()
+ << std::string()
+ << std::string()
+ << std::vector<int>()
+ << std::vector<int>()
+ << int(),
+ configure_<< no_configure_,
+ Log_No_Transition()
+ )) iPodSearch_helper;
+ struct iPodSearch_ : public iPodSearch_helper, public some_base
+ {
+ };
+
+
+ // choice of back-end
+ typedef msm::back::state_machine<iPodSearch_> iPodSearch;
+
+ void test()
+ {
+ iPodSearch search;
+ // fill our song list
+ //search.get_attribute<m_src_container>().push_back(OneSong("She-Dummy. Remove this one"));
+ search.get_attribute<m_src_container>().push_back(OneSong("Let it be"));
+ search.get_attribute<m_src_container>().push_back(OneSong("Yellow submarine"));
+ search.get_attribute<m_src_container>().push_back(OneSong("Twist and Shout"));
+ search.get_attribute<m_src_container>().push_back(OneSong("She Loves You"));
+
+ search.get_attribute<2>().push_back(1);
+ search.get_attribute<2>().push_back(3);
+ search.get_attribute<2>().push_back(4);
+
+ search.get_attribute<3>().push_back(2);
+ search.get_attribute<3>().push_back(4);
+
+ search.get_attribute<6>() = "S";
+ search.get_attribute<7>() = "- Some text";
+
+ search.get_attribute<8>().push_back(1);
+ search.get_attribute<8>().push_back(2);
+ search.get_attribute<8>().push_back(3);
+ search.get_attribute<8>().push_back(4);
+
+ search.get_attribute<9>().push_back(1);
+ search.get_attribute<9>().push_back(2);
+
+
+ // look for "She Loves You" using the first letters
+ search.get_state<StringFind&>().get_attribute<m_letters>()="Sh";
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ search.start();
+ // display all the songs
+ for (list<OneSong>::const_iterator it = search.get_attribute<m_tgt_container>().begin();
+ it != search.get_attribute<m_tgt_container>().end();++it)
+ {
+ cout << "candidate song:" << (*it).get_data() << endl;
+ }
+ for (list<int>::const_iterator iti = search.get_attribute<2>().begin();
+ iti != search.get_attribute<2>().end();++iti)
+ {
+ cout << "int in attribute<2>:" << (*iti) << endl;
+ }
+ for (set<int>::const_iterator its = search.get_attribute<4>().begin();
+ its != search.get_attribute<4>().end();++its)
+ {
+ cout << "int in attribute<4>:" << (*its) << endl;
+ }
+ cout << "search using more letters" << endl;
+ // look for "She Loves You" using more letters
+ search.get_state<StringFind&>().get_attribute<m_letters>()="She";
+ search.get_attribute<m_tgt_container>().clear();
+ search.start();
+ // display all the songs
+ for (list<OneSong>::const_iterator it = search.get_attribute<m_tgt_container>().begin();
+ it != search.get_attribute<m_tgt_container>().end();++it)
+ {
+ cout << "candidate song:" << (*it).get_data() << endl;
+ }
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/CompositeTutorial.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/CompositeTutorial.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,222 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct NextSong {};
+ struct PreviousSong {};
+
+ // A "complicated" event type that carries some data.
+ struct cd_detected
+ {
+ cd_detected(std::string name)
+ : name(name)
+ {}
+
+ std::string name;
+ };
+
+ // front-end: define the FSM structure
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ };
+ struct Open : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ };
+
+ // the player state machine contains a state which is himself a state machine
+ // as you see, no need to declare it anywhere so Playing can be developed separately
+ // by another team in another module. For simplicity I just declare it inside player
+ struct Playing_ : public msm::front::state_machine_def<Playing_>
+ {
+ // when playing, the CD is loaded and we are in either pause or playing (duh)
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+
+ // The list of FSM states
+ struct Song1 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
+
+ };
+ struct Song2 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
+ };
+ struct Song3 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Third Song" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef Song1 initial_state;
+ // transition actions
+ void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
+ void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
+ // guard conditions
+
+ typedef Playing_ pl; // makes transition table cleaner
+ // Transition table for Playing
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
+ a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
+ a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
+ a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // back-end
+ typedef msm::back::state_machine<Playing_> Playing;
+
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+
+ // transition actions
+ void start_playback(play const&) { std::cout << "player::start_playback\n"; }
+ void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
+ void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
+ void store_cd_info(cd_detected const& cd) {std::cout << "player::store_cd_info\n";}
+ void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
+ void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
+ void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
+ void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ // guard conditions
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ p.process_event(cd_detected("louie, louie"));
+ p.process_event(play());
+
+ // at this point, Play is active
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(NextSong());pstate(p); //2nd song active
+ p.process_event(NextSong());pstate(p);//3rd song active
+ p.process_event(PreviousSong());pstate(p);//2nd song active
+
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ // as you see, it starts back from the original state
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ p.process_event(stop()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/CompositeTutorial.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/CompositeTutorialEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/CompositeTutorialEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,174 @@
+#include <vector>
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// entry/exit/action/guard logging functors
+#include "logging_functors.h"
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play : euml_event<play>{};
+ struct end_pause : euml_event<end_pause>{};
+ struct stop : euml_event<stop>{};
+ struct pause : euml_event<pause>{};
+ struct open_close : euml_event<open_close>{};
+ struct next_song : euml_event<next_song>{};
+ struct previous_song : euml_event<previous_song>{};
+
+ // A "complicated" event type that carries some data.
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << std::string() << DiskTypeEnum() )) cd_detected_attributes;
+ struct cd_detected : euml_event<cd_detected>, cd_detected_attributes
+ {
+ cd_detected(){}
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ {
+ get_attribute<0>()=name;
+ get_attribute<1>()=diskType;
+ }
+ };
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+
+ typedef BOOST_TYPEOF(build_state(Empty_Entry(),Empty_Exit())) Empty;
+
+ typedef BOOST_TYPEOF(build_state( Open_Entry(),Open_Exit() )) Open;
+
+ typedef BOOST_TYPEOF(build_state( Stopped_Entry(),Stopped_Exit() )) Stopped;
+
+ // state not defining any entry or exit
+ typedef BOOST_TYPEOF(build_state( )) Paused;
+
+ // Playing is now a state machine itself.
+
+ // It has 3 substates
+ typedef BOOST_TYPEOF(build_state( Song1_Entry(),Song1_Exit() )) Song1;
+
+ typedef BOOST_TYPEOF(build_state( Song2_Entry(),Song2_Exit() )) Song2;
+
+ typedef BOOST_TYPEOF(build_state( Song3_Entry(),Song3_Exit() )) Song3;
+
+
+ // Playing has a transition table
+ typedef BOOST_TYPEOF(build_stt(
+ // +------------------------------------------------------------------------------+
+ ( Song1() + next_song() == Song2() / start_next_song(),
+ Song2() + previous_song() == Song1() / start_prev_song(),
+ Song2() + next_song() == Song3() / start_next_song(),
+ Song3() + previous_song() == Song2() / start_prev_song()
+ // +------------------------------------------------------------------------------+
+ ) ) ) playing_transition_table;
+
+ // VC9 cannot compile the typedef with build_sm if one is also used for player
+#ifndef BOOST_MSVC
+ // create a state machine "on the fly" for Playing
+ typedef BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1() // Init State
+ )) Playing_;
+#else
+ // but this definition is ok
+ struct Playing_ : public BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1() // Init State
+ ))
+ {
+ };
+#endif
+ // choice of back-end
+ typedef msm::back::state_machine<Playing_> Playing;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Stopped() + play() == Playing() / start_playback() ,
+ Stopped() + open_close() == Open() / open_drawer(),
+ Stopped() + stop() == Stopped(),
+ // +------------------------------------------------------------------------------+
+ Open() + open_close() == Empty() / close_drawer(),
+ // +------------------------------------------------------------------------------+
+ Empty() + open_close() == Open() / open_drawer(),
+ Empty() + cd_detected() == Stopped() [good_disk_format()&&(Event_<1>()==Int_<DISK_CD>())]
+ / (store_cd_info(),process_(play())),
+ // +------------------------------------------------------------------------------+
+ Playing() + stop() == Stopped() / stop_playback(),
+ Playing() + pause() == Paused() / pause_playback(),
+ Playing() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ Paused() + end_pause() == Playing() / resume_playback(),
+ Paused() + stop() == Stopped() / stop_playback(),
+ Paused() + open_close() == Open() / stop_and_open()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_<< no_configure_, // Flags, Deferred events, configuration
+ Log_No_Transition() // no_transition handler
+ )) player_;
+ // or simply, if no no_transition handler needed:
+ //typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ // Empty(), // Init State
+ // )) player_;
+
+ // choice of back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(next_song());pstate(p); //2nd song active
+ p.process_event(next_song());pstate(p);//3rd song active
+ p.process_event(previous_song());pstate(p);//2nd song active
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ // no action method called as none is defined in the transition table
+ p.process_event(stop()); pstate(p);
+ // test call to no_transition
+ p.process_event(pause()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/DirectEntryAndConflicts.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/DirectEntryAndConflicts.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,232 @@
+#include <vector>
+#include <iostream>
+#include "boost/mpl/vector/vector50.hpp"
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct event1 {};
+ struct event2 {};
+ struct event3 {};
+ struct event4 {};
+ struct event5 {};
+ struct event6 {};
+ struct event7 {};
+ // Concrete FSM implementation
+ struct Fsm_ : public msm::front::state_machine_def<Fsm_>
+ {
+ // The list of FSM states
+ struct State1 : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
+ };
+ struct State2 : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State2" << std::endl;}
+ };
+ struct SubFsm2_ : public msm::front::state_machine_def<SubFsm2_>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2" << std::endl;}
+
+ struct SubState1 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState1" << std::endl;}
+ };
+ struct SubState1b : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState1b" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState1b" << std::endl;}
+ };
+ struct SubState2 : public msm::front::state<> , public msm::front::explicit_entry<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState2" << std::endl;}
+ };
+ struct SubState2b : public msm::front::state<> , public msm::front::explicit_entry<1>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState2b" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState2b" << std::endl;}
+ };
+ // test with a pseudo entry
+ struct PseudoEntry1 : public msm::front::entry_pseudo_state<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;}
+ };
+ struct SubState3 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState3" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState3" << std::endl;}
+ };
+ struct SubState3b : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState3b" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState3b" << std::endl;}
+ };
+ struct PseudoExit1 : public msm::front::exit_pseudo_state<event5>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;}
+ };
+ // action methods
+ void entry_action(event4 const&)
+ {
+ std::cout << "calling entry_action" << std::endl;
+ }
+ void fake_action(event4 const&)
+ {
+ std::cout << "calling fake_action" << std::endl;
+ }
+ bool some_guard(event4 const&)
+ {
+ bool res = false;
+ std::cout << "calling fsm::some_guard with:"<< std::boolalpha << res << std::endl;
+ return res;
+ }
+ // the initial state. Must be defined
+ typedef mpl::vector<SubState1,SubState1b> initial_state;
+
+ typedef mpl::vector<SubState2,SubState2b> explicit_creation;
+
+ // Transition table for SubFsm2
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +--------------+-------------+------------+------------------------+----------------------+
+ a_row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::entry_action >,
+ row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::fake_action , &SubFsm2_::some_guard >,
+ _row < SubState3 , event5 , PseudoExit1 >
+ // +--------------+-------------+------------+------------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<SubFsm2_> SubFsm2;
+ // the initial state of the player SM. Must be defined
+ typedef State1 initial_state;
+
+ // transition actions
+ void fake_action(event5 const&)
+ {
+ std::cout << "calling fsm::fake_action" << std::endl;
+ }
+ // guard conditions
+ bool some_guard(event5 const&)
+ {
+ bool res = false;
+ std::cout << "calling fsm::some_guard with:"<< std::boolalpha << res << std::endl;
+ return res;
+ }
+ bool guard_false(event6 const&)
+ {
+ std::cout << "calling fsm::guard_false"<< std::endl;
+ return false;
+ }
+
+ // Transition table for Fsm
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ _row < State1 , event1 , SubFsm2 >,
+ _row < State1 , event2 , SubFsm2::direct<SubFsm2_::SubState2> >,
+ _row < State1 , event3 , mpl::vector<SubFsm2::direct<SubFsm2_::SubState2>,
+ SubFsm2::direct<SubFsm2_::SubState2b> > >,
+ _row < State1 , event4 , SubFsm2::entry_pt<SubFsm2_::PseudoEntry1> >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ _row < SubFsm2, event1 , State1 >,
+ _row < SubFsm2::exit_pt<SubFsm2_::PseudoExit1> , event5 , State2 >,
+ g_row < State2 , event6 , State1 , &Fsm_::guard_false >,
+ g_row < State2 , event6 , State1 , &Fsm_::guard_false >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<Fsm_> Fsm;
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "State1", "SubFsm2","State2" };
+ void pstate(Fsm const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ Fsm p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ std::cout << "Simply move in and out of the composite, activate init states" << std::endl;
+ p.process_event(event1()); pstate(p);
+ // voluntary mistake to check that the transition is only taken if the exit state is active
+ std::cout << "Simulate error. event5 is only valid through an exit pseudo state" << std::endl;
+ p.process_event(event5()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "Direct entry into SubFsm2::SubState2 and back" << std::endl;
+ p.process_event(event2()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing fork to SubFsm2::SubState2 and SubFsm2::SubState2b" << std::endl;
+ p.process_event(event3()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing entry pseudo state" << std::endl;
+ p.process_event(event4()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing entry + exit pseudo state" << std::endl;
+ p.process_event(event4()); pstate(p);
+ std::cout << "using exit pseudo state" << std::endl;
+ p.process_event(event5()); pstate(p);
+ std::cout << "Simulate error. event5 is not valid" << std::endl;
+ p.process_event(event5()); pstate(p);
+ std::cout << "2 false guards" << std::endl;
+ p.process_event(event6()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/DirectEntryEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/DirectEntryEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,364 @@
+#include <vector>
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct event1 : euml_event<event1> {};
+ struct event2 : euml_event<event2> {};
+ struct event3 : euml_event<event3> {};
+ struct event4 : euml_event<event4> {};
+ struct event5 : euml_event<event5> {};
+ struct event6 : euml_event<event6>
+ {
+ event6(){}
+ template <class Event>
+ event6(Event const&){}
+ };
+
+ //Sub fsm state definition
+ struct SubState1_Entry : euml_action<SubState1_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1" << std::endl;
+ }
+ };
+ struct SubState1_Exit : euml_action<SubState1_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(SubState1_Entry(),SubState1_Exit())) SubState1;
+
+ struct SubState1b_Entry : euml_action<SubState1b_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1b" << std::endl;
+ }
+ };
+ struct SubState1b_Exit : euml_action<SubState1b_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1b" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(SubState1b_Entry(),SubState1b_Exit())) SubState1b;
+
+ struct SubState1c_Entry : euml_action<SubState1c_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1c" << std::endl;
+ }
+ };
+ struct SubState1c_Exit : euml_action<SubState1c_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1c" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(SubState1c_Entry(),SubState1c_Exit())) SubState1c;
+
+ struct SubState2_Entry : euml_action<SubState2_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2" << std::endl;
+ }
+ };
+ struct SubState2_Exit : euml_action<SubState2_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_explicit_entry_state<0>(SubState2_Entry(),SubState2_Exit())) SubState2;
+
+ struct SubState2b_Entry : euml_action<SubState2b_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2b" << std::endl;
+ }
+ };
+ struct SubState2b_Exit : euml_action<SubState2b_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2b" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_explicit_entry_state<1>(SubState2b_Entry(),SubState2b_Exit())) SubState2b;
+
+ struct SubState2c_Entry : euml_action<SubState2c_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2c" << std::endl;
+ }
+ };
+ struct SubState2c_Exit : euml_action<SubState2c_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2c" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_explicit_entry_state<2>(SubState2c_Entry(),SubState2c_Exit())) SubState2c;
+
+ struct PseudoEntry1_Entry : euml_action<PseudoEntry1_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;
+ }
+ };
+ struct PseudoEntry1_Exit : euml_action<PseudoEntry1_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_entry_state<0>(PseudoEntry1_Entry(),PseudoEntry1_Exit())) PseudoEntry1;
+
+ struct SubState3_Entry : euml_action<SubState3_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState3" << std::endl;
+ }
+ };
+ struct SubState3_Exit : euml_action<SubState3_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState3" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(SubState3_Entry(),SubState3_Exit())) SubState3;
+
+ struct SubState3b_Entry : euml_action<SubState3b_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState3b" << std::endl;
+ }
+ };
+ struct SubState3b_Exit : euml_action<SubState3b_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState3b" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(SubState3b_Entry(),SubState3b_Exit())) SubState3b;
+
+ struct PseudoExit1_Entry : euml_action<PseudoExit1_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;
+ }
+ };
+ struct PseudoExit1_Exit : euml_action<PseudoExit1_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_exit_state(event6(),PseudoExit1_Entry(),PseudoExit1_Exit())) PseudoExit1;
+
+ // actions
+ struct entry_action : euml_action<entry_action>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(FSM& ,EVT const& ,SourceState& ,TargetState& )
+ {
+ cout << "calling entry_action" << endl;
+ }
+ };
+ // SubFsm definition
+ struct SubFsm2_Entry : euml_action<SubFsm2_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2" << std::endl;
+ }
+ };
+ struct SubFsm2_Exit : euml_action<SubFsm2_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_stt(
+ // +------------------------------------------------------------------------------+
+ ( PseudoEntry1() + event4() == SubState3() / entry_action() ,
+ SubState2() + event6() == SubState1() ,
+ SubState3() + event5() == PseudoExit1()
+ // +------------------------------------------------------------------------------+
+ ) ) ) SubFsm2_transition_table;
+
+ struct SubFsm2_ : public BOOST_TYPEOF(build_sm( SubFsm2_transition_table(), //STT
+ init_ << SubState1() << SubState1b() << SubState1c(), // Init State
+ SubFsm2_Entry(), // Entry
+ SubFsm2_Exit()
+ ))
+ {
+ typedef mpl::vector<SubState2b,SubState2c> explicit_creation;
+ };
+
+
+ // back-end
+ typedef msm::back::state_machine<SubFsm2_> SubFsm2;
+
+ // Fsm state definitions
+ struct State1_Entry : euml_action<State1_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State1" << std::endl;
+ }
+ };
+ struct State1_Exit : euml_action<State1_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State1" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(State1_Entry(),State1_Exit())) State1;
+
+ struct State2_Entry : euml_action<State2_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State2" << std::endl;
+ }
+ };
+ struct State2_Exit : euml_action<State2_Exit>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State2" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state(State2_Entry(),State2_Exit())) State2;
+
+ // Fsm definition
+ typedef BOOST_TYPEOF(build_stt(
+ // +------------------------------------------------------------------------------+
+ ( State1() + event1() == SubFsm2() ,
+ State1() + event2() == SubFsm2::direct<SubState2>() ,
+ State1() + event3() == (SubFsm2::direct<SubState2>(),SubFsm2::direct<SubState2b>(),
+ SubFsm2::direct<SubState2c>()),
+ State1() + event4() == SubFsm2::entry_pt<PseudoEntry1>(),
+ SubFsm2() + event1() == State1() ,
+ SubFsm2::exit_pt
+ <PseudoExit1>() + event6() == State2()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ struct Log_No_Transition : euml_action<Log_No_Transition>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& e,FSM&,STATE& )
+ {
+ std::cout << "no transition in Fsm"
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << State1(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_<< no_configure_, // Flags, Deferred events, configuration
+ Log_No_Transition() // no_transition handler
+ )) Fsm_;
+ //back-end
+ typedef msm::back::state_machine<Fsm_> Fsm;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "State1", "SubFsm2","State2" };
+ void pstate(Fsm const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ Fsm p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ std::cout << "Simply move in and out of the composite, activate init states" << std::endl;
+ p.process_event(event1()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "Direct entry into SubFsm2::SubState2, then transition to SubState1 and back to State1" << std::endl;
+ p.process_event(event2()); pstate(p);
+ p.process_event(event6()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing fork to SubFsm2::SubState2, SubFsm2::SubState2b and SubFsm2::SubState2c" << std::endl;
+ p.process_event(event3()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing entry pseudo state" << std::endl;
+ p.process_event(event4()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing entry + exit pseudo state" << std::endl;
+ p.process_event(event4()); pstate(p);
+ std::cout << "using exit pseudo state" << std::endl;
+ p.process_event(event5()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,210 @@
+#include <vector>
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace
+{
+ // events
+ struct event1 {};
+ struct event2 {};
+ struct event3 {};
+ struct event4 {};
+ struct event5 {};
+ struct event6
+ {
+ event6(){}
+ template <class Event>
+ event6(Event const&){}
+ };
+ // front-end: define the FSM structure
+ struct Fsm_ : public msm::front::state_machine_def<Fsm_>
+ {
+ // The list of FSM states
+ struct State1 : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
+ };
+ struct State2 : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: State2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: State2" << std::endl;}
+ };
+ struct SubFsm2_ : public msm::front::state_machine_def<SubFsm2_>
+ {
+ typedef msm::back::state_machine<SubFsm2_> SubFsm2;
+
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2" << std::endl;}
+
+ struct SubState1 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState1" << std::endl;}
+ };
+ struct SubState1b : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState1b" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState1b" << std::endl;}
+ };
+ struct SubState2 : public msm::front::state<> , public msm::front::explicit_entry<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState2" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState2" << std::endl;}
+ };
+ struct SubState2b : public msm::front::state<> , public msm::front::explicit_entry<1>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState2b" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState2b" << std::endl;}
+ };
+ // test with a pseudo entry
+ struct PseudoEntry1 : public msm::front::entry_pseudo_state<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;}
+ };
+ struct SubState3 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState3" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState3" << std::endl;}
+ };
+ struct SubState3b : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::SubState3b" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::SubState3b" << std::endl;}
+ };
+ struct PseudoExit1 : public msm::front::exit_pseudo_state<event6>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;}
+ };
+ // action methods
+ void entry_action(event4 const&)
+ {
+ std::cout << "calling entry_action" << std::endl;
+ }
+ // the initial state. Must be defined
+ typedef mpl::vector<SubState1,SubState1b> initial_state;
+
+ typedef mpl::vector<SubState2b> explicit_creation;
+
+ // Transition table for SubFsm2
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +--------------+-------------+------------+------------------------+----------------------+
+ a_row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::entry_action >,
+ _row < SubState2 , event6 , SubState1 >,
+ _row < SubState3 , event5 , PseudoExit1 >
+ // +--------------+-------------+------------+------------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<SubFsm2_> SubFsm2;
+
+ // the initial state of the player SM. Must be defined
+ typedef State1 initial_state;
+
+ // transition actions
+ // guard conditions
+
+ // Transition table for Fsm
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------------------+--------+------------------------------------+-------+--------+
+ _row < State1 , event1 , SubFsm2 >,
+ _row < State1 , event2 , SubFsm2::direct<SubFsm2_::SubState2> >,
+ _row < State1 , event3 , mpl::vector<SubFsm2::direct<SubFsm2_::SubState2>,
+ SubFsm2::direct<SubFsm2_::SubState2b> > >,
+ _row < State1 , event4 , SubFsm2::entry_pt
+ <SubFsm2_::PseudoEntry1> >,
+ // +---------------------+--------+------------------------------------+-------+--------+
+ _row < SubFsm2 , event1 , State1 >,
+ _row < SubFsm2::exit_pt
+ <SubFsm2_::PseudoExit1>, event6 , State2 >
+ // +---------------------+--------+------------------------------------+-------+--------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<Fsm_> Fsm;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "State1", "SubFsm2","State2" };
+ void pstate(Fsm const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ Fsm p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ std::cout << "Simply move in and out of the composite, activate init states" << std::endl;
+ p.process_event(event1()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "Direct entry into SubFsm2::SubState2, then transition to SubState1 and back to State1" << std::endl;
+ p.process_event(event2()); pstate(p);
+ p.process_event(event6()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing fork to SubFsm2::SubState2 and SubFsm2::SubState2b" << std::endl;
+ p.process_event(event3()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing entry pseudo state" << std::endl;
+ p.process_event(event4()); pstate(p);
+ p.process_event(event1()); pstate(p);
+ std::cout << "processing entry + exit pseudo state" << std::endl;
+ p.process_event(event4()); pstate(p);
+ std::cout << "using exit pseudo state" << std::endl;
+ p.process_event(event5()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/EumlSimple.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/EumlSimple.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,234 @@
+// MsmSimple.cpp : Defines the entry point for the console application.
+//
+
+#include "stdafx.h"
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+#include <boost/msm/front/euml/stl.hpp>
+
+namespace msm = boost::msm;
+namespace mpl = boost::mpl;
+using namespace boost::msm::front::euml;
+
+#include <iostream>
+#ifdef WIN32
+#include "windows.h"
+#else
+#include <sys/time.h>
+#endif
+
+namespace test_fsm // Concrete FSM implementation
+{
+ // events
+ struct play : euml_event<play>{};
+ struct end_pause : euml_event<end_pause>{};
+ struct stop : euml_event<stop>{};
+ struct pause : euml_event<pause>{};
+ struct open_close : euml_event<open_close>{};
+ struct cd_detected : euml_event<cd_detected>{};
+
+ struct start_playback : euml_action<start_playback>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct open_drawer : euml_action<open_drawer>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct close_drawer : euml_action<close_drawer>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct store_cd_info : euml_action<store_cd_info>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const&, FSM& fsm ,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct stop_playback : euml_action<stop_playback>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct pause_playback : euml_action<pause_playback>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct resume_playback : euml_action<resume_playback>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct stop_and_open : euml_action<stop_and_open>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+ struct stopped_again : euml_action<stopped_again>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ }
+ };
+
+ // The list of FSM states
+ typedef BOOST_TYPEOF(build_state()) Empty;
+
+ typedef BOOST_TYPEOF(build_state( )) Open;
+
+ typedef BOOST_TYPEOF(build_state( )) Stopped;
+
+ typedef BOOST_TYPEOF(build_state( )) Playing;
+
+ typedef BOOST_TYPEOF(build_state( )) Paused;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Stopped() + play() == Playing() / start_playback() ,
+ Stopped() + open_close() == Open() / open_drawer(),
+ Stopped() + stop() == Stopped() / stopped_again(),
+ // +------------------------------------------------------------------------------+
+ Open() + open_close() == Empty() / close_drawer(),
+ // +------------------------------------------------------------------------------+
+ Empty() + open_close() == Open() / open_drawer(),
+ Empty() + cd_detected() == Stopped() / store_cd_info(),
+ // +------------------------------------------------------------------------------+
+ Playing() + stop() == Stopped() / stop_playback(),
+ Playing() + pause() == Paused() / pause_playback(),
+ Playing() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ Paused() + end_pause() == Playing() / resume_playback(),
+ Paused() + stop() == Stopped() / stop_playback(),
+ Paused() + open_close() == Open() / stop_and_open()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+
+ struct Log_No_Transition : euml_action<Log_No_Transition>
+ {
+ template <class FSM,class Event>
+ void operator()(Event const& e,FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+
+ // create a state machine "on the fly"
+ // VC9 sometimes cannot compile the typedef with build_sm
+#ifndef BOOST_MSVC
+ // create a state machine "on the fly" for player
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_ << no_exception() << no_msg_queue(),
+ Log_No_Transition() // no_transition handler
+ )) player_;
+#else
+ // but this definition is ok
+ struct player_ : public BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_ << no_exception() << no_msg_queue(), // configuration
+ Log_No_Transition() // no_transition handler
+ ))
+ {
+ };
+#endif
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+}
+
+#ifndef WIN32
+long mtime(struct timeval& tv1,struct timeval& tv2)
+{
+ return (tv2.tv_sec-tv1.tv_sec) *1000000 + ((tv2.tv_usec-tv1.tv_usec));
+}
+#endif
+
+
+int main()
+{
+ // for timing
+#ifdef WIN32
+ LARGE_INTEGER res;
+ ::QueryPerformanceFrequency(&res);
+ LARGE_INTEGER li,li2;
+#else
+ struct timeval tv1,tv2;
+ gettimeofday(&tv1,NULL);
+#endif
+
+ test_fsm::player p2;
+ p2.start();
+ // for timing
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li);
+#else
+ gettimeofday(&tv1,NULL);
+#endif
+ for (int i=0;i<100;++i)
+ {
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::cd_detected());
+ p2.process_event(test_fsm::play());
+ p2.process_event(test_fsm::pause());
+ // go back to Playing
+ p2.process_event(test_fsm::end_pause());
+ p2.process_event(test_fsm::pause());
+ p2.process_event(test_fsm::stop());
+ // event leading to the same state
+ p2.process_event(test_fsm::stop());
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::open_close());
+ }
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li2);
+#else
+ gettimeofday(&tv2,NULL);
+#endif
+#ifdef WIN32
+ std::cout << "msm took in s:" << (double)(li2.QuadPart-li.QuadPart)/res.QuadPart <<"\n" <<std::endl;
+#else
+ std::cout << "msm took in us:" << mtime(tv1,tv2) <<"\n" <<std::endl;
+#endif
+ return 0;
+}
+

Added: sandbox/msm/libs/msm/doc/Flags.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/Flags.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,243 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct NextSong {};
+ struct PreviousSong {};
+
+ // Flags. Allow information about a property of the current state
+ struct PlayingPaused{};
+ struct CDLoaded {};
+ struct FirstSongPlaying {};
+
+ // A "complicated" event type that carries some data.
+ struct cd_detected
+ {
+ cd_detected(std::string name)
+ : name(name)
+ {}
+
+ std::string name;
+ };
+
+ // front-end: define the FSM structure
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ };
+ struct Open : public msm::front::state<>
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ typedef mpl::vector1<CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ };
+
+ // the player state machine contains a state which is himself a state machine
+ // as you see, no need to declare it anywhere so Playing can be developed separately
+ // by another team in another module. For simplicity I just declare it inside player
+ struct Playing_ : public msm::front::state_machine_def<Playing_>
+ {
+ // when playing, the CD is loaded and we are in either pause or playing (duh)
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+
+ // The list of FSM states
+ struct Song1 : public msm::front::state<>
+ {
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
+
+ };
+ struct Song2 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
+ };
+ struct Song3 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Third Song" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef Song1 initial_state;
+ // transition actions
+ void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
+ void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
+ // guard conditions
+
+ typedef Playing_ pl; // makes transition table cleaner
+ // Transition table for Playing
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
+ a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
+ a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
+ a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // back-end
+ typedef msm::back::state_machine<Playing_> Playing;
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+
+ // transition actions
+ void start_playback(play const&) { std::cout << "player::start_playback\n"; }
+ void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
+ void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
+ void store_cd_info(cd_detected const& cd) {std::cout << "player::store_cd_info\n";}
+ void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
+ void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
+ void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
+ void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ // guard conditions
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // tests some flags
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ p.process_event(cd_detected("louie, louie"));
+ p.process_event(play());
+
+ // at this point, Play is active
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> true
+
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(NextSong());pstate(p); //2nd song active
+ p.process_event(NextSong());pstate(p);//3rd song active
+ p.process_event(PreviousSong());pstate(p);//2nd song active
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
+
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ p.process_event(pause()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ // go back to Playing
+ // as you see, it starts back from the original state
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
+
+ // event leading to the same state
+ p.process_event(stop()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/FlagsTutorial.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/FlagsTutorialEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/FlagsTutorialEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,202 @@
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// entry/exit/action/guard logging functors
+#include "logging_functors.h"
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play : euml_event<play>{};
+ struct end_pause : euml_event<end_pause>{};
+ struct stop : euml_event<stop>{};
+ struct pause : euml_event<pause>{};
+ struct open_close : euml_event<open_close>{};
+ struct next_song : euml_event<next_song>{};
+ struct previous_song : euml_event<previous_song>{};
+
+ // A "complicated" event type that carries some data.
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << std::string() << DiskTypeEnum() )) cd_detected_attributes;
+ struct cd_detected : euml_event<cd_detected>,cd_detected_attributes
+
+ {
+ cd_detected(){}
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ {
+ get_attribute<0>()=name;
+ get_attribute<1>()=diskType;
+ }
+ };
+
+ // Flags. Allow information about a property of the current state
+ struct PlayingPaused: euml_flag<PlayingPaused>{};
+ struct CDLoaded : euml_flag<CDLoaded>{};
+ struct FirstSongPlaying : euml_flag<FirstSongPlaying>{};
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+
+ typedef BOOST_TYPEOF(build_state(Empty_Entry(),Empty_Exit())) Empty;
+
+ typedef BOOST_TYPEOF(build_state( Open_Entry(),Open_Exit(),
+ attributes_ << no_attributes_,
+ configure_<< CDLoaded() )) Open;
+
+ typedef BOOST_TYPEOF(build_state( Stopped_Entry(),Stopped_Exit(),
+ attributes_ << no_attributes_,
+ configure_<< CDLoaded() )) Stopped;
+
+ // state not defining any entry or exit
+ typedef BOOST_TYPEOF(build_state(NoAction(),NoAction(),
+ attributes_ << no_attributes_,
+ configure_<< PlayingPaused() << CDLoaded() )) Paused;
+
+ // Playing is now a state machine itself.
+
+ // It has 3 substates
+ typedef BOOST_TYPEOF(build_state( Song1_Entry(),Song1_Exit(),
+ attributes_ << no_attributes_,
+ configure_<< FirstSongPlaying() )) Song1;
+
+ typedef BOOST_TYPEOF(build_state( Song2_Entry(),Song2_Exit() )) Song2;
+
+ typedef BOOST_TYPEOF(build_state( Song3_Entry(),Song3_Exit() )) Song3;
+
+
+ // Playing has a transition table
+ typedef BOOST_TYPEOF(build_stt(
+ // +------------------------------------------------------------------------------+
+ ( Song1() + next_song() == Song2() / start_next_song(),
+ Song2() + previous_song() == Song1() / start_prev_song(),
+ Song2() + next_song() == Song3() / start_next_song(),
+ Song3() + previous_song() == Song2() / start_prev_song()
+ // +------------------------------------------------------------------------------+
+ ) ) ) playing_transition_table;
+
+ // VC9 cannot compile the typedef with build_sm if one is also used for player
+#ifndef BOOST_MSVC
+ // create a state machine "on the fly" for Playing
+ typedef BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1() // Init State
+ )) Playing_;
+#else
+ // but this definition is ok
+ struct Playing_ : public BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1(), // Init State
+ NoAction(), // entry
+ NoAction(), // exit
+ attributes_ << no_attributes_, //attributes
+ configure_<< PlayingPaused() << CDLoaded() // Flags, Deferred events, configuration
+ ))
+ {
+ };
+#endif
+ // choice of back-end
+ typedef msm::back::state_machine<Playing_> Playing;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Stopped() + play() == Playing() / start_playback() ,
+ Stopped() + open_close() == Open() / open_drawer(),
+ Stopped() + stop() == Stopped(),
+ // +------------------------------------------------------------------------------+
+ Open() + open_close() == Empty() / close_drawer(),
+ // +------------------------------------------------------------------------------+
+ Empty() + open_close() == Open() / open_drawer(),
+ Empty() + cd_detected() == Stopped() [good_disk_format()&&(Event_<1>()==Int_<DISK_CD>())]
+ / (store_cd_info(),process_(play())),
+ // +------------------------------------------------------------------------------+
+ Playing() + stop() == Stopped() / stop_playback(),
+ Playing() + pause() == Paused() / pause_playback(),
+ Playing() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ Paused() + end_pause() == Playing() / resume_playback(),
+ Paused() + stop() == Stopped() / stop_playback(),
+ Paused() + open_close() == Open() / stop_and_open()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_<< no_configure_, // Flags, Deferred events, configuration
+ Log_No_Transition() // no_transition handler
+ )) player_;
+ // or simply, if no no_transition handler needed:
+ //typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ // Empty(), // Init State
+ // )) player_;
+
+ // choice of back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // tests some flags
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+
+ // at this point, Play is active
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> true
+
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(next_song());pstate(p); //2nd song active
+ p.process_event(next_song());pstate(p);//3rd song active
+ p.process_event(previous_song());pstate(p);//2nd song active
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
+
+ // event leading to the same state
+ // no action method called as none is defined in the transition table
+ p.process_event(stop()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/HarelWithEntry.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/HarelWithEntry.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,97 @@
+#include <iostream>
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace {
+ // events
+ struct AnyBtnPressed {};
+ struct AlarmBeeps30s {};
+ struct P1 {};
+ struct P2 {};
+ struct P {};
+ // Concrete FSM implementation
+ struct Clock_ : public msm::front::state_machine_def<Clock_>
+ {
+ struct Displays : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "Entering Displays"<< std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "Leaving Displays"<< std::endl;}
+ };
+ struct AlarmBeeps_ : public msm::front::state_machine_def<AlarmBeeps_>
+ {
+ // states
+ struct Alarm1Beeps : public msm::front::state<>, public msm::front::explicit_entry<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "Entering Alarm1Beeps"<< std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "Leaving Alarm1Beeps"<< std::endl;}
+ };
+ struct Alarm2Beeps : public msm::front::state<>, public msm::front::explicit_entry<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "Entering Alarm2Beeps"<< std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "Leaving Alarm2Beeps"<< std::endl;}
+ };
+ struct BothBeep : public msm::front::state<>, public msm::front::explicit_entry<0>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "Entering BothBeep"<< std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "Leaving BothBeep"<< std::endl;}
+ };
+
+ // the initial state of the AlarmBeeps SM. Must be defined. Will not be used as we use only explicit entries
+ typedef mpl::vector< Alarm1Beeps > initial_state;
+ // as we have no transition table, we need to create the states explicitly
+ typedef mpl::vector<Alarm1Beeps,Alarm2Beeps,BothBeep> explicit_creation;
+
+ // Transition table for AlarmBeeps. Can be empty as no transition defined
+ struct transition_table : mpl::vector<> {};
+ };
+ typedef msm::back::state_machine<AlarmBeeps_> AlarmBeeps;
+ // the initial state of the Clock SM. Must be defined
+ typedef Displays initial_state;
+ // Transition table for Clock
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +-----------+-------------+-------------------------+----------+----------------------+
+ _row < Displays , P1 , AlarmBeeps::direct<AlarmBeeps_::Alarm1Beeps> >,
+ _row < Displays , P2 , AlarmBeeps::direct<AlarmBeeps_::Alarm2Beeps> >,
+ _row < Displays , P , AlarmBeeps::direct<AlarmBeeps_::BothBeep> >,
+ _row < AlarmBeeps,AnyBtnPressed, Displays >,
+ _row < AlarmBeeps,AlarmBeeps30s, Displays >
+ // +-----------+-------------+--------------------------+----------+----------------------+
+ > {};
+ };
+ typedef msm::back::state_machine<Clock_> Clock;
+}
+
+void test()
+{
+ Clock sm;
+ sm.start();
+ std::cout << "Sending P1" << std::endl;
+ sm.process_event(P1());
+ std::cout << "Sending AnyBtnPressed" << std::endl;
+ sm.process_event(AnyBtnPressed());
+ std::cout << "Sending P2" << std::endl;
+ sm.process_event(P2());
+ std::cout << "Sending AnyBtnPressed" << std::endl;
+ sm.process_event(AnyBtnPressed());
+ std::cout << "Sending P" << std::endl;
+ sm.process_event(P());
+
+}
+int main()
+{
+ test();
+ return 0;
+}
+
+

Added: sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,107 @@
+#include <iostream>
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace {
+ // events
+ struct AnyBtnPressed {};
+ struct AlarmBeeps30s {};
+ struct P
+ {
+ P(int id):index(id){}
+ // the bit(s) of the corresponding alarm
+ int index;
+ };
+ // Concrete FSM implementation
+ struct Clock_ : public msm::front::state_machine_def<Clock_>
+ {
+ struct Displays : public msm::front::state<> {};
+ class AlarmBeeps_ : public msm::front::state_machine_def<AlarmBeeps_>
+ {
+ public:
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& fsm)
+ {
+ // let each orthogonal zone handle the event (can be handled by more than 1)
+ fsm.process_event(evt);
+ }
+
+ template <int Index>
+ struct Alarm_ : public msm::front::state_machine_def<Alarm_<Index> >
+ {
+ struct NoBeep : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "Entering NoBeep:"<< Index << std::endl;}
+ };
+ struct Beeps : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "Beeping alarm:"<< Index << std::endl;}
+ };
+ typedef Alarm_<Index> A; // makes transition table cleaner
+ // the initial state of the AlarmBeeps SM. Must be defined
+ typedef NoBeep initial_state;
+ // guard
+ bool check_beep(const P& evt)
+ {
+ // check if our bit is set in the event
+ return ((evt.index & Index)!=0);
+ }
+ // Transition table for AlarmBeeps
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+------------------------+----------------------+
+ g_row < NoBeep , P , Beeps ,&A::check_beep >
+ // +---------+-------------+---------+------------------------+----------------------+
+ > {};
+ };
+ typedef msm::back::state_machine<Alarm_<1> > Alarm1;
+ typedef msm::back::state_machine<Alarm_<2> > Alarm2;
+ // the initial state of the AlarmBeeps SM. Must be defined
+ typedef mpl::vector<Alarm1,Alarm2 > initial_state;
+
+ // Transition table for AlarmBeeps. Can be empty as no transition defined
+ struct transition_table : mpl::vector<> {};
+ };
+ typedef msm::back::state_machine<AlarmBeeps_> AlarmBeeps;
+ // the initial state of the Clock SM. Must be defined
+ typedef Displays initial_state;
+ // Transition table for Clock
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +-----------+-------------+------------+------------------------+----------------------+
+ _row < Displays , P , AlarmBeeps >,
+ _row < AlarmBeeps,AnyBtnPressed, Displays >,
+ _row < AlarmBeeps,AlarmBeeps30s, Displays >
+ // +-----------+-------------+------------+------------------------+----------------------+
+ > {};
+ };
+ typedef msm::back::state_machine<Clock_> Clock;
+}
+
+void test()
+{
+ Clock sm;
+ sm.start();
+ std::cout << "Sending P(1)" << std::endl;
+ sm.process_event(P(1));
+ std::cout << "Sending AnyBtnPressed" << std::endl;
+ sm.process_event(AnyBtnPressed());
+ std::cout << "Sending P(2)" << std::endl;
+ sm.process_event(P(2));
+ std::cout << "Sending AnyBtnPressed" << std::endl;
+ sm.process_event(AnyBtnPressed());
+ std::cout << "Sending P(3)" << std::endl;
+ sm.process_event(P(3));
+
+}
+int main()
+{
+ test();
+ return 0;
+}
+
+

Deleted: sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,110 +0,0 @@
-#include <vector>
-#include <iostream>
-#include <boost/mpl/vector/vector50.hpp>
-#include <boost/msm/state_machine.hpp>
-
-using namespace boost::msm;
-
-namespace {
- // events
- struct AnyBtnPressed {};
- struct AlarmBeeps30s {};
- struct P
- {
- P(int id):index(id){}
- // the bit(s) of the corresponding alarm
- int index;
- };
- // Concrete FSM implementation
- struct Clock : public state_machine<Clock>
- {
- struct Displays : public state<> {};
- class AlarmBeeps : public state_machine<AlarmBeeps>
- {
- public:
- template <class Event>
- void on_entry(Event const& evt)
- {
- // let each orthogonal zone handle the event (can be handled by more than 1)
- process_event(evt);
- }
- // g++ refuses to compile if the Alarm submachines are template
- struct AlarmImpl : public state_machine<AlarmImpl >
- {
- AlarmImpl(int index):Index(index){}
- struct NoBeep : public state<> {};
- struct Beeps : public state<> {};
- typedef AlarmImpl A; // makes transition table cleaner
- // the initial state of the AlarmBeeps SM. Must be defined
- typedef NoBeep initial_state;
- // guard
- bool check_beep(const P& evt)
- {
- bool beep = ((evt.index & Index)!=0);
- if (beep)
- std::cout << "Beeping alarm:"<< Index << std::endl;
- // check if our bit is set in the event
- return beep;
- }
- // Transition table for Alarm
- struct transition_table : mpl::vector<
- // Start Event Next Action Guard
- // +---------+-------------+---------+------------------------+----------------------+
- g_row < NoBeep , P , Beeps ,&A::check_beep >
- // +---------+-------------+---------+------------------------+----------------------+
- > {};
- private:
- int Index;
- };
- struct Alarm1 : public AlarmImpl
- {
- Alarm1():AlarmImpl(1){}
- };
- struct Alarm2 : public AlarmImpl
- {
- Alarm2():AlarmImpl(2){}
- };
-
- // the initial state of the AlarmBeeps SM. Must be defined
- typedef mpl::vector<Alarm1,Alarm2 > initial_state;
-
- // Transition table for AlarmBeeps. Can be empty as no transition defined
- struct transition_table : mpl::vector<> {};
- };
- // the initial state of the Clock SM. Must be defined
- typedef Displays initial_state;
- // Transition table for Clock
- struct transition_table : mpl::vector<
- // Start Event Next Action Guard
- // +-----------+-------------+------------+------------------------+----------------------+
- _row < Displays , P , AlarmBeeps >,
- _row < AlarmBeeps,AnyBtnPressed, Displays >,
- _row < AlarmBeeps,AlarmBeeps30s, Displays >
- // +-----------+-------------+------------+------------------------+----------------------+
- > {};
- };
-}
-
-void test()
-{
- Clock sm;
- sm.start();
- std::cout << "Sending P(1)" << std::endl;
- sm.process_event(P(1));
- std::cout << "Sending AnyBtnPressed" << std::endl;
- sm.process_event(AnyBtnPressed());
- std::cout << "Sending P(2)" << std::endl;
- sm.process_event(P(2));
- std::cout << "Sending AnyBtnPressed" << std::endl;
- sm.process_event(AnyBtnPressed());
- std::cout << "Sending P(3)" << std::endl;
- sm.process_event(P(3));
-
-}
-int main()
-{
- test();
- return 0;
-}
-
-

Added: sandbox/msm/libs/msm/doc/History.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/History.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,229 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct NextSong {};
+ struct PreviousSong {};
+
+ // A "complicated" event type that carries some data.
+ struct cd_detected
+ {
+ cd_detected(std::string name)
+ : name(name)
+ {}
+
+ std::string name;
+ };
+
+ // front-end: define the FSM structure
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ };
+ struct Open : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ };
+
+ // demonstrates Shallow History: if the state gets activated with end_pause
+ // then it will remember the last active state and reactivate it
+ // also possible: AlwaysHistory, the last active state will always be reactivated
+ // or NoHistory, always restart from the initial state
+ struct Playing_ : public msm::front::state_machine_def<Playing_>
+ {
+ // when playing, the CD is loaded and we are in either pause or playing (duh)
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+
+ // The list of FSM states
+ struct Song1 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
+ };
+ struct Song2 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
+ };
+ struct Song3 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Third Song" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef Song1 initial_state;
+ // transition actions
+ void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
+ void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
+ // guard conditions
+
+ typedef Playing_ pl; // makes transition table cleaner
+ // Transition table for Playing
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
+ a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
+ a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
+ a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+
+ };
+ // back-end
+ typedef msm::back::state_machine<Playing_,msm::back::ShallowHistory<mpl::vector<end_pause> > > Playing;
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Paused" << std::endl;}
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+
+ // transition actions
+ void start_playback(play const&) { std::cout << "player::start_playback\n"; }
+ void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
+ void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
+ void store_cd_info(cd_detected const& cd) {std::cout << "player::store_cd_info\n";}
+ void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
+ void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
+ void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
+ void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ // guard conditions
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ p.process_event(cd_detected("louie, louie"));
+ p.process_event(play());
+
+ // at this point, Play is active
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(NextSong());pstate(p); //2nd song active
+ p.process_event(NextSong());pstate(p);//3rd song active
+ p.process_event(PreviousSong());pstate(p);//2nd song active
+
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ // as you see, remembers the original state as end_pause is an history trigger
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ p.process_event(stop()); pstate(p);
+ // play does not trigger shallow history => start back from 1st song
+ p.process_event(play()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/HistoryEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/HistoryEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,175 @@
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// entry/exit/action/guard logging functors
+#include "logging_functors.h"
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play : euml_event<play>{};
+ struct end_pause : euml_event<end_pause>{};
+ struct stop : euml_event<stop>{};
+ struct pause : euml_event<pause>{};
+ struct open_close : euml_event<open_close>{};
+ struct next_song : euml_event<next_song>{};
+ struct previous_song : euml_event<previous_song>{};
+
+ // A "complicated" event type that carries some data.
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << std::string() << DiskTypeEnum() )) cd_detected_def;
+ struct cd_detected : euml_event<cd_detected>,cd_detected_def
+
+ {
+ cd_detected(){}
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ {
+ get_attribute<0>()=name;
+ get_attribute<1>()=diskType;
+ }
+ };
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+
+ typedef BOOST_TYPEOF(build_state(Empty_Entry(),Empty_Exit())) Empty;
+
+ typedef BOOST_TYPEOF(build_state( Open_Entry(),Open_Exit() )) Open;
+
+ typedef BOOST_TYPEOF(build_state( Stopped_Entry(),Stopped_Exit() )) Stopped;
+
+ // state not defining any entry or exit
+ typedef BOOST_TYPEOF(build_state( )) Paused;
+
+ // Playing is now a state machine itself.
+
+ // It has 3 substates
+ typedef BOOST_TYPEOF(build_state( Song1_Entry(),Song1_Exit() )) Song1;
+
+ typedef BOOST_TYPEOF(build_state( Song2_Entry(),Song2_Exit() )) Song2;
+
+ typedef BOOST_TYPEOF(build_state( Song3_Entry(),Song3_Exit() )) Song3;
+
+
+ // Playing has a transition table
+ typedef BOOST_TYPEOF(build_stt(
+ // +------------------------------------------------------------------------------+
+ ( Song1() + next_song() == Song2() / start_next_song(),
+ Song2() + previous_song() == Song1() / start_prev_song(),
+ Song2() + next_song() == Song3() / start_next_song(),
+ Song3() + previous_song() == Song2() / start_prev_song()
+ // +------------------------------------------------------------------------------+
+ ) ) ) playing_transition_table;
+
+ // VC9 cannot compile the typedef with build_sm if one is also used for player
+#ifndef BOOST_MSVC
+ // create a state machine "on the fly" for Playing
+ typedef BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1() // Init State
+ )) Playing_;
+#else
+ // but this definition is ok
+ struct Playing_ : public BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1() // Init State
+ ))
+ {
+ };
+#endif
+ // choice of back-end
+ typedef msm::back::state_machine<Playing_,msm::back::ShallowHistory<mpl::vector<end_pause> > > Playing;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Stopped() + play() == Playing() / start_playback() ,
+ Stopped() + open_close() == Open() / open_drawer(),
+ Stopped() + stop() == Stopped(),
+ // +------------------------------------------------------------------------------+
+ Open() + open_close() == Empty() / close_drawer(),
+ // +------------------------------------------------------------------------------+
+ Empty() + open_close() == Open() / open_drawer(),
+ Empty() + cd_detected() == Stopped() [good_disk_format()&&(Event_<1>()==Int_<DISK_CD>())]
+ / (store_cd_info(),process_(play())),
+ // +------------------------------------------------------------------------------+
+ Playing() + stop() == Stopped() / stop_playback(),
+ Playing() + pause() == Paused() / pause_playback(),
+ Playing() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ Paused() + end_pause() == Playing() / resume_playback(),
+ Paused() + stop() == Stopped() / stop_playback(),
+ Paused() + open_close() == Open() / stop_and_open()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_<< no_configure_, // Flags, Deferred events, configuration
+ Log_No_Transition() // no_transition handler
+ )) player_;
+ // or simply, if no no_transition handler needed:
+ //typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ // Empty(), // Init State
+ // )) player_;
+
+ // choice of back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(next_song());pstate(p); //2nd song active
+ p.process_event(next_song());pstate(p);//3rd song active
+ p.process_event(previous_song());pstate(p);//2nd song active
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ // as you see, remembers the original state as end_pause is an history trigger
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ // no action method called as none is defined in the transition table
+ p.process_event(stop()); pstate(p);
+ // test call to no_transition
+ p.process_event(play()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/HistoryTutorial.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/MsmComposite.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/MsmComposite.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,236 @@
+// MsmSimple.cpp : Defines the entry point for the console application.
+//
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+namespace mpl = boost::mpl;
+
+#include <iostream>
+#ifdef WIN32
+#include "windows.h"
+#else
+#include <sys/time.h>
+#endif
+
+namespace test_fsm // Concrete FSM implementation
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct cd_detected{};
+ struct NextSong {};
+ struct PreviousSong {};
+
+
+ // Concrete FSM implementation
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // no need for exception handling or message queue
+ typedef int no_exception_thrown;
+ typedef int no_message_queue;
+
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // optional entry/exit methods
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Empty" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
+ };
+ struct Open : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Open" << std::endl;*/}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Stopped" << std::endl;*/}
+ };
+
+ struct Playing_ : public msm::front::state_machine_def<Playing_>
+ {
+ // no need for exception handling or message queue
+ typedef int no_exception_thrown;
+ typedef int no_message_queue;
+
+ // The list of FSM states
+ struct Song1 : public msm::front::state<> {};
+ struct Song2 : public msm::front::state<> {};
+ struct Song3 : public msm::front::state<> {};
+ // the initial state. Must be defined
+ typedef Song1 initial_state;
+ // transition actions
+ void start_next_song(NextSong const&) { /*std::cout << "Playing::start_next_song\n";*/ }
+ void start_prev_song(PreviousSong const&) { /*std::cout << "Playing::start_prev_song\n"; */}
+ // guard conditions
+
+ typedef Playing_ pl; // makes transition table cleaner
+ // Transition table for Playing
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
+ a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
+ a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
+ a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<Playing_> Playing;
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Paused" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Paused" << std::endl;*/}
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+
+ // transition actions
+ void start_playback(play const&) { }
+ void open_drawer(open_close const&) { }
+ void close_drawer(open_close const&) { }
+ void store_cd_info(cd_detected const& cd) { }
+ void stop_playback(stop const&) { }
+ void pause_playback(pause const&) { }
+ void resume_playback(end_pause const&) { }
+ void stop_and_open(open_close const&) { }
+ void stopped_again(stop const&) {}
+ // guard conditions
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+}
+
+#ifndef WIN32
+long mtime(struct timeval& tv1,struct timeval& tv2)
+{
+ return (tv2.tv_sec-tv1.tv_sec) *1000000 + ((tv2.tv_usec-tv1.tv_usec));
+}
+#endif
+
+
+int main()
+{
+ // for timing
+#ifdef WIN32
+ LARGE_INTEGER res;
+ ::QueryPerformanceFrequency(&res);
+ LARGE_INTEGER li,li2;
+#else
+ struct timeval tv1,tv2;
+ gettimeofday(&tv1,NULL);
+#endif
+
+ test_fsm::player p2;
+ p2.start();
+ // for timing
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li);
+#else
+ gettimeofday(&tv1,NULL);
+#endif
+ for (int i=0;i<100;++i)
+ {
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::cd_detected());
+ p2.process_event(test_fsm::play());
+ for (int j=0;j<100;++j)
+ {
+ p2.process_event(test_fsm::NextSong());
+ p2.process_event(test_fsm::NextSong());
+ p2.process_event(test_fsm::PreviousSong());
+ p2.process_event(test_fsm::PreviousSong());
+ }
+
+ p2.process_event(test_fsm::pause());
+ // go back to Playing
+ p2.process_event(test_fsm::end_pause());
+ p2.process_event(test_fsm::pause());
+ p2.process_event(test_fsm::stop());
+ // event leading to the same state
+ p2.process_event(test_fsm::stop());
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::open_close());
+ }
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li2);
+#else
+ gettimeofday(&tv2,NULL);
+#endif
+#ifdef WIN32
+ std::cout << "msm took in s:" << (double)(li2.QuadPart-li.QuadPart)/res.QuadPart <<"\n" <<std::endl;
+#else
+ std::cout << "msm took in us:" << mtime(tv1,tv2) <<"\n" <<std::endl;
+#endif
+ return 0;
+}
+

Added: sandbox/msm/libs/msm/doc/MsmSession_Handout.pdf
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/MsmSimple.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/MsmSimple.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,192 @@
+// MsmSimple.cpp : Defines the entry point for the console application.
+//
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+namespace mpl = boost::mpl;
+
+#include <iostream>
+#ifdef WIN32
+#include "windows.h"
+#else
+#include <sys/time.h>
+#endif
+
+namespace test_fsm // Concrete FSM implementation
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct cd_detected{};
+
+ // Concrete FSM implementation
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // no need for exception handling or message queue
+ typedef int no_exception_thrown;
+ typedef int no_message_queue;
+
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // optional entry/exit methods
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Empty" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
+ };
+ struct Open : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Open" << std::endl;*/}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Stopped" << std::endl;*/}
+ };
+
+ struct Playing : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Playing" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Playing" << std::endl;*/}
+ };
+
+ struct Paused : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Paused" << std::endl;*/}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Paused" << std::endl;*/}
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+ // transition actions
+ void start_playback(play const&) { }
+ void open_drawer(open_close const&) { }
+ void close_drawer(open_close const&) { }
+ void store_cd_info(cd_detected const& cd) { }
+ void stop_playback(stop const&) { }
+ void pause_playback(pause const&) { }
+ void resume_playback(end_pause const&) { }
+ void stop_and_open(open_close const&) { }
+ void stopped_again(stop const&) {}
+ // guard conditions
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+}
+
+#ifndef WIN32
+long mtime(struct timeval& tv1,struct timeval& tv2)
+{
+ return (tv2.tv_sec-tv1.tv_sec) *1000000 + ((tv2.tv_usec-tv1.tv_usec));
+}
+#endif
+
+
+int main()
+{
+ // for timing
+#ifdef WIN32
+ LARGE_INTEGER res;
+ ::QueryPerformanceFrequency(&res);
+ LARGE_INTEGER li,li2;
+#else
+ struct timeval tv1,tv2;
+ gettimeofday(&tv1,NULL);
+#endif
+
+ test_fsm::player p2;
+ p2.start();
+ // for timing
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li);
+#else
+ gettimeofday(&tv1,NULL);
+#endif
+ for (int i=0;i<100;++i)
+ {
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::cd_detected());
+ p2.process_event(test_fsm::play());
+ p2.process_event(test_fsm::pause());
+ // go back to Playing
+ p2.process_event(test_fsm::end_pause());
+ p2.process_event(test_fsm::pause());
+ p2.process_event(test_fsm::stop());
+ // event leading to the same state
+ p2.process_event(test_fsm::stop());
+ p2.process_event(test_fsm::open_close());
+ p2.process_event(test_fsm::open_close());
+ }
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li2);
+#else
+ gettimeofday(&tv2,NULL);
+#endif
+#ifdef WIN32
+ std::cout << "msm took in s:" << (double)(li2.QuadPart-li.QuadPart)/res.QuadPart <<"\n" <<std::endl;
+#else
+ std::cout << "msm took in us:" << mtime(tv1,tv2) <<"\n" <<std::endl;
+#endif
+ return 0;
+}
+

Added: sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,292 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct NextSong {};
+ struct PreviousSong {};
+ struct error_found {};
+ struct end_error {};
+
+ // Flags. Allow information about a property of the current state
+ struct PlayingPaused{};
+ struct CDLoaded {};
+ struct FirstSongPlaying {};
+
+ // A "complicated" event type that carries some data.
+ struct cd_detected
+ {
+ cd_detected(std::string name)
+ : name(name)
+ {}
+
+ std::string name;
+ };
+
+ // front-end: define the FSM structure
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // if the play event arrives in this state, defer it until a state handles it or
+ // rejects it
+ typedef mpl::vector<play> deferred_events;
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ };
+ struct Open : public msm::front::state<>
+ {
+ // if the play event arrives in this state, defer it until a state handles it or
+ // rejects it
+ typedef mpl::vector<play> deferred_events;
+ typedef mpl::vector1<CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ typedef mpl::vector1<CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ };
+
+ // the player state machine contains a state which is himself a state machine
+ // as you see, no need to declare it anywhere so Playing can be developed separately
+ // by another team in another module. For simplicity I just declare it inside player
+ struct Playing_ : public msm::front::state_machine_def<Playing_>
+ {
+ // when playing, the CD is loaded and we are in either pause or playing (duh)
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+ // The list of FSM states
+ struct Song1 : public msm::front::state<>
+ {
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
+ };
+ struct Song2 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
+ };
+ struct Song3 : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Third Song" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef Song1 initial_state;
+ // transition actions
+ void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
+ void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
+ // guard conditions
+
+ typedef Playing_ pl; // makes transition table cleaner
+ // Transition table for Playing
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
+ a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
+ a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
+ a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // back-end
+ typedef msm::back::state_machine<Playing_> Playing;
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ };
+ struct AllOk : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: AllOk" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: AllOk" << std::endl;}
+ };
+ // this state is also made terminal so that all the events are blocked
+ struct ErrorMode : //public msm::front::terminate_state<> // ErrorMode terminates the state machine
+ public msm::front::interrupt_state<end_error> // ErroMode just interrupts. Will resume if
+ // the event end_error is generated
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: ErrorMode" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: ErrorMode" << std::endl;}
+ };
+ // the initial state of the player SM. Must be defined
+ typedef mpl::vector<Empty,AllOk> initial_state;
+
+ // transition actions
+ void start_playback(play const&) { std::cout << "player::start_playback\n"; }
+ void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
+ void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
+ void store_cd_info(cd_detected const& cd) {std::cout << "player::store_cd_info\n";}
+ void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
+ void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
+ void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
+ void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void report_error(error_found const&) {std::cout << "player::report_error\n";}
+ void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
+
+ // guard conditions
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < AllOk , error_found ,ErrorMode, &p::report_error >,
+ a_row <ErrorMode,end_error ,AllOk , &p::report_end_error >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode" };
+
+ void pstate(player const& p)
+ {
+ // we have now several active states, which we show
+ for (unsigned int i=0;i<player::nr_regions::value;++i)
+ {
+ std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
+ }
+ }
+
+ void test()
+ {
+ player p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // test deferred event
+ // deferred in Empty and Open, will be handled only after event cd_detected
+ p.process_event(play());
+
+ // tests some flags
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ p.process_event(cd_detected("louie, louie"));
+
+ // at this point, Play is active (was deferred)
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> true
+
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(NextSong());pstate(p); //2nd song active
+ p.process_event(NextSong());pstate(p);//3rd song active
+ p.process_event(PreviousSong());pstate(p);//2nd song active
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
+
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ p.process_event(pause()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ // go back to Playing
+ // as you see, it starts back from the original state
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
+ // by default, the flags are OR'ed but you can also use AND. Then the flag must be present in
+ // all of the active states
+ std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
+
+ // event leading to the same state
+ p.process_event(stop()); pstate(p);
+
+ // event leading to a terminal/interrupt state
+ p.process_event(error_found()); pstate(p);
+ // try generating more events
+ std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
+ p.process_event(play());pstate(p);
+ std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
+ p.process_event(end_error());pstate(p);
+ std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
+ p.process_event(play());pstate(p);
+
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/Orthogonal-deferred.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/OrthogonalDeferredEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/OrthogonalDeferredEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,242 @@
+#include <vector>
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// entry/exit/action/guard logging functors
+#include "logging_functors.h"
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play : euml_event<play>{};
+ struct end_pause : euml_event<end_pause>{};
+ struct stop : euml_event<stop>{};
+ struct pause : euml_event<pause>{};
+ struct open_close : euml_event<open_close>{};
+ struct next_song : euml_event<next_song>{};
+ struct previous_song : euml_event<previous_song>{};
+ struct end_error : euml_event<end_error> {};
+ struct error_found : euml_event<error_found> {};
+
+ // A "complicated" event type that carries some data.
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << std::string() << DiskTypeEnum() )) cd_detected_attr;
+ struct cd_detected : euml_event<cd_detected>,cd_detected_attr
+
+ {
+ cd_detected(){}
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ {
+ get_attribute<0>()=name;
+ get_attribute<1>()=diskType;
+ }
+ };
+
+ // Flags. Allow information about a property of the current state
+ struct PlayingPaused: euml_flag<PlayingPaused>{};
+ struct CDLoaded : euml_flag<CDLoaded>{};
+ struct FirstSongPlaying : euml_flag<FirstSongPlaying>{};
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+
+ typedef BOOST_TYPEOF(build_state(Empty_Entry(),Empty_Exit(),
+ attributes_ << no_attributes_,
+ configure_ << play() )) Empty; // defer play
+
+ typedef BOOST_TYPEOF(build_state( Open_Entry(),Open_Exit(),
+ attributes_ << no_attributes_,
+ configure_<< CDLoaded()<< play() // defer play, flag state with CDLoaded
+ )) Open;
+
+ typedef BOOST_TYPEOF(build_state( Stopped_Entry(),Stopped_Exit(),
+ attributes_ << no_attributes_,
+ configure_<< CDLoaded() )) Stopped; // flag state with CDLoaded
+
+ // state not defining any entry or exit
+ typedef BOOST_TYPEOF(build_state(NoAction(),NoAction(),
+ attributes_ << no_attributes_,
+ // defer play, flag state with CDLoaded and PlayingPaused
+ configure_<< PlayingPaused() << CDLoaded() )) Paused;
+
+ typedef BOOST_TYPEOF(build_state( AllOk_Entry(),AllOk_Exit() )) AllOk;
+
+ // a terminate state
+ //typedef BOOST_TYPEOF(build_terminate_state( ErrorMode_Entry(),ErrorMode_Exit() )) ErrorMode;
+ // or as an interrupt state
+ typedef BOOST_TYPEOF(build_interrupt_state( end_error(),ErrorMode_Entry(),ErrorMode_Exit() )) ErrorMode;
+
+
+ // Playing is now a state machine itself.
+
+ // It has 3 substates
+ typedef BOOST_TYPEOF(build_state( Song1_Entry(),Song1_Exit(),
+ attributes_ << no_attributes_,
+ configure_<< FirstSongPlaying() )) Song1;
+
+ typedef BOOST_TYPEOF(build_state( Song2_Entry(),Song2_Exit() )) Song2;
+
+ typedef BOOST_TYPEOF(build_state( Song3_Entry(),Song3_Exit() )) Song3;
+
+
+ // Playing has a transition table
+ typedef BOOST_TYPEOF(build_stt(
+ // +------------------------------------------------------------------------------+
+ ( Song1() + next_song() == Song2() / start_next_song(),
+ Song2() + previous_song() == Song1() / start_prev_song(),
+ Song2() + next_song() == Song3() / start_next_song(),
+ Song3() + previous_song() == Song2() / start_prev_song()
+ // +------------------------------------------------------------------------------+
+ ) ) ) playing_transition_table;
+
+ // VC9 cannot compile the typedef with build_sm if one is also used for player
+#ifndef BOOST_MSVC
+ // create a state machine "on the fly" for Playing
+ typedef BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1() // Init State
+ )) Playing_;
+#else
+ // but this definition is ok
+ struct Playing_ : public BOOST_TYPEOF(build_sm( playing_transition_table(), //STT
+ init_ << Song1(), // Init State
+ NoAction(), // entry
+ NoAction(), // exit
+ attributes_ << no_attributes_, //attributes
+ configure_<< PlayingPaused() << CDLoaded() //flags
+ ))
+ {
+ };
+#endif
+ // choice of back-end
+ typedef msm::back::state_machine<Playing_> Playing;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Stopped() + play() == Playing() / start_playback() ,
+ Stopped() + open_close() == Open() / open_drawer(),
+ Stopped() + stop() == Stopped(),
+ // +------------------------------------------------------------------------------+
+ Open() + open_close() == Empty() / close_drawer(),
+ // +------------------------------------------------------------------------------+
+ Empty() + open_close() == Open() / open_drawer(),
+ Empty() + cd_detected() == Stopped() [good_disk_format()&&(Event_<1>()==Int_<DISK_CD>())]
+ / store_cd_info(),
+ // +------------------------------------------------------------------------------+
+ Playing() + stop() == Stopped() / stop_playback(),
+ Playing() + pause() == Paused() / pause_playback(),
+ Playing() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ Paused() + end_pause() == Playing() / resume_playback(),
+ Paused() + stop() == Stopped() / stop_playback(),
+ Paused() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ AllOk() + error_found() == ErrorMode()/ report_error(),
+ ErrorMode()+ end_error() == AllOk() / report_end_error()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty() << AllOk(), // Init States
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_<< no_configure_, // Flags, Deferred events, configuration
+ Log_No_Transition() // no_transition handler
+ )) player_;
+ // or simply, if no no_transition handler needed:
+ //typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ // Empty(), // Init State
+ // )) player_;
+
+ // choice of back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode" };
+ void pstate(player const& p)
+ {
+ // we have now several active states, which we show
+ for (unsigned int i=0;i<player::nr_regions::value;++i)
+ {
+ std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
+ }
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // test deferred event
+ // deferred in Empty and Open, will be handled only after event cd_detected
+ p.process_event(play());
+
+ // tests some flags
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+
+ // at this point, Play is active
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> true
+
+ // make transition happen inside it. Player has no idea about this event but it's ok.
+ p.process_event(next_song());pstate(p); //2nd song active
+ p.process_event(next_song());pstate(p);//3rd song active
+ p.process_event(previous_song());pstate(p);//2nd song active
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
+ // by default, the flags are OR'ed but you can also use AND. Then the flag must be present in
+ // all of the active states
+ std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
+
+ // event leading to the same state
+ // no action method called as none is defined in the transition table
+ p.process_event(stop()); pstate(p);
+
+ // event leading to a terminal/interrupt state
+ p.process_event(error_found()); pstate(p);
+ // try generating more events
+ std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
+ p.process_event(play());pstate(p);
+ std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
+ p.process_event(end_error());pstate(p);
+ std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
+ p.process_event(play());pstate(p);
+
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/SC Composite.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SC Composite.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,197 @@
+#include <boost/statechart/event.hpp>
+#include <boost/statechart/state_machine.hpp>
+#include <boost/statechart/simple_state.hpp>
+#include <boost/statechart/transition.hpp>
+#include "boost/mpl/list.hpp"
+
+#include <vector>
+
+#include <iostream>
+#ifdef WIN32
+#include "windows.h"
+#else
+#include <sys/time.h>
+#endif
+
+namespace sc = boost::statechart;
+namespace mpl = boost::mpl;
+
+namespace test_sc
+{
+
+ //events
+ struct play : sc::event< play > {};
+ struct end_pause : sc::event< end_pause > {};
+ struct stop : sc::event< stop > {};
+ struct pause : sc::event< pause > {};
+ struct open_close : sc::event< open_close > {};
+ struct cd_detected : sc::event< cd_detected > {};
+ struct NextSong: sc::event< NextSong > {};
+ struct PreviousSong : sc::event< PreviousSong >{};
+
+ struct Empty;
+ struct Open;
+ struct Stopped;
+ struct Playing;
+ struct Paused;
+ // SM
+ struct player : sc::state_machine< player, Empty >
+ {
+ void open_drawer(open_close const&) { /*std::cout << "player::open_drawer\n";*/ }
+ void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ }
+ void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ }
+ void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ }
+ void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
+ void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ }
+ void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */}
+ void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ }
+ void resume_playback(end_pause const&) { /*std::cout << "player::resume_playback\n";*/ }
+ };
+
+ struct Empty : sc::simple_state< Empty, player >
+ {
+ Empty() { /*std::cout << "entering Empty" << std::endl;*/ } // entry
+ ~Empty() { /*std::cout << "leaving Empty" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< open_close, Open,
+ player, &player::open_drawer >,
+ sc::transition< cd_detected, Stopped,
+ player, &player::store_cd_info > > reactions;
+
+ };
+ struct Open : sc::simple_state< Open, player >
+ {
+ Open() { /*std::cout << "entering Open" << std::endl;*/ } // entry
+ ~Open() { /*std::cout << "leaving Open" << std::endl;*/ } // exit
+ typedef sc::transition< open_close, Empty,
+ player, &player::close_drawer > reactions;
+
+ };
+ struct Stopped : sc::simple_state< Stopped, player >
+ {
+ Stopped() { /*std::cout << "entering Stopped" << std::endl;*/ } // entry
+ ~Stopped() { /*std::cout << "leaving Stopped" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< play, Playing,
+ player, &player::start_playback >,
+ sc::transition< open_close, Open,
+ player, &player::open_drawer >,
+ sc::transition< stop, Stopped,
+ player, &player::stopped_again > > reactions;
+
+ };
+ struct Song1;
+ struct Playing : sc::simple_state< Playing, player,Song1 >
+ {
+ Playing() { /*std::cout << "entering Playing" << std::endl;*/ } // entry
+ ~Playing() { /*std::cout << "leaving Playing" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< stop, Stopped,
+ player, &player::stop_playback >,
+ sc::transition< pause, Paused,
+ player, &player::pause_playback >,
+ sc::transition< open_close, Open,
+ player, &player::stop_and_open > > reactions;
+ void start_next_song(NextSong const&) { /*std::cout << "Playing::start_next_song\n";*/ }
+ void start_prev_song(PreviousSong const&) { /*std::cout << "Playing::start_prev_song\n";*/ }
+ };
+ struct Song2;
+ struct Song1 : sc::simple_state< Song1, Playing >
+ {
+ Song1() { /*std::cout << "entering Song1" << std::endl;*/ } // entry
+ ~Song1() { /*std::cout << "leaving Song1" << std::endl;*/ } // exit
+ typedef sc::transition< NextSong, Song2,
+ Playing, &Playing::start_next_song > reactions;
+ };
+ struct Song3;
+ struct Song2 : sc::simple_state< Song2, Playing >
+ {
+ Song2() { /*std::cout << "entering Song2" << std::endl;*/ } // entry
+ ~Song2() { /*std::cout << "leaving Song2" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< NextSong, Song3,
+ Playing, &Playing::start_next_song >,
+ sc::transition< PreviousSong, Song1,
+ Playing, &Playing::start_prev_song > > reactions;
+ };
+ struct Song3 : sc::simple_state< Song3, Playing >
+ {
+ Song3() { /*std::cout << "entering Song3" << std::endl;*/ } // entry
+ ~Song3() { /*std::cout << "leaving Song3" << std::endl;*/ } // exit
+ typedef sc::transition< PreviousSong, Song2,
+ Playing, &Playing::start_prev_song > reactions;
+ };
+ struct Paused : sc::simple_state< Paused, player >
+ {
+ Paused() { /*std::cout << "entering Paused" << std::endl;*/ } // entry
+ ~Paused() { /*std::cout << "leaving Paused" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< end_pause, Playing,
+ player, &player::resume_playback >,
+ sc::transition< stop, Stopped,
+ player, &player::stop_playback >,
+ sc::transition< open_close, Open,
+ player, &player::stop_and_open > > reactions;
+ };
+}
+
+
+#ifndef WIN32
+long mtime(struct timeval& tv1,struct timeval& tv2)
+{
+ return (tv2.tv_sec-tv1.tv_sec) *1000000 + ((tv2.tv_usec-tv1.tv_usec));
+}
+#endif
+
+int main()
+{
+ test_sc::player p;
+ p.initiate();
+ // for timing
+#ifdef WIN32
+ LARGE_INTEGER res;
+ ::QueryPerformanceFrequency(&res);
+ LARGE_INTEGER li,li2;
+ ::QueryPerformanceCounter(&li);
+#else
+ struct timeval tv1,tv2;
+ gettimeofday(&tv1,NULL);
+#endif
+
+ for (int i=0;i<100;++i)
+ {
+ p.process_event(test_sc::open_close());
+ p.process_event(test_sc::open_close());
+ p.process_event(test_sc::cd_detected());
+ p.process_event(test_sc::play());
+ for (int j=0;j<100;++j)
+ {
+ p.process_event(test_sc::NextSong());
+ p.process_event(test_sc::NextSong());
+ p.process_event(test_sc::PreviousSong());
+ p.process_event(test_sc::PreviousSong());
+ }
+
+ p.process_event(test_sc::pause());
+ // go back to Playing
+ p.process_event(test_sc::end_pause());
+ p.process_event(test_sc::pause());
+ p.process_event(test_sc::stop());
+ // event leading to the same state
+ p.process_event(test_sc::stop());
+ p.process_event(test_sc::open_close());
+ p.process_event(test_sc::open_close());
+ }
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li2);
+#else
+ gettimeofday(&tv2,NULL);
+#endif
+#ifdef WIN32
+ std::cout << "sc took in s:" << (double)(li2.QuadPart-li.QuadPart)/res.QuadPart <<"\n" <<std::endl;
+#else
+ std::cout << "sc took in us:" << mtime(tv1,tv2) <<"\n" <<std::endl;
+#endif
+ return 0;
+}
+

Added: sandbox/msm/libs/msm/doc/SC Simple.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SC Simple.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,159 @@
+#include <boost/statechart/event.hpp>
+#include <boost/statechart/state_machine.hpp>
+#include <boost/statechart/simple_state.hpp>
+#include <boost/statechart/transition.hpp>
+#include "boost/mpl/list.hpp"
+
+#include <vector>
+
+#include <iostream>
+#ifdef WIN32
+#include "windows.h"
+#else
+#include <sys/time.h>
+#endif
+
+namespace sc = boost::statechart;
+namespace mpl = boost::mpl;
+
+namespace test_sc
+{
+
+ //events
+ struct play : sc::event< play > {};
+ struct end_pause : sc::event< end_pause > {};
+ struct stop : sc::event< stop > {};
+ struct pause : sc::event< pause > {};
+ struct open_close : sc::event< open_close > {};
+ struct cd_detected : sc::event< cd_detected > {};
+
+
+ struct Empty;
+ struct Open;
+ struct Stopped;
+ struct Playing;
+ struct Paused;
+ // SM
+ struct player : sc::state_machine< player, Empty >
+ {
+ void open_drawer(open_close const&) { /*std::cout << "player::open_drawer\n";*/ }
+ void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ }
+ void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ }
+ void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ }
+ void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
+ void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ }
+ void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */}
+ void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ }
+ void resume_playback(end_pause const&) { /*std::cout << "player::resume_playback\n";*/ }
+ };
+
+ struct Empty : sc::simple_state< Empty, player >
+ {
+ Empty() { /*std::cout << "entering Empty" << std::endl;*/ } // entry
+ ~Empty() { /*std::cout << "leaving Empty" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< open_close, Open,
+ player, &player::open_drawer >,
+ sc::transition< cd_detected, Stopped,
+ player, &player::store_cd_info > > reactions;
+
+ };
+ struct Open : sc::simple_state< Open, player >
+ {
+ Open() { /*std::cout << "entering Open" << std::endl;*/ } // entry
+ ~Open() { /*std::cout << "leaving Open" << std::endl;*/ } // exit
+ typedef sc::transition< open_close, Empty,
+ player, &player::close_drawer > reactions;
+
+ };
+ struct Stopped : sc::simple_state< Stopped, player >
+ {
+ Stopped() { /*std::cout << "entering Stopped" << std::endl;*/ } // entry
+ ~Stopped() { /*std::cout << "leaving Stopped" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< play, Playing,
+ player, &player::start_playback >,
+ sc::transition< open_close, Open,
+ player, &player::open_drawer >,
+ sc::transition< stop, Stopped,
+ player, &player::stopped_again > > reactions;
+
+ };
+ struct Playing : sc::simple_state< Playing, player >
+ {
+ Playing() { /*std::cout << "entering Playing" << std::endl;*/ } // entry
+ ~Playing() { /*std::cout << "leaving Playing" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< stop, Stopped,
+ player, &player::stop_playback >,
+ sc::transition< pause, Paused,
+ player, &player::pause_playback >,
+ sc::transition< open_close, Open,
+ player, &player::stop_and_open > > reactions;
+ };
+ struct Paused : sc::simple_state< Paused, player >
+ {
+ Paused() { /*std::cout << "entering Paused" << std::endl;*/ } // entry
+ ~Paused() { /*std::cout << "leaving Paused" << std::endl;*/ } // exit
+ typedef mpl::list<
+ sc::transition< end_pause, Playing,
+ player, &player::resume_playback >,
+ sc::transition< stop, Stopped,
+ player, &player::stop_playback >,
+ sc::transition< open_close, Open,
+ player, &player::stop_and_open > > reactions;
+ };
+}
+
+
+#ifndef WIN32
+long mtime(struct timeval& tv1,struct timeval& tv2)
+{
+ return (tv2.tv_sec-tv1.tv_sec) *1000000 + ((tv2.tv_usec-tv1.tv_usec));
+}
+#endif
+
+
+int main()
+{
+ test_sc::player p;
+ p.initiate();
+ // for timing
+#ifdef WIN32
+ LARGE_INTEGER res;
+ ::QueryPerformanceFrequency(&res);
+ LARGE_INTEGER li,li2;
+ ::QueryPerformanceCounter(&li);
+#else
+ struct timeval tv1,tv2;
+ gettimeofday(&tv1,NULL);
+#endif
+ for (int i=0;i<100;++i)
+ {
+ p.process_event(test_sc::open_close());
+ p.process_event(test_sc::open_close());
+ p.process_event(test_sc::cd_detected());
+ p.process_event(test_sc::play());
+ p.process_event(test_sc::pause());
+ // go back to Playing
+ p.process_event(test_sc::end_pause());
+ p.process_event(test_sc::pause());
+ p.process_event(test_sc::stop());
+ // event leading to the same state
+ p.process_event(test_sc::stop());
+ p.process_event(test_sc::open_close());
+ p.process_event(test_sc::open_close());
+ }
+#ifdef WIN32
+ ::QueryPerformanceCounter(&li2);
+#else
+ gettimeofday(&tv2,NULL);
+#endif
+#ifdef WIN32
+ std::cout << "sc took in s:" << (double)(li2.QuadPart-li.QuadPart)/res.QuadPart <<"\n" <<std::endl;
+#else
+ std::cout << "sc took in us:" << mtime(tv1,tv2) <<"\n" <<std::endl;
+#endif
+ return 0;
+}
+

Deleted: sandbox/msm/libs/msm/doc/SM-0arg.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM-0arg.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,470 +0,0 @@
-#include <vector>
-#include <iostream>
-#include <string>
-#include <boost/mpl/vector/vector50.hpp>
-#include <boost/msm/state_machine.hpp>
-#include <boost/msm/tools.hpp>
-
-using namespace boost::msm;
-using namespace std;
-
-namespace // Concrete FSM implementation
-{
- // events
- struct play {};
- struct end_pause {};
- struct stop {};
- struct pause {};
- struct open_close {};
- struct NextSong {};
- struct PreviousSong {};
- struct ThreeSec {};
- struct TenSec {};
- struct go_sleep {};
- struct error_found {};
- struct end_error {};
-
- // Flags. Allow information about a property of the current state
- struct PlayingPaused{};
- struct CDLoaded {};
- struct FirstSongPlaying {};
-
- // A "complicated" event type that carries some data.
- // forward
- struct player;
- struct cd_detected
- {
- cd_detected(std::string name, player& p)
- : name(name)
- , m_player(p)
- {}
-
- std::string name;
- player& m_player;
- };
-
- // overwrite of the base state (not default)
- struct my_visitable_state
- {
- // signature of the accept function
- typedef args<void> accept_sig;
-
- // we also want polymorphic states
- virtual ~my_visitable_state() {}
- // default implementation for states who do not need to be visited
- void accept() const {}
- };
-
- // Concrete FSM implementation
- struct player : public state_machine<player,NoHistory,my_visitable_state>
- {
- // The list of FSM states
- struct Empty : public state<my_visitable_state>
- {
- typedef mpl::vector<play> deferred_events;
- // every (optional) entry/exit methods get the event packed as boost::any. Not useful very often.
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Empty" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Empty" << std::endl;}
- void accept() const
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- }
- };
- struct Open : public state<my_visitable_state>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
- typedef mpl::vector<play> deferred_events;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Open" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Open" << std::endl;}
- void accept() const
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- }
- };
- // a state needing a pointer to the containing state machine
- // and using for this the non-default policy
- // if policy used, set_sm_ptr is needed
- struct Stopped : public state<my_visitable_state,SMPtr>
- {
- // when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Stopped" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Stopped" << std::endl;}
- void set_sm_ptr(player* pl){m_player=pl;}
- player* m_player;
- };
- // the player state machine contains a state which is himself a state machine
- // it demonstrates Shallow History: if the state gets activated with end_pause
- // then it will remember the last active state and reactivate it
- // also possible: AlwaysHistory, the last active state will always be reactivated
- // or NoHistory, always restart from the initial state
- struct Playing : public state_machine<Playing,ShallowHistory<mpl::vector<end_pause> >,my_visitable_state >
- {
- // when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Playing" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Playing" << std::endl;}
- void accept()
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- // visit substates
- visit_current_states();
- }
- // The list of FSM states
- // the Playing state machine contains a state which is himself a state machine
- // so we have a SM containing a SM containing a SM
- struct Song1 : public state_machine<Song1,NoHistory,my_visitable_state>
- {
- typedef mpl::vector1<FirstSongPlaying> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: First song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: First Song" << std::endl;}
- void accept()
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- }
- struct LightOn : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOn" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOn" << std::endl;}
- };
- struct LightOff : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOff" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOff" << std::endl;}
- };
- // the initial state. Must be defined
- typedef LightOn initial_state;
- // transition actions
- void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
- // guard conditions
-
- typedef Song1 s; // makes transition table cleaner
- // Transition table for Song1
- struct transition_table : mpl::vector1<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
-
- };
- struct Song2 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Second song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Second Song" << std::endl;}
- };
- struct Song3 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Third song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Third Song" << std::endl;}
- };
- // the initial state. Must be defined
- typedef Song1 initial_state;
- // transition actions
- void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
- void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
- // guard conditions
-
- typedef Playing pl; // makes transition table cleaner
- // Transition table for Playing
- struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
- a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
- a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
- a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const&)
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
- struct Paused : public state_machine<Paused,NoHistory,my_visitable_state>
- {
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Paused" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Paused" << std::endl;}
-
- // The list of FSM states
- struct StartBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StartBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StartBlinking" << std::endl;}
- };
- struct StopBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StopBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StopBlinking" << std::endl;}
- };
- // the initial state. Must be defined
- typedef StartBlinking initial_state;
- // transition actions
- void start_blinking(TenSec const&) { std::cout << "Paused::start_blinking\n"; }
- void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
- // guard conditions
-
- typedef Paused pa; // makes transition table cleaner
- // Transition table
- struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
- // +---------------+-------------+--------------+---------------------+----------------------+
- a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
- a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
- // +---------------+-------------+---------------+--------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- struct SleepMode : public state<my_visitable_state> {}; // dumy state just to test the automatic id generation
-
- struct AllOk : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: AllOk" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: AllOk" << std::endl;}
- };
- struct ErrorMode : //public terminate_state<>
- public interrupt_state<end_error,my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: ErrorMode" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: ErrorMode" << std::endl;}
- };
-
- // the initial state of the player SM. Must be defined
- typedef mpl::vector<Empty,AllOk> initial_state;
- //typedef Empty initial_state; // this is to have only one active state
-
-#ifdef __MWERKS__
- public: // Codewarrior bug workaround. Tested at 0x3202
-#endif
- // transition actions
- void start_playback(play const&) { std::cout << "player::start_playback\n"; }
- void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
- void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
- void store_cd_info(cd_detected const&)
- {
- std::cout << "player::store_cd_info\n";
- // generate another event to test the queue
- //cd.m_player.process_event(play());
- }
- void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
- void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
- void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
- void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
- void start_sleep(go_sleep const&) { }
- void report_error(error_found const&) {std::cout << "player::report_error\n";}
- void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
- // guard conditions
-
-
-#ifdef __MWERKS__
- private:
-#endif
- typedef player p; // makes transition table cleaner
-
- // Transition table for player
- struct transition_table : mpl::vector<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Stopped , play , Playing , &p::start_playback >,
- a_row < Stopped , open_close , Open , &p::open_drawer >,
- a_row < Stopped , stop , Stopped , &p::stopped_again >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Open , open_close , Empty , &p::close_drawer >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Empty , open_close , Open , &p::open_drawer >,
- a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Playing , stop , Stopped , &p::stop_playback >,
- a_row < Playing , pause , Paused , &p::pause_playback >,
- a_row < Playing , open_close , Open , &p::stop_and_open >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Paused , end_pause , Playing , &p::resume_playback >,
- a_row < Paused , stop , Stopped , &p::stop_playback >,
- a_row < Paused , open_close , Open , &p::stop_and_open >,
- a_row < Paused , go_sleep ,SleepMode, &p::start_sleep >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < AllOk , error_found ,ErrorMode, &p::report_error >,
- a_row <ErrorMode,end_error ,AllOk , &p::report_end_error >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
-
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
-
- //
- // Testing utilities.
- //
-
- void pstate(player const& p)
- {
- // instead of the hard-coded array we can use fill_state_names:
- //static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode","SleepMode" };
- typedef player::transition_table stt;
- typedef generate_state_set<stt>::type all_states;
- static char const* state_names[mpl::size<all_states>::value];
- // fill the names of the states defined in the state machine
- mpl::for_each<all_states,boost::msm::wrap<mpl::placeholders::_1> >(fill_state_names<stt>(state_names));
-
- for (unsigned int i=0;i<p.current_state().size();++i)
- {
- std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
- }
- }
- void test()
- {
- player p;
- // get a pointer to a state
- // just to show how to do it as Stopped gets a pointer to player anyway
- player::Stopped* tempstate = p.get_state<player::Stopped*>();
- tempstate->m_player = &p;
- // get a reference to a state
- player::Stopped& tempstate2 = p.get_state<player::Stopped&>();
- tempstate2.m_player = &p;
- // make a copy of a state
- player::Stopped tempstate3 = p.get_state<player::Stopped&>();
-
- // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
- p.start();
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
-
- // test deferred event
- // deferred in Empty and Open, will be handled only after event cd_detected
- p.process_event(play());
-
- // go to Open, call on_exit on Empty, then action, then on_entry on Open
- p.process_event(open_close()); pstate(p);
- // visiting Paused and AllOk, but only Paused cares
- p.visit_current_states();
- p.process_event(open_close()); pstate(p);
- // visiting Empty and AllOk, but only Empty cares
- p.visit_current_states();
-
-
- p.process_event(cd_detected("louie, louie",p));
- // no need to call play() as the previous event does it in its action method
- //p.process_event(play());
- // at this point, Play is active, along FirstSong and LightOn
- pstate(p);
- // visiting Playing+Song1 and AllOk, but only Playing+Song1 care
- p.visit_current_states();
-
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // call on_exit on LightOn,FirstSong,Play like stated in the UML spec.
- // and of course on_entry on Paused and StartBlinking
- p.process_event(pause()); pstate(p);
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // forward events to Paused
- p.process_event(TenSec());
- p.process_event(TenSec());
- // go back to Playing
- p.process_event(end_pause()); pstate(p);
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl; //=> true
- p.process_event(ThreeSec()); pstate(p);
- p.process_event(NextSong());pstate(p);
- // We are now in second song, Flag inactive
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- // visiting Playing+Song2 and AllOk, but only Playing cares
- p.visit_current_states();
-
- p.process_event(NextSong());pstate(p);
- // 2nd song active
- p.process_event(PreviousSong());pstate(p);
- // Pause
- p.process_event(pause()); pstate(p);
- // go back to Playing
- // but end_pause is an event activating the History
- // => keep the last active State (SecondSong)
- p.process_event(end_pause()); pstate(p);
- // test of an event from a state to itself. According to UML spec, call again exit/entry from Stopped
- p.process_event(stop()); pstate(p);
- p.process_event(stop()); pstate(p);
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
- std::cout << "CDLoaded active with OR:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_OR>() << std::endl;//=> true
-
- // go back to Playing
- // but play is not leading to Shallow History => do not remember the last active State (SecondSong)
- // and activate again FirstSong and LightOn
- p.process_event(play()); pstate(p);
- p.process_event(error_found()); pstate(p);
-
- // try generating more events
- std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(end_error());pstate(p);
- std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Simulate error. Event play is not valid" << std::endl;
- p.process_event(play()); pstate(p);
- }
-}
-
-int main()
-{
- test();
- return 0;
-}
-
-

Deleted: sandbox/msm/libs/msm/doc/SM-1arg.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM-1arg.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,480 +0,0 @@
-#include <vector>
-#include <iostream>
-#include <string>
-#include <boost/mpl/vector/vector50.hpp>
-#include <boost/msm/state_machine.hpp>
-#include <boost/msm/tools.hpp>
-
-using namespace boost::msm;
-using namespace std;
-
-namespace // Concrete FSM implementation
-{
- // events
- struct play {};
- struct end_pause {};
- struct stop {};
- struct pause {};
- struct open_close {};
- struct NextSong {};
- struct PreviousSong {};
- struct ThreeSec {};
- struct TenSec {};
- struct go_sleep {};
- struct error_found {};
- struct end_error {};
-
- // Flags. Allow information about a property of the current state
- struct PlayingPaused{};
- struct CDLoaded {};
- struct FirstSongPlaying {};
-
- // A "complicated" event type that carries some data.
- // forward
- struct player;
- struct cd_detected
- {
- cd_detected(std::string name, player& p)
- : name(name)
- , m_player(p)
- {}
-
- std::string name;
- player& m_player;
- };
-
- // an easy visitor
- struct SomeVisitor
- {
- template <class T>
- void visit_state(T* astate)
- {
- std::cout << "visiting state:" << typeid(*astate).name() << std::endl;
- }
- };
- // overwrite of the base state (not default)
- struct my_visitable_state
- {
- // signature of the accept function
- typedef args<void,SomeVisitor&> accept_sig;
-
- // we also want polymorphic states
- virtual ~my_visitable_state() {}
- // default implementation for states who do not need to be visited
- void accept(SomeVisitor&) const {}
- };
-
- // Concrete FSM implementation
- struct player : public state_machine<player,NoHistory,my_visitable_state>
- {
- // The list of FSM states
- struct Empty : public state<my_visitable_state>
- {
- typedef mpl::vector<play> deferred_events;
- // every (optional) entry/exit methods get the event packed as boost::any. Not useful very often.
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Empty" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Empty" << std::endl;}
- void accept(SomeVisitor& vis) const
- {
- vis.visit_state(this);
- }
- };
- struct Open : public state<my_visitable_state>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
- typedef mpl::vector<play> deferred_events;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Open" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Open" << std::endl;}
- void accept(SomeVisitor& vis) const
- {
- vis.visit_state(this);
- }
- };
- // a state needing a pointer to the containing state machine
- // and using for this the non-default policy
- // if policy used, set_sm_ptr is needed
- struct Stopped : public state<my_visitable_state,SMPtr>
- {
- // when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Stopped" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Stopped" << std::endl;}
- void set_sm_ptr(player* pl){m_player=pl;}
- player* m_player;
- };
- // the player state machine contains a state which is himself a state machine
- // it demonstrates Shallow History: if the state gets activated with end_pause
- // then it will remember the last active state and reactivate it
- // also possible: AlwaysHistory, the last active state will always be reactivated
- // or NoHistory, always restart from the initial state
- struct Playing : public state_machine<Playing,ShallowHistory<mpl::vector<end_pause> >,my_visitable_state >
- {
- // when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Playing" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Playing" << std::endl;}
- void accept(SomeVisitor& vis)
- {
- vis.visit_state(this);
- // visit substates
- visit_current_states(vis);
- }
- // The list of FSM states
- // the Playing state machine contains a state which is himself a state machine
- // so we have a SM containing a SM containing a SM
- struct Song1 : public state_machine<Song1,NoHistory,my_visitable_state>
- {
- typedef mpl::vector1<FirstSongPlaying> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: First song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: First Song" << std::endl;}
- void accept(SomeVisitor& vis)
- {
- vis.visit_state(this);
- }
- struct LightOn : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOn" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOn" << std::endl;}
- };
- struct LightOff : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOff" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOff" << std::endl;}
- };
- // the initial state. Must be defined
- typedef LightOn initial_state;
- // transition actions
- void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
- // guard conditions
-
- typedef Song1 s; // makes transition table cleaner
- // Transition table for Song1
- struct transition_table : mpl::vector1<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
-
- };
- struct Song2 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Second song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Second Song" << std::endl;}
- };
- struct Song3 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Third song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Third Song" << std::endl;}
- };
- // the initial state. Must be defined
- typedef Song1 initial_state;
- // transition actions
- void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
- void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
- // guard conditions
-
- typedef Playing pl; // makes transition table cleaner
- // Transition table for Playing
- struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
- a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
- a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
- a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const&)
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
- struct Paused : public state_machine<Paused,NoHistory,my_visitable_state>
- {
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Paused" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Paused" << std::endl;}
-
- // The list of FSM states
- struct StartBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StartBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StartBlinking" << std::endl;}
- };
- struct StopBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StopBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StopBlinking" << std::endl;}
- };
- // the initial state. Must be defined
- typedef StartBlinking initial_state;
- // transition actions
- void start_blinking(TenSec const&) { std::cout << "Paused::start_blinking\n"; }
- void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
- // guard conditions
-
- typedef Paused pa; // makes transition table cleaner
- // Transition table
- struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
- // +---------------+-------------+--------------+---------------------+----------------------+
- a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
- a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
- // +---------------+-------------+---------------+--------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- struct SleepMode : public state<my_visitable_state> {}; // dumy state just to test the automatic id generation
-
- struct AllOk : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: AllOk" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: AllOk" << std::endl;}
- };
- struct ErrorMode : //public terminate_state<>
- public interrupt_state<end_error,my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: ErrorMode" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: ErrorMode" << std::endl;}
- };
-
- // the initial state of the player SM. Must be defined
- typedef mpl::vector<Empty,AllOk> initial_state;
- //typedef Empty initial_state; // this is to have only one active state
-
-#ifdef __MWERKS__
- public: // Codewarrior bug workaround. Tested at 0x3202
-#endif
- // transition actions
- void start_playback(play const&) { std::cout << "player::start_playback\n"; }
- void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
- void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
- void store_cd_info(cd_detected const&)
- {
- std::cout << "player::store_cd_info\n";
- // generate another event to test the queue
- //cd.m_player.process_event(play());
- }
- void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
- void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
- void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
- void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
- void start_sleep(go_sleep const&) { }
- void report_error(error_found const&) {std::cout << "player::report_error\n";}
- void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
- // guard conditions
-
-
-#ifdef __MWERKS__
- private:
-#endif
- typedef player p; // makes transition table cleaner
-
- // Transition table for player
- struct transition_table : mpl::vector<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Stopped , play , Playing , &p::start_playback >,
- a_row < Stopped , open_close , Open , &p::open_drawer >,
- a_row < Stopped , stop , Stopped , &p::stopped_again >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Open , open_close , Empty , &p::close_drawer >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Empty , open_close , Open , &p::open_drawer >,
- a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Playing , stop , Stopped , &p::stop_playback >,
- a_row < Playing , pause , Paused , &p::pause_playback >,
- a_row < Playing , open_close , Open , &p::stop_and_open >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Paused , end_pause , Playing , &p::resume_playback >,
- a_row < Paused , stop , Stopped , &p::stop_playback >,
- a_row < Paused , open_close , Open , &p::stop_and_open >,
- a_row < Paused , go_sleep ,SleepMode, &p::start_sleep >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < AllOk , error_found ,ErrorMode, &p::report_error >,
- a_row <ErrorMode,end_error ,AllOk , &p::report_end_error >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
-
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
-
- //
- // Testing utilities.
- //
-
- void pstate(player const& p)
- {
- // instead of the hard-coded array we can use fill_state_names:
- //static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode","SleepMode" };
- typedef player::transition_table stt;
- typedef generate_state_set<stt>::type all_states;
- static char const* state_names[mpl::size<all_states>::value];
- // fill the names of the states defined in the state machine
- mpl::for_each<all_states,boost::msm::wrap<mpl::placeholders::_1> >(fill_state_names<stt>(state_names));
-
- for (unsigned int i=0;i<p.current_state().size();++i)
- {
- std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
- }
- }
- void test()
- {
- player p;
- // get a pointer to a state
- // just to show how to do it as Stopped gets a pointer to player anyway
- player::Stopped* tempstate = p.get_state<player::Stopped*>();
- tempstate->m_player = &p;
- // get a reference to a state
- player::Stopped& tempstate2 = p.get_state<player::Stopped&>();
- tempstate2.m_player = &p;
- // make a copy of a state
- player::Stopped tempstate3 = p.get_state<player::Stopped&>();
-
- // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
- p.start();
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
-
- // test deferred event
- // deferred in Empty and Open, will be handled only after event cd_detected
- p.process_event(play());
-
- // go to Open, call on_exit on Empty, then action, then on_entry on Open
- p.process_event(open_close()); pstate(p);
- // visiting Paused and AllOk, but only Paused cares
- SomeVisitor vis;
- p.visit_current_states(boost::ref(vis));
- p.process_event(open_close()); pstate(p);
- // visiting Empty and AllOk, but only Empty cares
- p.visit_current_states(boost::ref(vis));
-
-
- p.process_event(cd_detected("louie, louie",p));
- // no need to call play() as the previous event does it in its action method
- //p.process_event(play());
- // at this point, Play is active, along FirstSong and LightOn
- pstate(p);
- // visiting Playing+Song1 and AllOk, but only Playing+Song1 care
- p.visit_current_states(boost::ref(vis));
-
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // call on_exit on LightOn,FirstSong,Play like stated in the UML spec.
- // and of course on_entry on Paused and StartBlinking
- p.process_event(pause()); pstate(p);
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // forward events to Paused
- p.process_event(TenSec());
- p.process_event(TenSec());
- // go back to Playing
- p.process_event(end_pause()); pstate(p);
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl; //=> true
- p.process_event(ThreeSec()); pstate(p);
- p.process_event(NextSong());pstate(p);
- // We are now in second song, Flag inactive
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- // visiting Playing+Song2 and AllOk, but only Playing cares
- p.visit_current_states(vis);
-
- p.process_event(NextSong());pstate(p);
- // 2nd song active
- p.process_event(PreviousSong());pstate(p);
- // Pause
- p.process_event(pause()); pstate(p);
- // go back to Playing
- // but end_pause is an event activating the History
- // => keep the last active State (SecondSong)
- p.process_event(end_pause()); pstate(p);
- // test of an event from a state to itself. According to UML spec, call again exit/entry from Stopped
- p.process_event(stop()); pstate(p);
- p.process_event(stop()); pstate(p);
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
- std::cout << "CDLoaded active with OR:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_OR>() << std::endl;//=> true
-
- // go back to Playing
- // but play is not leading to Shallow History => do not remember the last active State (SecondSong)
- // and activate again FirstSong and LightOn
- p.process_event(play()); pstate(p);
- p.process_event(error_found()); pstate(p);
-
- // try generating more events
- std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(end_error());pstate(p);
- std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Simulate error. Event play is not valid" << std::endl;
- p.process_event(play()); pstate(p);
- }
-}
-
-int main()
-{
- test();
- return 0;
-}
-
-

Added: sandbox/msm/libs/msm/doc/SM-2Arg.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SM-2Arg.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,457 @@
+#include <iostream>
+#include <string>
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+#include <boost/msm/back/tools.hpp>
+
+using namespace std;
+namespace msm = boost::msm;
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+ struct NextSong {};
+ struct PreviousSong {};
+ struct ThreeSec {};
+ struct TenSec {};
+ struct go_sleep {};
+ struct error_found {};
+ struct end_error {};
+
+ // Flags. Allow information about a property of the current state
+ struct PlayingPaused{};
+ struct CDLoaded {};
+ struct FirstSongPlaying {};
+
+ // A "complicated" event type that carries some data.
+ struct cd_detected
+ {
+ cd_detected(std::string name)
+ : name(name)
+ {}
+
+ std::string name;
+ };
+ // an easy visitor
+ struct SomeVisitor
+ {
+ template <class T>
+ void visit_state(T* astate,int i)
+ {
+ std::cout << "visiting state:" << typeid(*astate).name()
+ << " with data:" << i << std::endl;
+ }
+ };
+ // overwrite of the base state (not default)
+ struct my_visitable_state
+ {
+ // signature of the accept function
+ typedef msm::back::args<void,SomeVisitor&,int> accept_sig;
+
+ // we also want polymorphic states
+ virtual ~my_visitable_state() {}
+ // default implementation for states who do not need to be visited
+ void accept(SomeVisitor&,int) const {}
+ };
+
+ // Concrete FSM implementation
+ struct player_ : public msm::front::state_machine_def<player_,my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: player" << std::endl;}
+ // The list of FSM states
+ struct Empty : public msm::front::state<my_visitable_state>
+ {
+ typedef mpl::vector<play> deferred_events;
+ // every (optional) entry/exit methods get the event packed as boost::any. Not useful very often.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ void accept(SomeVisitor& vis,int i) const
+ {
+ vis.visit_state(this,i);
+ }
+ };
+ struct Open : public msm::front::state<my_visitable_state>
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector<play> deferred_events;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ void accept(SomeVisitor& vis,int i) const
+ {
+ vis.visit_state(this,i);
+ }
+ };
+ // a state needing a pointer to the containing state machine
+ // and using for this the non-default policy
+ // if policy used, set_sm_ptr is needed
+ struct Stopped : public msm::front::state<my_visitable_state>
+ {
+ // when stopped, the CD is loaded
+ typedef mpl::vector1<CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ };
+ // the player state machine contains a state which is himself a state machine
+ // it demonstrates Shallow History: if the state gets activated with end_pause
+ // then it will remember the last active state and reactivate it
+ // also possible: AlwaysHistory, the last active state will always be reactivated
+ // or NoHistory, always restart from the initial state
+ struct Playing_ : public msm::front::state_machine_def<Playing_,my_visitable_state >
+ {
+ // when playing, the CD is loaded and we are in either pause or playing (duh)
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+ void accept(SomeVisitor& vis,int i) const
+ {
+ // note that visiting will recursively visit sub-states
+ vis.visit_state(this,i);
+ }
+ // The list of FSM states
+ // the Playing state machine contains a state which is himself a state machine
+ // so we have a SM containing a SM containing a SM
+ struct Song1_ : public msm::front::state_machine_def<Song1_,my_visitable_state>
+ {
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
+ void accept(SomeVisitor& vis,int i) const
+ {
+ vis.visit_state(this,i);
+ }
+ struct LightOn : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOn" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: LightOn" << std::endl;}
+ };
+ struct LightOff : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOff" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: LightOff" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef LightOn initial_state;
+ // transition actions
+ void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
+ // guard conditions
+
+ typedef Song1_ s; // makes transition table cleaner
+ // Transition table for Song1
+ struct transition_table : mpl::vector1<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<Song1_> Song1;
+
+ struct Song2 : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
+ };
+ struct Song3 : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: Third Song" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef Song1 initial_state;
+ // transition actions
+ void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
+ void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
+ // guard conditions
+
+ typedef Playing_ pl; // makes transition table cleaner
+ // Transition table for Playing
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
+ a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
+ a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
+ a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<Playing_,msm::back::ShallowHistory<mpl::vector<end_pause> > > Playing;
+
+ // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
+ struct Paused_ : public msm::front::state_machine_def<Paused_,my_visitable_state>
+ {
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Paused" << std::endl;}
+
+ // The list of FSM states
+ struct StartBlinking : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: StartBlinking" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: StartBlinking" << std::endl;}
+ };
+ struct StopBlinking : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: StopBlinking" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: StopBlinking" << std::endl;}
+ };
+ // the initial state. Must be defined
+ typedef StartBlinking initial_state;
+ // transition actions
+ void start_blinking(TenSec const&) { std::cout << "Paused::start_blinking\n"; }
+ void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
+ // guard conditions
+
+ typedef Paused_ pa; // makes transition table cleaner
+ // Transition table
+ struct transition_table : mpl::vector2<
+ // Start Event Next Action Guard
+ // +---------------+-------------+--------------+---------------------+----------------------+
+ a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
+ a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
+ // +---------------+-------------+---------------+--------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ typedef msm::back::state_machine<Paused_> Paused;
+
+ struct SleepMode : public msm::front::state<my_visitable_state>
+ {
+ }; // dummy state just to test the automatic id generation
+
+ struct AllOk : public msm::front::state<my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: AllOk" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: AllOk" << std::endl;}
+ };
+ struct ErrorMode : //public terminate_state<>
+ public msm::front::interrupt_state<end_error,my_visitable_state>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: ErrorMode" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: ErrorMode" << std::endl;}
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef mpl::vector<Empty,AllOk> initial_state;
+ //typedef Empty initial_state; // this is to have only one active state
+
+ // transition actions
+ void start_playback(play const&) { std::cout << "player::start_playback\n"; }
+ void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
+ void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
+ void store_cd_info(cd_detected const&)
+ {
+ std::cout << "player::store_cd_info\n";
+ // generate another event to test the queue
+ //process_event(play());
+ }
+ void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
+ void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
+ void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
+ void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void start_sleep(go_sleep const&) { }
+ void report_error(error_found const&) {std::cout << "player::report_error\n";}
+ void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
+ // guard conditions
+
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ a_row < Stopped , stop , Stopped , &p::stopped_again >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >,
+ a_row < Paused , go_sleep ,SleepMode, &p::start_sleep >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < AllOk , error_found ,ErrorMode, &p::report_error >,
+ a_row <ErrorMode,end_error ,AllOk , &p::report_end_error >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+
+ // back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+
+ void pstate(player const& p)
+ {
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode","SleepMode" };
+ for (unsigned int i=0;i<player::nr_regions::value;++i)
+ {
+ std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
+ }
+ }
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
+
+ // test deferred event
+ // deferred in Empty and Open, will be handled only after event cd_detected
+ p.process_event(play());
+
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ // visiting Paused and AllOk, but only Paused cares
+ SomeVisitor vis;
+ p.visit_current_states(boost::ref(vis),1);
+ p.process_event(open_close()); pstate(p);
+ // visiting Empty and AllOk, but only Empty cares
+ p.visit_current_states(boost::ref(vis),2);
+
+
+ p.process_event(cd_detected("louie, louie"));
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+ // at this point, Play is active, along FirstSong and LightOn
+ pstate(p);
+ // visiting Playing+Song1 and AllOk, but only Playing+Song1 care
+ p.visit_current_states(boost::ref(vis),3);
+
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ // call on_exit on LightOn,FirstSong,Play like stated in the UML spec.
+ // and of course on_entry on Paused and StartBlinking
+ p.process_event(pause()); pstate(p);
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
+ // forward events to Paused
+ p.process_event(TenSec());
+ p.process_event(TenSec());
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl; //=> true
+ p.process_event(ThreeSec()); pstate(p);
+ p.process_event(NextSong());pstate(p);
+ // We are now in second song, Flag inactive
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
+ // visiting Playing+Song2 and AllOk, but only Playing cares
+ p.visit_current_states(boost::ref(vis),4);
+
+ p.process_event(NextSong());pstate(p);
+ // 2nd song active
+ p.process_event(PreviousSong());pstate(p);
+ // Pause
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ // but end_pause is an event activating the History
+ // => keep the last active State (SecondSong)
+ p.process_event(end_pause()); pstate(p);
+ // test of an event from a state to itself. According to UML spec, call again exit/entry from Stopped
+ p.process_event(stop()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
+ std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
+ std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
+ std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
+ std::cout << "CDLoaded active with OR:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_OR>() << std::endl;//=> true
+
+ // go back to Playing
+ // but play is not leading to Shallow History => do not remember the last active State (SecondSong)
+ // and activate again FirstSong and LightOn
+ p.process_event(play()); pstate(p);
+ p.process_event(error_found()); pstate(p);
+
+ // try generating more events
+ std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
+ p.process_event(NextSong());pstate(p);
+
+ std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
+ p.process_event(end_error());pstate(p);
+ std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
+ p.process_event(NextSong());pstate(p);
+
+ std::cout << "Simulate error. Event play is not valid" << std::endl;
+ p.process_event(play()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}
+
+

Deleted: sandbox/msm/libs/msm/doc/SM-3arg.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM-3arg.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,484 +0,0 @@
-#include <vector>
-#include <iostream>
-#include <string>
-// to increase the number of arguments of the accept method
-#define BOOST_MSM_VISITOR_ARG_SIZE 3
-#include <boost/mpl/vector/vector50.hpp>
-#include <boost/msm/state_machine.hpp>
-#include <boost/msm/tools.hpp>
-
-using namespace boost::msm;
-using namespace std;
-
-namespace // Concrete FSM implementation
-{
- // events
- struct play {};
- struct end_pause {};
- struct stop {};
- struct pause {};
- struct open_close {};
- struct NextSong {};
- struct PreviousSong {};
- struct ThreeSec {};
- struct TenSec {};
- struct go_sleep {};
- struct error_found {};
- struct end_error {};
-
- // Flags. Allow information about a property of the current state
- struct PlayingPaused{};
- struct CDLoaded {};
- struct FirstSongPlaying {};
-
- // A "complicated" event type that carries some data.
- // forward
- struct player;
- struct cd_detected
- {
- cd_detected(std::string name, player& p)
- : name(name)
- , m_player(p)
- {}
-
- std::string name;
- player& m_player;
- };
-
- // an easy visitor
- struct SomeVisitor
- {
- template <class T>
- void visit_state(T* astate,int i,const char* s)
- {
- std::cout << "visiting state:" << typeid(*astate).name()
- << " with data:" << i << " and:" << s << std::endl;
- }
- };
- // overwrite of the base state (not default)
- struct my_visitable_state
- {
- // signature of the accept function
- typedef args<void,SomeVisitor&,int,const char*> accept_sig;
-
- // we also want polymorphic states
- virtual ~my_visitable_state() {}
- // default implementation for states who do not need to be visited
- void accept(SomeVisitor&,int,const char*) const {}
- };
-
- // Concrete FSM implementation
- struct player : public state_machine<player,NoHistory,my_visitable_state>
- {
- // The list of FSM states
- struct Empty : public state<my_visitable_state>
- {
- typedef mpl::vector<play> deferred_events;
- // every (optional) entry/exit methods get the event packed as boost::any. Not useful very often.
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Empty" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Empty" << std::endl;}
- void accept(SomeVisitor& vis,int i,const char* s) const
- {
- vis.visit_state(this,i,s);
- }
- };
- struct Open : public state<my_visitable_state>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
- typedef mpl::vector<play> deferred_events;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Open" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Open" << std::endl;}
- void accept(SomeVisitor& vis,int i,const char* s) const
- {
- vis.visit_state(this,i,s);
- }
- };
- // a state needing a pointer to the containing state machine
- // and using for this the non-default policy
- // if policy used, set_sm_ptr is needed
- struct Stopped : public state<my_visitable_state,SMPtr>
- {
- // when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Stopped" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Stopped" << std::endl;}
- void set_sm_ptr(player* pl){m_player=pl;}
- player* m_player;
- };
- // the player state machine contains a state which is himself a state machine
- // it demonstrates Shallow History: if the state gets activated with end_pause
- // then it will remember the last active state and reactivate it
- // also possible: AlwaysHistory, the last active state will always be reactivated
- // or NoHistory, always restart from the initial state
- struct Playing : public state_machine<Playing,ShallowHistory<mpl::vector<end_pause> >,my_visitable_state >
- {
- // when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Playing" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Playing" << std::endl;}
- void accept(SomeVisitor& vis,int i,const char* s)
- {
- vis.visit_state(this,i,s);
- // visit substates
- visit_current_states(vis,i,s);
- }
- // The list of FSM states
- // the Playing state machine contains a state which is himself a state machine
- // so we have a SM containing a SM containing a SM
- struct Song1 : public state_machine<Song1,NoHistory,my_visitable_state>
- {
- typedef mpl::vector1<FirstSongPlaying> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: First song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: First Song" << std::endl;}
- void accept(SomeVisitor& vis,int i,const char* s)
- {
- vis.visit_state(this,i,s);
- }
- struct LightOn : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOn" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOn" << std::endl;}
- };
- struct LightOff : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOff" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOff" << std::endl;}
- };
- // the initial state. Must be defined
- typedef LightOn initial_state;
- // transition actions
- void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
- // guard conditions
-
- typedef Song1 s; // makes transition table cleaner
- // Transition table for Song1
- struct transition_table : mpl::vector1<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
-
- };
- struct Song2 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Second song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Second Song" << std::endl;}
- };
- struct Song3 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Third song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Third Song" << std::endl;}
- };
- // the initial state. Must be defined
- typedef Song1 initial_state;
- // transition actions
- void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
- void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
- // guard conditions
-
- typedef Playing pl; // makes transition table cleaner
- // Transition table for Playing
- struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
- a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
- a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
- a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const&)
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
- struct Paused : public state_machine<Paused,NoHistory,my_visitable_state>
- {
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Paused" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Paused" << std::endl;}
-
- // The list of FSM states
- struct StartBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StartBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StartBlinking" << std::endl;}
- };
- struct StopBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StopBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StopBlinking" << std::endl;}
- };
- // the initial state. Must be defined
- typedef StartBlinking initial_state;
- // transition actions
- void start_blinking(TenSec const&) { std::cout << "Paused::start_blinking\n"; }
- void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
- // guard conditions
-
- typedef Paused pa; // makes transition table cleaner
- // Transition table
- struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
- // +---------------+-------------+--------------+---------------------+----------------------+
- a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
- a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
- // +---------------+-------------+---------------+--------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- struct SleepMode : public state<my_visitable_state> {}; // dumy state just to test the automatic id generation
-
- struct AllOk : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: AllOk" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: AllOk" << std::endl;}
- };
- struct ErrorMode : //public terminate_state<>
- public interrupt_state<end_error,my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: ErrorMode" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: ErrorMode" << std::endl;}
- };
-
- // the initial state of the player SM. Must be defined
- typedef mpl::vector<Empty,AllOk> initial_state;
- //typedef Empty initial_state; // this is to have only one active state
-
-#ifdef __MWERKS__
- public: // Codewarrior bug workaround. Tested at 0x3202
-#endif
- // transition actions
- void start_playback(play const&) { std::cout << "player::start_playback\n"; }
- void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
- void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
- void store_cd_info(cd_detected const&)
- {
- std::cout << "player::store_cd_info\n";
- // generate another event to test the queue
- //cd.m_player.process_event(play());
- }
- void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
- void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
- void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
- void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
- void start_sleep(go_sleep const&) { }
- void report_error(error_found const&) {std::cout << "player::report_error\n";}
- void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
- // guard conditions
-
-
-#ifdef __MWERKS__
- private:
-#endif
- typedef player p; // makes transition table cleaner
-
- // Transition table for player
- struct transition_table : mpl::vector<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Stopped , play , Playing , &p::start_playback >,
- a_row < Stopped , open_close , Open , &p::open_drawer >,
- a_row < Stopped , stop , Stopped , &p::stopped_again >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Open , open_close , Empty , &p::close_drawer >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Empty , open_close , Open , &p::open_drawer >,
- a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Playing , stop , Stopped , &p::stop_playback >,
- a_row < Playing , pause , Paused , &p::pause_playback >,
- a_row < Playing , open_close , Open , &p::stop_and_open >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Paused , end_pause , Playing , &p::resume_playback >,
- a_row < Paused , stop , Stopped , &p::stop_playback >,
- a_row < Paused , open_close , Open , &p::stop_and_open >,
- a_row < Paused , go_sleep ,SleepMode, &p::start_sleep >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < AllOk , error_found ,ErrorMode, &p::report_error >,
- a_row <ErrorMode,end_error ,AllOk , &p::report_end_error >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
-
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
-
- //
- // Testing utilities.
- //
-
- void pstate(player const& p)
- {
- // instead of the hard-coded array we can use fill_state_names:
- //static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode","SleepMode" };
- typedef player::transition_table stt;
- typedef generate_state_set<stt>::type all_states;
- static char const* state_names[mpl::size<all_states>::value];
- // fill the names of the states defined in the state machine
- mpl::for_each<all_states,boost::msm::wrap<mpl::placeholders::_1> >(fill_state_names<stt>(state_names));
-
- for (unsigned int i=0;i<p.current_state().size();++i)
- {
- std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
- }
- }
- void test()
- {
- player p;
- // get a pointer to a state
- // just to show how to do it as Stopped gets a pointer to player anyway
- player::Stopped* tempstate = p.get_state<player::Stopped*>();
- tempstate->m_player = &p;
- // get a reference to a state
- player::Stopped& tempstate2 = p.get_state<player::Stopped&>();
- tempstate2.m_player = &p;
- // make a copy of a state
- player::Stopped tempstate3 = p.get_state<player::Stopped&>();
-
- // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
- p.start();
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
-
- // test deferred event
- // deferred in Empty and Open, will be handled only after event cd_detected
- p.process_event(play());
-
- // go to Open, call on_exit on Empty, then action, then on_entry on Open
- p.process_event(open_close()); pstate(p);
- // visiting Paused and AllOk, but only Paused cares
- SomeVisitor vis;
- p.visit_current_states(boost::ref(vis),1,"first");
- p.process_event(open_close()); pstate(p);
- // visiting Empty and AllOk, but only Empty cares
- p.visit_current_states(boost::ref(vis),2,"second");
-
-
- p.process_event(cd_detected("louie, louie",p));
- // no need to call play() as the previous event does it in its action method
- //p.process_event(play());
- // at this point, Play is active, along FirstSong and LightOn
- pstate(p);
- // visiting Playing+Song1 and AllOk, but only Playing+Song1 care
- p.visit_current_states(boost::ref(vis),3,"third");
-
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // call on_exit on LightOn,FirstSong,Play like stated in the UML spec.
- // and of course on_entry on Paused and StartBlinking
- p.process_event(pause()); pstate(p);
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // forward events to Paused
- p.process_event(TenSec());
- p.process_event(TenSec());
- // go back to Playing
- p.process_event(end_pause()); pstate(p);
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl; //=> true
- p.process_event(ThreeSec()); pstate(p);
- p.process_event(NextSong());pstate(p);
- // We are now in second song, Flag inactive
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- // visiting Playing+Song2 and AllOk, but only Playing cares
- p.visit_current_states(vis,4,"fourth");
-
- p.process_event(NextSong());pstate(p);
- // 2nd song active
- p.process_event(PreviousSong());pstate(p);
- // Pause
- p.process_event(pause()); pstate(p);
- // go back to Playing
- // but end_pause is an event activating the History
- // => keep the last active State (SecondSong)
- p.process_event(end_pause()); pstate(p);
- // test of an event from a state to itself. According to UML spec, call again exit/entry from Stopped
- p.process_event(stop()); pstate(p);
- p.process_event(stop()); pstate(p);
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
- std::cout << "CDLoaded active with OR:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_OR>() << std::endl;//=> true
-
- // go back to Playing
- // but play is not leading to Shallow History => do not remember the last active State (SecondSong)
- // and activate again FirstSong and LightOn
- p.process_event(play()); pstate(p);
- p.process_event(error_found()); pstate(p);
-
- // try generating more events
- std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(end_error());pstate(p);
- std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Simulate error. Event play is not valid" << std::endl;
- p.process_event(play()); pstate(p);
-
- }
-}
-
-int main()
-{
- test();
- return 0;
-}
-
-

Deleted: sandbox/msm/libs/msm/doc/SM.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,495 +0,0 @@
-#include <vector>
-#include <iostream>
-#include <string>
-#include <boost/mpl/vector/vector50.hpp>
-#include <boost/msm/state_machine.hpp>
-#include <boost/msm/tools.hpp>
-
-using namespace boost::msm;
-using namespace std;
-
-namespace // Concrete FSM implementation
-{
- // events
- struct play {};
- struct end_pause {};
- struct stop {};
- struct pause {};
- struct open_close {};
- struct NextSong {};
- struct PreviousSong {};
- struct ThreeSec {};
- struct TenSec {};
- struct go_sleep {};
- struct error_found {};
- struct end_error {};
-
- // Flags. Allow information about a property of the current state
- struct PlayingPaused{};
- struct CDLoaded {};
- struct FirstSongPlaying {};
-
- // A "complicated" event type that carries some data.
- // forward
- struct player;
- struct cd_detected
- {
- cd_detected(std::string name, player& p)
- : name(name)
- , m_player(p)
- {}
-
- std::string name;
- player& m_player;
- };
-
- // overwrite of the base state (not default)
- struct my_visitable_state
- {
- // signature of the accept function
- typedef args<void> accept_sig;
-
- // we also want polymorphic states
- virtual ~my_visitable_state() {}
- // default implementation for states who do not need to be visited
- void accept() const {}
- };
-
- // Concrete FSM implementation
- struct player : public state_machine<player,NoHistory,my_visitable_state>
- {
- // The list of FSM states
- struct Empty : public state<my_visitable_state>
- {
- typedef mpl::vector<play> deferred_events;
- // every (optional) entry/exit methods get the event packed as boost::any. Not useful very often.
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Empty" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Empty" << std::endl;}
- void accept() const
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- }
- };
- struct Open : public state<my_visitable_state>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
- typedef mpl::vector<play> deferred_events;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Open" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Open" << std::endl;}
- void accept() const
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- }
- };
- // a state needing a pointer to the containing state machine
- // and using for this the non-default policy
- // if policy used, set_sm_ptr is needed
- struct Stopped : public state<my_visitable_state,sm_ptr>
- {
- // when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Stopped" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Stopped" << std::endl;}
- void set_sm_ptr(player* pl){m_player=pl;}
- player* m_player;
- };
- // the player state machine contains a state which is himself a state machine
- // it demonstrates Shallow History: if the state gets activated with end_pause
- // then it will remember the last active state and reactivate it
- // also possible: AlwaysHistory, the last active state will always be reactivated
- // or NoHistory, always restart from the initial state
- struct Playing : public state_machine<Playing,ShallowHistory<mpl::vector<end_pause> >,my_visitable_state >
- {
- // when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Playing" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Playing" << std::endl;}
- void accept()
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- // visit substates
- visit_current_states();
- }
- // The list of FSM states
- // the Playing state machine contains a state which is himself a state machine
- // so we have a SM containing a SM containing a SM
- struct Song1 : public state_machine<Song1,NoHistory,my_visitable_state>
- {
- typedef mpl::vector1<FirstSongPlaying> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: First song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: First Song" << std::endl;}
- void accept()
- {
- std::cout << "visiting state:" << typeid(*this).name() << std::endl;
- }
- struct LightOn : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOn" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOn" << std::endl;}
- };
- struct LightOff : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: LightOff" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: LightOff" << std::endl;}
- };
- // the initial state. Must be defined
- typedef LightOn initial_state;
- // transition actions
- void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
- // guard conditions
-
- typedef Song1 s; // makes transition table cleaner
- // Transition table for Song1
- struct transition_table : mpl::vector1<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
-
- };
- struct Song2 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Second song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Second Song" << std::endl;}
- };
- struct Song3 : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: Third song" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: Third Song" << std::endl;}
- };
- // the initial state. Must be defined
- typedef Song1 initial_state;
- // transition actions
- void start_next_song(NextSong const&) { std::cout << "Playing::start_next_song\n"; }
- void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
- // guard conditions
-
- typedef Playing pl; // makes transition table cleaner
- // Transition table for Playing
- struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
- a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
- a_row < Song2 , NextSong , Song3 , &pl::start_next_song >,
- a_row < Song3 , PreviousSong, Song2 , &pl::start_prev_song >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const&)
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
- struct Paused : public state_machine<Paused,NoHistory,my_visitable_state>
- {
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
- template <class Event>
- void on_entry(Event const& ) {std::cout << "entering: Paused" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "leaving: Paused" << std::endl;}
-
- // The list of FSM states
- struct StartBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StartBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StartBlinking" << std::endl;}
- };
- struct StopBlinking : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: StopBlinking" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: StopBlinking" << std::endl;}
- };
- // the initial state. Must be defined
- typedef StartBlinking initial_state;
- // transition actions
- void start_blinking(TenSec const&) { std::cout << "Paused::start_blinking\n"; }
- void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
- // guard conditions
-
- typedef Paused pa; // makes transition table cleaner
- // Transition table
- struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
- // +---------------+-------------+--------------+---------------------+----------------------+
- a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
- a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
- // +---------------+-------------+---------------+--------------------+----------------------+
- > {};
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
- struct SleepMode : public state<my_visitable_state> {}; // dumy state just to test the automatic id generation
-
- struct AllOk : public state<my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: AllOk" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: AllOk" << std::endl;}
- };
- struct ErrorMode : //public terminate_state<>
- public interrupt_state<end_error,my_visitable_state>
- {
- template <class Event>
- void on_entry(Event const& ) {std::cout << "starting: ErrorMode" << std::endl;}
- template <class Event>
- void on_exit(Event const& ) {std::cout << "finishing: ErrorMode" << std::endl;}
- };
-
- // the initial state of the player SM. Must be defined
- typedef mpl::vector<Empty,AllOk> initial_state;
- //typedef Empty initial_state; // this is to have only one active state
-
-#ifdef __MWERKS__
- public: // Codewarrior bug workaround. Tested at 0x3202
-#endif
- // transition actions
- void start_playback(play const&) { std::cout << "player::start_playback\n"; }
- void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
- void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
- void store_cd_info(cd_detected const&)
- {
- std::cout << "player::store_cd_info\n";
- // generate another event to test the queue
- //cd.m_player.process_event(play());
- }
- void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
- void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
- void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
- void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
- void start_sleep(go_sleep const&) { }
- void report_error(error_found const&) {std::cout << "player::report_error\n";}
- void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
- // guard conditions
-
-
-#ifdef __MWERKS__
- private:
-#endif
- typedef player p; // makes transition table cleaner
-
- // Transition table for player
- struct transition_table : mpl::vector<
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Stopped , play , Playing , &p::start_playback >,
- a_row < Stopped , open_close , Open , &p::open_drawer >,
- a_row < Stopped , stop , Stopped , &p::stopped_again >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Open , open_close , Empty , &p::close_drawer >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Empty , open_close , Open , &p::open_drawer >,
- a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Playing , stop , Stopped , &p::stop_playback >,
- a_row < Playing , pause , Paused , &p::pause_playback >,
- a_row < Playing , open_close , Open , &p::stop_and_open >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Paused , end_pause , Playing , &p::resume_playback >,
- a_row < Paused , stop , Stopped , &p::stop_playback >,
- a_row < Paused , open_close , Open , &p::stop_and_open >,
- a_row < Paused , go_sleep ,SleepMode, &p::start_sleep >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < AllOk , error_found ,ErrorMode, &p::report_error >,
- a_row <ErrorMode,end_error ,AllOk , &p::report_end_error >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
-
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& )
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(Event).name() << std::endl;
- return state;
- }
- };
-
- //
- // Testing utilities.
- //
-
- void pstate(player const& p)
- {
- // instead of the hard-coded array we can use fill_state_names:
- //static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused","AllOk","ErrorMode","SleepMode" };
- typedef player::transition_table stt;
- typedef generate_state_set<stt>::type all_states;
- static char const* state_names[mpl::size<all_states>::value];
- // fill the names of the states defined in the state machine
- mpl::for_each<all_states,boost::msm::wrap<mpl::placeholders::_1> >(fill_state_names<stt>(state_names));
-
- for (unsigned int i=0;i<p.current_state().size();++i)
- {
- std::cout << " -> " << state_names[p.current_state()[i]] << std::endl;
- }
- }
- void test()
- {
- player p;
- // get a pointer to a state
- // just to show how to do it as Stopped gets a pointer to player anyway
- player::Stopped* tempstate = p.get_state<player::Stopped*>();
- tempstate->m_player = &p;
- // get a reference to a state
- player::Stopped& tempstate2 = p.get_state<player::Stopped&>();
- tempstate2.m_player = &p;
- // make a copy of a state
- player::Stopped tempstate3 = p.get_state<player::Stopped&>();
-
- // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
- p.start();
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl; //=> false (no CD yet)
-
- // test deferred event
- // deferred in Empty and Open, will be handled only after event cd_detected
- p.process_event(play());
-
- // go to Open, call on_exit on Empty, then action, then on_entry on Open
- p.process_event(open_close()); pstate(p);
- // visiting Paused and AllOk, but only Paused cares
- p.visit_current_states();
- p.process_event(open_close()); pstate(p);
- // visiting Empty and AllOk, but only Empty cares
- p.visit_current_states();
-
-
- p.process_event(cd_detected("louie, louie",p));
- // no need to call play() as the previous event does it in its action method
- //p.process_event(play());
- // at this point, Play is active, along FirstSong and LightOn
- pstate(p);
- // visiting Playing+Song1 and AllOk, but only Playing+Song1 care
- p.visit_current_states();
-
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // call on_exit on LightOn,FirstSong,Play like stated in the UML spec.
- // and of course on_entry on Paused and StartBlinking
- p.process_event(pause()); pstate(p);
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> true
- // forward events to Paused
- p.process_event(TenSec());
- p.process_event(TenSec());
- // go back to Playing
- p.process_event(end_pause()); pstate(p);
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl; //=> true
- p.process_event(ThreeSec()); pstate(p);
- p.process_event(NextSong());pstate(p);
- // We are now in second song, Flag inactive
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- // visiting Playing+Song2 and AllOk, but only Playing cares
- p.visit_current_states();
-
- p.process_event(NextSong());pstate(p);
- // 2nd song active
- p.process_event(PreviousSong());pstate(p);
- // Pause
- p.process_event(pause()); pstate(p);
- // go back to Playing
- // but end_pause is an event activating the History
- // => keep the last active State (SecondSong)
- p.process_event(end_pause()); pstate(p);
- // test of an event from a state to itself. According to UML spec, call again exit/entry from Stopped
- p.process_event(stop()); pstate(p);
- p.process_event(stop()); pstate(p);
- std::cout << "CDLoaded active:" << std::boolalpha << p.is_flag_active<CDLoaded>() << std::endl;//=> true
- std::cout << "PlayingPaused active:" << std::boolalpha << p.is_flag_active<PlayingPaused>() << std::endl;//=> false
- std::cout << "FirstSong active:" << std::boolalpha << p.is_flag_active<FirstSongPlaying>() << std::endl;//=> false
- std::cout << "CDLoaded active with AND:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_AND>() << std::endl;//=> false
- std::cout << "CDLoaded active with OR:" << std::boolalpha << p.is_flag_active<CDLoaded,player::Flag_OR>() << std::endl;//=> true
-
- // go back to Playing
- // but play is not leading to Shallow History => do not remember the last active State (SecondSong)
- // and activate again FirstSong and LightOn
- p.process_event(play()); pstate(p);
- p.process_event(error_found()); pstate(p);
-
- // try generating more events
- std::cout << "Trying to generate another event" << std::endl; // will not work, fsm is terminated or interrupted
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Trying to end the error" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(end_error());pstate(p);
- std::cout << "Trying to generate another event" << std::endl; // will work only if ErrorMode is interrupt state
- p.process_event(NextSong());pstate(p);
-
- std::cout << "Simulate error. Event play is not valid" << std::endl;
- p.process_event(play()); pstate(p);
-
- // the states and events of the higher level FSM (player)
- typedef player::transition_table stt;
- typedef generate_state_set<stt>::type simple_states;
-
- std::cout << "the state list:" << std::endl;
- mpl::for_each<simple_states,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
-
- std::cout << "the event list:" << std::endl;
- typedef generate_event_set<stt>::type event_list;
- mpl::for_each<event_list,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
- std::cout << std::endl;
-
- // the states and events recursively searched
- typedef recursive_get_transition_table<player>::type recursive_stt;
-
- std::cout << "the state list (including sub-SMs):" << std::endl;
-
- typedef generate_state_set<recursive_stt>::type all_states;
- mpl::for_each<all_states,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
-
- std::cout << "the event list (including sub-SMs):" << std::endl;
- typedef generate_event_set<recursive_stt>::type all_events;
- mpl::for_each<all_events,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
-
- }
-}
-
-int main()
-{
- test();
- return 0;
-}
-
-

Added: sandbox/msm/libs/msm/doc/SimpleTimer.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SimpleTimer.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,141 @@
+#include <vector>
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// how long the timer will ring when countdown elapsed.
+#define RINGING_TIME 5
+// the different attribute indexes (more readable than just 0)
+#define m_timer 0
+#define m_tick 0
+#define m_counter 0
+#define m_ringing_cpt 0
+
+namespace // Concrete FSM implementation
+{
+ // events
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << int() /*m_timer*/ )) start_timer_attr;
+ struct start_timer : euml_event<start_timer>, start_timer_attr
+ {
+ start_timer(int counter=0)
+ {
+ get_attribute<m_timer>()=counter;
+ }
+ };
+ struct stop_timer : euml_event<stop_timer>{};
+
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << int() /*m_tick*/ )) tick_attr;
+ struct tick : euml_event<tick>,tick_attr
+ {
+ tick(int counter=0)
+ {
+ get_attribute<m_tick>()=counter;
+ }
+ };
+ struct start_ringing : euml_event<start_ringing>{};
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+ struct Stopped_Entry : euml_action<Stopped_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Stopped" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state( Stopped_Entry() )) Stopped;
+
+ struct Started_Entry : euml_action<Started_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Started" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state( Started_Entry(),NoAction(), attributes_ << int()/*m_counter*/ )) Started;
+
+ struct Ringing_Entry : euml_action<Ringing_Entry>
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Ringing" << std::endl;
+ }
+ };
+ typedef BOOST_TYPEOF(build_state( Ringing_Entry(), NoAction(), attributes_ << int()/*M_RINGING_CPT*/ )) Ringing;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ // When we start the countdown, the countdown value is not hardcoded but contained in the start_timer event.
+ // We copy this value into Started
+ ((Stopped() + start_timer() == Started() / (Target_<m_counter>()= Event_<m_timer>()),
+ Started() + stop_timer() == Stopped() ,
+ Started() + tick() == Started()
+ // we here use the message queue to move to Started when the countdown is finished
+ // to do this we put start_ringing into the message queue
+ / if_then_( (Source_<m_counter>() -= Event_<m_tick>()) <= Int_<0>(),
+ process_(start_ringing()) ),
+ // when we start ringing, we give to the state its hard-coded ringing time.
+ Started() + start_ringing() == Ringing() / (Target_<m_ringing_cpt>() = Int_<RINGING_TIME>()),
+ // to change a bit, we now do not use the message queue but a transition conflict to solve the same problem.
+ // When tick is fired, we have a transition Ringing -> Ringing, as long as Counter > 0
+ Ringing() + tick() == Ringing() [ Source_<m_ringing_cpt>() - Event_<m_tick>() > Int_<0>() ]
+ / (Source_<m_ringing_cpt>() -= Event_<m_tick>() ),
+ // And we move to Stopped when the counter is 0
+ Ringing() + tick() == Stopped() [ Source_<m_ringing_cpt>()-Event_<m_tick>() <= Int_<0>() ],
+ // we let the user manually stop the ringing by pressing any button
+ Ringing() + stop_timer() == Stopped(),
+ Ringing() + start_timer() == Stopped()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Stopped() // Init
+ )) SimpleTimer_;
+
+
+ // choice of back-end
+ typedef msm::back::state_machine<SimpleTimer_> SimpleTimer;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Started","Ringing" };
+ void pstate(SimpleTimer const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ SimpleTimer p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+
+ p.process_event(start_timer(5));pstate(p); //timer set to 5 ticks
+ p.process_event(tick(2));pstate(p);
+ p.process_event(tick(1));pstate(p);
+ p.process_event(tick(1));pstate(p);
+ p.process_event(tick(1));pstate(p);
+ // we are now ringing, let it ring a bit
+ p.process_event(tick(2));pstate(p);
+ p.process_event(tick(1));pstate(p);
+ p.process_event(tick(1));pstate(p);
+ p.process_event(tick(1));pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/SimpleTutorial.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SimpleTutorial.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,190 @@
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+
+namespace msm = boost::msm;
+
+namespace
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+
+ // A "complicated" event type that carries some data.
+ enum DiskTypeEnum
+ {
+ DISK_CD=0,
+ DISK_DVD=1
+ };
+ struct cd_detected
+ {
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ : name(name),
+ disc_type(diskType)
+ {}
+
+ std::string name;
+ DiskTypeEnum disc_type;
+ };
+
+ // front-end: define the FSM structure
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ };
+ struct Open : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ };
+
+ // sm_ptr still supported but deprecated as functors are a much better way to do the same thing
+ struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ void set_sm_ptr(player_* pl)
+ {
+ m_player=pl;
+ }
+ player_* m_player;
+ };
+
+ struct Playing : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+ };
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+
+ // transition actions
+ void start_playback(play const&) { std::cout << "player::start_playback\n"; }
+ void open_drawer(open_close const&) { std::cout << "player::open_drawer\n"; }
+ void close_drawer(open_close const&) { std::cout << "player::close_drawer\n"; }
+ void store_cd_info(cd_detected const&) { std::cout << "player::store_cd_info\n"; }
+ void stop_playback(stop const&) { std::cout << "player::stop_playback\n"; }
+ void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
+ void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
+ void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ // guard conditions
+ bool good_disk_format(cd_detected const& evt)
+ {
+ // to test a guard condition, let's say we understand only CDs, not DVD
+ if (evt.disc_type != DISK_CD)
+ {
+ std::cout << "wrong disk, sorry" << std::endl;
+ return false;
+ }
+ return true;
+ }
+ // used to show a transition conflict. This guard will simply deactivate one transition and thus
+ // solve the conflict
+ bool auto_start(cd_detected const&)
+ {
+ return false;
+ }
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Stopped , play , Playing , &p::start_playback >,
+ a_row < Stopped , open_close , Open , &p::open_drawer >,
+ _row < Stopped , stop , Stopped >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Open , open_close , Empty , &p::close_drawer >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Empty , open_close , Open , &p::open_drawer >,
+ row < Empty , cd_detected , Stopped , &p::store_cd_info ,&p::good_disk_format >,
+ row < Empty , cd_detected , Playing , &p::store_cd_info ,&p::auto_start >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Playing , stop , Stopped , &p::stop_playback >,
+ a_row < Playing , pause , Paused , &p::pause_playback >,
+ a_row < Playing , open_close , Open , &p::stop_and_open >,
+ // +---------+-------------+---------+---------------------+----------------------+
+ a_row < Paused , end_pause , Playing , &p::resume_playback >,
+ a_row < Paused , stop , Stopped , &p::stop_playback >,
+ a_row < Paused , open_close , Open , &p::stop_and_open >
+ // +---------+-------------+---------+---------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ p.process_event(play());
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ // no action method called as it is not present in the transition table
+ p.process_event(stop()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/SimpleTutorial.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/SimpleTutorialEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SimpleTutorialEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,138 @@
+#include <vector>
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+
+// entry/exit/action/guard logging functors
+#include "logging_functors.h"
+
+namespace // Concrete FSM implementation
+{
+ // events
+ // note that unlike the SimpleTutorial, events must derive from euml_event.
+ struct play : euml_event<play>{};
+ struct end_pause : euml_event<end_pause>{};
+ struct stop : euml_event<stop>{};
+ struct pause : euml_event<pause>{};
+ struct open_close : euml_event<open_close>{};
+
+ // A "complicated" event type that carries some data.
+ // first define the attributes
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << std::string() << DiskTypeEnum() )) cd_detected_def;
+ // pass the attributes to the event
+ struct cd_detected : euml_event<cd_detected>,cd_detected_def
+ {
+ cd_detected(){}
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ {
+ // 1st attribute, a string
+ get_attribute<0>()=name;
+ // 2nd attribute, a DiskTypeEnum
+ get_attribute<1>()=diskType;
+ }
+ };
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+
+ typedef BOOST_TYPEOF(build_state(Empty_Entry(),Empty_Exit())) Empty;
+
+ typedef BOOST_TYPEOF(build_state( Open_Entry(),Open_Exit() )) Open;
+
+ typedef BOOST_TYPEOF(build_state( Stopped_Entry(),Stopped_Exit() )) Stopped;
+
+ typedef BOOST_TYPEOF(build_state( (Playing_Entry()),(Playing_Exit()) )) Playing;
+
+ // state not needing any entry or exit
+ typedef BOOST_TYPEOF(build_state( )) Paused;
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Stopped() + play() == Playing() / start_playback() ,
+ Stopped() + open_close() == Open() / open_drawer(),
+ Stopped() + stop() == Stopped(),
+ // +------------------------------------------------------------------------------+
+ Open() + open_close() == Empty() / close_drawer(),
+ // +------------------------------------------------------------------------------+
+ Empty() + open_close() == Open() / open_drawer(),
+ Empty() + cd_detected() == Stopped() [good_disk_format()&&(Event_<1>()==Int_<DISK_CD>())]
+ / (store_cd_info(),process_(play())),
+ // +------------------------------------------------------------------------------+
+ Playing() + stop() == Stopped() / stop_playback(),
+ Playing() + pause() == Paused() / pause_playback(),
+ Playing() + open_close() == Open() / stop_and_open(),
+ // +------------------------------------------------------------------------------+
+ Paused() + end_pause() == Playing() / resume_playback(),
+ Paused() + stop() == Stopped() / stop_playback(),
+ Paused() + open_close() == Open() / stop_and_open()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Empty(), // Init State
+ NoAction(), // Entry
+ NoAction(), // Exit
+ attributes_ << no_attributes_, // Attributes
+ configure_<< no_configure_, // Flags, Deferred events, configuration
+ Log_No_Transition() // no_transition handler
+ )) player_;
+ // or simply, if no no_transition handler needed:
+ //typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ // Empty() // Init State
+ // )) player_;
+
+
+ // choice of back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ // no action method called as none is defined in the transition table
+ p.process_event(stop()); pstate(p);
+ // test call to no_transition
+ p.process_event(pause()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/SimpleWithFunctors.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/SimpleWithFunctors.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,281 @@
+#include <vector>
+#include <iostream>
+// back-end
+#include <boost/msm/back/state_machine.hpp>
+//front-end
+#include <boost/msm/front/state_machine_def.hpp>
+// functors
+#include <boost/msm/front/functor_row.hpp>
+#include <boost/msm/front/euml/common.hpp>
+
+using namespace std;
+namespace msm = boost::msm;
+namespace mpl = boost::mpl;
+using namespace msm::front;
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct play {};
+ struct end_pause {};
+ struct stop {};
+ struct pause {};
+ struct open_close {};
+
+ // A "complicated" event type that carries some data.
+ enum DiskTypeEnum
+ {
+ DISK_CD=0,
+ DISK_DVD=1
+ };
+ struct cd_detected
+ {
+ cd_detected(std::string name, DiskTypeEnum diskType)
+ : name(name),
+ disc_type(diskType)
+ {}
+
+ std::string name;
+ DiskTypeEnum disc_type;
+ };
+
+ // front-end: define the FSM structure
+ struct player_ : public msm::front::state_machine_def<player_>
+ {
+ // The list of FSM states
+ struct Empty : public msm::front::state<>
+ {
+ // every (optional) entry/exit methods get the event passed.
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Empty" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
+ };
+ struct Open : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Open" << std::endl;}
+ };
+
+ struct Stopped : public msm::front::state<>
+ {
+ // when stopped, the CD is loaded
+ template <class Event,class FSM>
+ void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Stopped" << std::endl;}
+ };
+
+ struct Playing : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "leaving: Playing" << std::endl;}
+ };
+
+ // state not defining any entry or exit
+ struct Paused : public msm::front::state<>
+ {
+ };
+
+ // the initial state of the player SM. Must be defined
+ typedef Empty initial_state;
+
+ // transition actions
+ // as the functors are generic on events, fsm and source/target state,
+ // you can reuse them in another machine if you wish
+ struct TestFct
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const&, FSM&,SourceState& ,TargetState& )
+ {
+ cout << "transition with event:" << typeid(EVT).name() << endl;
+ }
+ };
+ struct start_playback
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::start_playback" << endl;
+ }
+ };
+ struct open_drawer
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::open_drawer" << endl;
+ }
+ };
+ struct close_drawer
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::close_drawer" << endl;
+ }
+ };
+ struct store_cd_info
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const&,FSM& fsm ,SourceState& ,TargetState& )
+ {
+ cout << "player::store_cd_info" << endl;
+ fsm.process_event(play());
+ }
+ };
+ struct stop_playback
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::stop_playback" << endl;
+ }
+ };
+ struct pause_playback
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::pause_playback" << endl;
+ }
+ };
+ struct resume_playback
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::resume_playback" << endl;
+ }
+ };
+ struct stop_and_open
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::stop_and_open" << endl;
+ }
+ };
+ struct stopped_again
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::stopped_again" << endl;
+ }
+ };
+ // guard conditions
+ struct DummyGuard
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)
+ {
+ return true;
+ }
+ };
+ struct good_disk_format
+ {
+ template <class EVT,class FSM,class SourceState,class TargetState>
+ bool operator()(EVT const& evt ,FSM&,SourceState& ,TargetState& )
+ {
+ // to test a guard condition, let's say we understand only CDs, not DVD
+ if (evt.disc_type != DISK_CD)
+ {
+ std::cout << "wrong disk, sorry" << std::endl;
+ return false;
+ }
+ return true;
+ }
+ };
+ // we want to define one row with the classic look.
+ bool auto_start(cd_detected const& evt)
+ {
+ return false;
+ }
+
+ typedef player_ p; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector<
+ // Start Event Next Action Guard
+ // +---------+-------------+---------+---------------------------+----------------------+
+ Row < Stopped , play , Playing , ActionSequence
+ <mpl::vector<
+ TestFct,start_playback> >
+ , DummyGuard >,
+ Row < Stopped , open_close , Open , open_drawer , none >,
+ Row < Stopped , stop , Stopped , none , none >,
+ // +---------+-------------+---------+---------------------------+----------------------+
+ Row < Open , open_close , Empty , close_drawer , none >,
+ // +---------+-------------+---------+---------------------------+----------------------+
+ Row < Empty , open_close , Open , open_drawer , none >,
+ Row < Empty , cd_detected , Stopped , store_cd_info , good_disk_format >,
+ // we here also mix with some "classical row"
+ g_row < Empty , cd_detected , Playing , &p::auto_start >,
+ // +---------+-------------+---------+---------------------------+----------------------+
+ Row < Playing , stop , Stopped , stop_playback , none >,
+ Row < Playing , pause , Paused , pause_playback , none >,
+ Row < Playing , open_close , Open , stop_and_open , none >,
+ // +---------+-------------+---------+---------------------------+----------------------+
+ Row < Paused , end_pause , Playing , resume_playback , none >,
+ Row < Paused , stop , Stopped , stop_playback , none >,
+ Row < Paused , open_close , Open , stop_and_open , none >
+ // +---------+-------------+---------+---------------------------+----------------------+
+ > {};
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // Pick a back-end
+ typedef msm::back::state_machine<player_> player;
+
+ //
+ // Testing utilities.
+ //
+ static char const* const state_names[] = { "Stopped", "Open", "Empty", "Playing", "Paused" };
+ void pstate(player const& p)
+ {
+ std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
+ }
+
+ void test()
+ {
+ player p;
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ p.start();
+ // go to Open, call on_exit on Empty, then action, then on_entry on Open
+ p.process_event(open_close()); pstate(p);
+ p.process_event(open_close()); pstate(p);
+ // will be rejected, wrong disk type
+ p.process_event(
+ cd_detected("louie, louie",DISK_DVD)); pstate(p);
+ p.process_event(
+ cd_detected("louie, louie",DISK_CD)); pstate(p);
+ // no need to call play() as the previous event does it in its action method
+ //p.process_event(play());
+
+ // at this point, Play is active
+ p.process_event(pause()); pstate(p);
+ // go back to Playing
+ p.process_event(end_pause()); pstate(p);
+ p.process_event(pause()); pstate(p);
+ p.process_event(stop()); pstate(p);
+ // event leading to the same state
+ // no action method called as it is not present in the transition table
+ p.process_event(stop()); pstate(p);
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/Timer.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/Transition.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/alarm.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/clock.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/entry tutorial.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/iPodSearch.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/iPodSearch.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,198 @@
+#include <set>
+#include <string>
+#include <iostream>
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/state_machine_def.hpp>
+
+using namespace std;
+namespace msm = boost::msm;
+
+namespace // Concrete FSM implementation
+{
+ // events
+ struct OneSong
+ {
+ OneSong(string const& asong):m_Song(asong){}
+ const string& get_data() const {return m_Song;}
+ private:
+ string m_Song;
+ };
+ template <class DATA>
+ struct NotFound
+ {
+ DATA get_data() const {return m_Data;}
+ DATA m_Data;
+ };
+ template <class DATA>
+ struct Found
+ {
+ DATA get_data() const {return m_Data;}
+ DATA m_Data;
+ };
+ struct Done {};
+
+ template <class Container,class BASE_TYPE,class FSMType>
+ struct Insert : public boost::msm::front::state<BASE_TYPE,boost::msm::front::sm_ptr>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& )
+ {
+ //TODO other containers
+ if (m_Cont)
+ {
+ m_Cont->insert(evt.get_data());
+ }
+ m_fsm->process_event(Done());
+ }
+ void set_sm_ptr(FSMType* fsm){m_fsm=fsm;}
+ void set_container(Container* cont){m_Cont=cont;}
+ Container* m_Cont;
+
+ private:
+ FSMType* m_fsm;
+ };
+ template <class BASE_TYPE,class FSMType>
+ struct StringFind : public boost::msm::front::state<BASE_TYPE,boost::msm::front::sm_ptr>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& )
+ {
+ //TODO other containers
+ // if the element in the event is found
+ if (evt.get_data().find(m_Cont) != std::string::npos )
+ {
+ Found<std::string> res;
+ res.m_Data = evt.get_data();
+ m_fsm->process_event(res);
+ }
+ // data not found
+ else
+ {
+ NotFound<std::string> res;
+ res.m_Data = evt.get_data();
+ m_fsm->process_event(res);
+ }
+ }
+ void set_sm_ptr(FSMType* fsm){m_fsm=fsm;}
+ void set_container(const char* cont){m_Cont=cont;}
+ private:
+ std::string m_Cont;
+ FSMType* m_fsm;
+ };
+ template <class EventType,class Container,class BASE_TYPE,class FSMType>
+ struct Foreach : public boost::msm::front::state<BASE_TYPE,boost::msm::front::sm_ptr>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const& evt,FSM& )
+ {
+ //TODO other containers
+ if (!m_Cont.empty())
+ {
+ typename Container::value_type next_event = *m_Cont.begin();
+ m_Cont.erase(m_Cont.begin());
+ m_fsm->process_event(EventType(next_event));
+ }
+ }
+ void set_sm_ptr(FSMType* fsm){m_fsm=fsm;}
+ void set_container(Container* cont){m_Cont=*cont;}
+
+ private:
+ Container m_Cont;
+ FSMType* m_fsm;
+ };
+
+
+ // Concrete FSM implementation
+ struct iPodSearch_ : public msm::front::state_machine_def<iPodSearch_>
+ {
+ typedef msm::back::state_machine<iPodSearch_> iPodSearch;
+ // The list of FSM states
+ typedef std::set<std::string> Songset;
+ typedef Insert<Songset,boost::msm::front::default_base_state,iPodSearch> MyInsert;
+ typedef StringFind<boost::msm::front::default_base_state,iPodSearch> MyFind;
+ typedef Foreach<OneSong,Songset,boost::msm::front::default_base_state,iPodSearch> MyForeach;
+
+ // the initial state of the player SM. Must be defined
+ typedef MyForeach initial_state;
+
+ // transition actions
+
+ // guard conditions
+
+ typedef iPodSearch_ fsm; // makes transition table cleaner
+
+ // Transition table for player
+ struct transition_table : mpl::vector4<
+ // Start Event Next Action Guard
+ // +-----------+------------------+------------+---------------------+----------------------+
+ _row < MyForeach , OneSong , MyFind >,
+ _row < MyFind , NotFound<string> , MyForeach >,
+ _row < MyFind , Found<string> , MyInsert >,
+ _row < MyInsert , Done , MyForeach >
+ // +-----------+------------------+------------+---------------------+----------------------+
+ > {};
+ iPodSearch_():m_AllSongs(),m_ResultSearch()
+ {
+ // add a few songs for testing
+ m_AllSongs.insert("Let it be");
+ m_AllSongs.insert("Yellow submarine");
+ m_AllSongs.insert("Twist and Shout");
+ m_AllSongs.insert("She Loves You");
+ }
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& fsm)
+ {
+ fsm.template get_state<MyForeach&>().set_container(&m_AllSongs);
+ fsm.template get_state<MyInsert&>().set_container(&m_ResultSearch);
+ }
+ const Songset& get_result(){return m_ResultSearch;}
+ void reset_search(){m_ResultSearch.clear();}
+
+ // Replaces the default no-transition response.
+ template <class FSM,class Event>
+ void no_transition(Event const& e, FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+
+ private:
+ Songset m_AllSongs;
+ Songset m_ResultSearch;
+ };
+ typedef msm::back::state_machine<iPodSearch_> iPodSearch;
+
+
+ void test()
+ {
+ iPodSearch search;
+ // look for "She Loves You" using the first letters
+ search.get_state<iPodSearch::MyFind*>()->set_container("Sh");// will find 2 songs
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ search.start();
+ // display all the songs
+ const iPodSearch::Songset& res = search.get_result();
+ for (iPodSearch::Songset::const_iterator it = res.begin();it != res.end();++it)
+ {
+ cout << "candidate song:" << *it << endl;
+ }
+ cout << "search using more letters" << endl;
+ // look for "She Loves You" using more letters
+ search.reset_search();
+ search.get_state<iPodSearch::MyFind*>()->set_container("She");// will find 1 song
+ search.start();
+ const iPodSearch::Songset& res2 = search.get_result();
+ for (iPodSearch::Songset::const_iterator it = res2.begin();it != res2.end();++it)
+ {
+ cout << "candidate song:" << *it << endl;
+ }
+
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/iPodSearch.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/iPodSearchEuml.cpp
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/iPodSearchEuml.cpp 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,166 @@
+// same as iPodSearch.cpp but using eUML
+// requires boost >= v1.40 because using mpl::string
+
+#include <vector>
+#include <iostream>
+
+#include <boost/msm/back/state_machine.hpp>
+#include <boost/msm/front/euml/euml.hpp>
+#include <boost/msm/front/euml/stl.hpp>
+
+using namespace std;
+using namespace boost::msm::front::euml;
+namespace msm = boost::msm;
+namespace mpl = boost::mpl;
+
+// how long the timer will ring when countdown elapsed.
+#define RINGING_TIME 5
+
+#define m_src_container 0
+#define m_tgt_container 1
+#define m_song 0
+#define m_letters 0
+#define m_src_it 0
+
+namespace // Concrete FSM implementation
+{
+ // events
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << string()/*m_song*/ )) OneSongDef;
+ struct OneSong : euml_event<OneSong>,OneSongDef
+ {
+ OneSong(){}
+ OneSong(const string& asong)
+ {
+ get_attribute<m_song>()=asong;
+ }
+ OneSong(const char* asong)
+ {
+ get_attribute<m_song>()=asong;
+ }
+ OneSong(const OneSong& asong)
+ {
+ get_attribute<m_song>()=asong.get_attribute<m_song>();
+ }
+ const string& get_data() const {return get_attribute<m_song>();}
+ };
+
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << string()/*m_song*/ )) NotFoundDef;
+ struct NotFound : euml_event<NotFound>,NotFoundDef
+ {
+ NotFound(){}
+ NotFound (const string& data)
+ {
+ get_attribute<m_song>()=data;
+ }
+ };
+
+ typedef BOOST_TYPEOF(build_attributes(attributes_ << string()/*m_song*/ )) FoundDef;
+ struct Found : euml_event<Found>,FoundDef
+ {
+ Found(){}
+ Found (const string& data)
+ {
+ get_attribute<m_song>()=data;
+ }
+ };
+ struct Done : euml_event<Done> {};
+
+
+ // Concrete FSM implementation
+
+ // The list of FSM states
+ typedef BOOST_TYPEOF(build_state( (push_back_(Fsm_<m_tgt_container>(),Event_<m_song>()) ,process_(Done())),
+ NoAction() )) Insert;
+
+
+ typedef BOOST_TYPEOF(build_state( if_then_else_( string_find_(Event_<m_song>(),State_<m_letters>()) != Npos_<string>() ,
+ process2_(Found(),Event_<m_song>()),
+ process2_(NotFound(),Event_<m_song>()) ) ,
+ NoAction(),
+ attributes_ << string()/*m_letters*/ )) StringFind;
+
+ typedef BOOST_TYPEOF(build_state( if_then_( State_<m_src_it>() != end_(Fsm_<m_src_container>()),
+ process2_(OneSong(),*(State_<m_src_it>()++)) ),
+ NoAction(),
+ attributes_ << vector<OneSong>::iterator()/*m_src_it*/ )) Foreach;
+
+
+ // replaces the old transition table
+ typedef BOOST_TYPEOF(build_stt
+ ((Foreach() + OneSong() == StringFind() ,
+ StringFind() + Found() == Insert() ,
+ StringFind() + NotFound() == Foreach() ,
+ Insert() + Done() == Foreach()
+ // +------------------------------------------------------------------------------+
+ ) ) ) transition_table;
+ struct Log_No_Transition : euml_action<Log_No_Transition>
+ {
+ template <class FSM,class Event>
+ void operator()(Event const& e,FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+ };
+ // create a state machine "on the fly"
+ typedef BOOST_TYPEOF(build_sm( transition_table(), //STT
+ init_ << Foreach(), // Init
+ (
+ clear_(attribute_(fsm_(),Int_<m_src_container>())), //clear source
+ clear_(attribute_(fsm_(),Int_<m_tgt_container>())), //clear results
+ push_back_(attribute_(fsm_(),Int_<m_src_container>()),
+ String_<mpl::string<'Let ','it ','be'> >()),//add a song
+ push_back_(attribute_(fsm_(),Int_<m_src_container>()),
+ String_<mpl::string<'Yell','ow s','ubma','rine'> >()),//add a song
+ push_back_(attribute_(fsm_(),Int_<m_src_container>()),
+ String_<mpl::string<'Twis','t an','d Sh','out'> >()),//add a song
+ push_back_(attribute_(fsm_(),Int_<m_src_container>()),
+ String_<mpl::string<'She ','love','s yo','u'> >()),//add a song
+ attribute_(substate_(Foreach()),Int_<m_src_it>())
+ = begin_(attribute_(fsm_(),Int_<m_src_container>())) //set the search begin
+ ), // Entry
+ NoAction(), // Exit
+ attributes_ << vector<OneSong>() /*m_src_container*/ // song list
+ << vector<OneSong>() /*m_tgt_container*/, // result
+ configure_<< no_configure_,
+ Log_No_Transition()
+ )) iPodSearch_;
+
+
+ // choice of back-end
+ typedef msm::back::state_machine<iPodSearch_> iPodSearch;
+
+ void test()
+ {
+ iPodSearch search;
+
+ // look for "She Loves You" using the first letters
+ search.get_state<StringFind&>().get_attribute<m_letters>()="Sh";// will find 2 songs
+
+ // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
+ search.start();
+ // display all the songs
+ for (vector<OneSong>::const_iterator it = search.get_attribute<m_tgt_container>().begin();
+ it != search.get_attribute<m_tgt_container>().end();++it)
+ {
+ cout << "candidate song:" << (*it).get_data() << endl;
+ }
+
+ cout << "search using more letters" << endl;
+ // look for "She Loves You" using more letters
+ search.get_state<StringFind&>().get_attribute<m_letters>()="She";// will find 1 song
+ search.start();
+ // display all the songs
+ for (vector<OneSong>::const_iterator it = search.get_attribute<m_tgt_container>().begin();
+ it != search.get_attribute<m_tgt_container>().end();++it)
+ {
+ cout << "candidate song:" << (*it).get_data() << endl;
+ }
+ }
+}
+
+int main()
+{
+ test();
+ return 0;
+}

Added: sandbox/msm/libs/msm/doc/index-Dateien/colorschememapping.xml
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/index-Dateien/colorschememapping.xml 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<a:clrMap xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/>
\ No newline at end of file

Added: sandbox/msm/libs/msm/doc/index-Dateien/filelist.xml
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/index-Dateien/filelist.xml 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,34 @@
+<xml xmlns:o="urn:schemas-microsoft-com:office:office">
+ <o:MainFile HRef="../index.htm"/>
+ <o:File HRef="item0032.xml"/>
+ <o:File HRef="props0033.xml"/>
+ <o:File HRef="themedata.thmx"/>
+ <o:File HRef="colorschememapping.xml"/>
+ <o:File HRef="image001.jpg"/>
+ <o:File HRef="image027.jpg"/>
+ <o:File HRef="image003.jpg"/>
+ <o:File HRef="image028.jpg"/>
+ <o:File HRef="image005.jpg"/>
+ <o:File HRef="image029.jpg"/>
+ <o:File HRef="image007.jpg"/>
+ <o:File HRef="image030.jpg"/>
+ <o:File HRef="image009.jpg"/>
+ <o:File HRef="image031.jpg"/>
+ <o:File HRef="image011.jpg"/>
+ <o:File HRef="image032.jpg"/>
+ <o:File HRef="image013.jpg"/>
+ <o:File HRef="image033.jpg"/>
+ <o:File HRef="image015.jpg"/>
+ <o:File HRef="image034.jpg"/>
+ <o:File HRef="image017.jpg"/>
+ <o:File HRef="image035.jpg"/>
+ <o:File HRef="image019.jpg"/>
+ <o:File HRef="image036.jpg"/>
+ <o:File HRef="image021.jpg"/>
+ <o:File HRef="image037.jpg"/>
+ <o:File HRef="image023.jpg"/>
+ <o:File HRef="image038.jpg"/>
+ <o:File HRef="image025.jpg"/>
+ <o:File HRef="image039.jpg"/>
+ <o:File HRef="filelist.xml"/>
+</xml>
\ No newline at end of file

Added: sandbox/msm/libs/msm/doc/index-Dateien/image001.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image003.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image005.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image007.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image009.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image011.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image013.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image015.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image017.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image019.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image021.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image023.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image025.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image027.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image028.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image029.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image030.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image031.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image032.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image033.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image034.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image035.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image036.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image037.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image038.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/image039.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index-Dateien/item0032.xml
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/index-Dateien/item0032.xml 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1 @@
+<b:Sources SelectedStyle="\APA.XSL" StyleName="APA" xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"></b:Sources>

Added: sandbox/msm/libs/msm/doc/index-Dateien/props0033.xml
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/index-Dateien/props0033.xml 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<ds:datastoreItem ds:itemID="{510B9391-7F97-4F18-AFC4-2B3C5A63EA09}" xmlns:ds="http://schemas.openxmlformats.org/officeDocument/2006/customXml"><ds:schemaRefs><ds:schemaRef ds:uri="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"/></ds:schemaRefs></ds:datastoreItem>
\ No newline at end of file

Added: sandbox/msm/libs/msm/doc/index-Dateien/themedata.thmx
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/index.htm
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/index.htm 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,19638 @@
+<html xmlns:v="urn:schemas-microsoft-com:vml"
+xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 12">
+<meta name=Originator content="Microsoft Word 12">
+<link rel=File-List href="index-Dateien/filelist.xml">
+<link rel=Edit-Time-Data href="index-Dateien/editdata.mso">
+<!--[if !mso]>
+<style>
+v\:* {behavior:url(#default#VML);}
+o\:* {behavior:url(#default#VML);}
+w\:* {behavior:url(#default#VML);}
+.shape {behavior:url(#default#VML);}
+</style>
+<![endif]--><!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Author>Christophe</o:Author>
+ <o:Template>Normal</o:Template>
+ <o:LastAuthor>Christophe</o:LastAuthor>
+ <o:Revision>277</o:Revision>
+ <o:Created>2009-09-03T20:17:00Z</o:Created>
+ <o:LastSaved>2009-11-09T22:04:00Z</o:LastSaved>
+ <o:Pages>39</o:Pages>
+ <o:Words>18815</o:Words>
+ <o:Characters>118541</o:Characters>
+ <o:Lines>987</o:Lines>
+ <o:Paragraphs>274</o:Paragraphs>
+ <o:CharactersWithSpaces>137082</o:CharactersWithSpaces>
+ <o:Version>12.00</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]-->
+<link rel=dataStoreItem href="index-Dateien/item0032.xml"
+target="index-Dateien/props0033.xml">
+<link rel=themeData href="index-Dateien/themedata.thmx">
+<link rel=colorSchemeMapping href="index-Dateien/colorschememapping.xml">
+<!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackMoves>false</w:TrackMoves>
+ <w:TrackFormatting/>
+ <w:HyphenationZone>21</w:HyphenationZone>
+ <w:ValidateAgainstSchemas/>
+ <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
+ <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
+ <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
+ <w:DoNotPromoteQF/>
+ <w:LidThemeOther>DE</w:LidThemeOther>
+ <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
+ <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
+ <w:Compatibility>
+ <w:BreakWrappedTables/>
+ <w:SnapToGridInCell/>
+ <w:WrapTextWithPunct/>
+ <w:UseAsianBreakRules/>
+ <w:DontGrowAutofit/>
+ <w:SplitPgBreakAndParaMark/>
+ <w:DontVertAlignCellWithSp/>
+ <w:DontBreakConstrainedForcedTables/>
+ <w:DontVertAlignInTxbx/>
+ <w:Word11KerningPairs/>
+ <w:CachedColBalance/>
+ </w:Compatibility>
+ <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
+ <m:mathPr>
+ <m:mathFont m:val="Cambria Math"/>
+ <m:brkBin m:val="before"/>
+ <m:brkBinSub m:val="&#45;-"/>
+ <m:smallFrac m:val="off"/>
+ <m:dispDef/>
+ <m:lMargin m:val="0"/>
+ <m:rMargin m:val="0"/>
+ <m:defJc m:val="centerGroup"/>
+ <m:wrapIndent m:val="1440"/>
+ <m:intLim m:val="subSup"/>
+ <m:naryLim m:val="undOvr"/>
+ </m:mathPr></w:WordDocument>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
+ DefSemiHidden="true" DefQFormat="false" DefPriority="99"
+ LatentStyleCount="267">
+ <w:LsdException Locked="false" Priority="0" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="heading 2"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="heading 3"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
+ <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
+ <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
+ <w:LsdException Locked="false" Priority="10" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Title"/>
+ <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
+ <w:LsdException Locked="false" Priority="11" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
+ <w:LsdException Locked="false" Priority="22" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
+ <w:LsdException Locked="false" Priority="20" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
+ <w:LsdException Locked="false" Priority="59" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Table Grid"/>
+ <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
+ <w:LsdException Locked="false" Priority="1" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List Accent 1"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
+ <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
+ <w:LsdException Locked="false" Priority="34" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
+ <w:LsdException Locked="false" Priority="29" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
+ <w:LsdException Locked="false" Priority="30" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List Accent 1"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List Accent 2"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List Accent 2"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List Accent 3"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List Accent 3"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List Accent 4"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List Accent 4"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List Accent 5"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List Accent 5"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
+ <w:LsdException Locked="false" Priority="60" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
+ <w:LsdException Locked="false" Priority="61" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light List Accent 6"/>
+ <w:LsdException Locked="false" Priority="62" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
+ <w:LsdException Locked="false" Priority="63" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="64" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="65" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="66" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="67" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="68" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="69" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="70" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Dark List Accent 6"/>
+ <w:LsdException Locked="false" Priority="71" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
+ <w:LsdException Locked="false" Priority="72" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
+ <w:LsdException Locked="false" Priority="73" SemiHidden="false"
+ UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
+ <w:LsdException Locked="false" Priority="19" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
+ <w:LsdException Locked="false" Priority="21" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
+ <w:LsdException Locked="false" Priority="31" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
+ <w:LsdException Locked="false" Priority="32" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
+ <w:LsdException Locked="false" Priority="33" SemiHidden="false"
+ UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
+ <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
+ <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
+ </w:LatentStyles>
+</xml><![endif]-->
+<style>
+<!--table.MSOTABLELIGHTSHADINGFIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGLASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTLISTFIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTLISTLASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLEMEDIUMSHADING1FIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLEMEDIUMSHADING1LASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT1FIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT1LASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTLISTACCENT1FIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTLISTACCENT1LASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT2FIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT2LASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT4FIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT4LASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT5FIRSTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+table.MSOTABLELIGHTSHADINGACCENT5LASTROW
+ {mso-para-margin-top:auto;
+ mso-para-margin-bottom:auto;}
+
+ /* Font Definitions */
+ @font-face
+ {font-family:Helvetica;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Courier;
+ panose-1:2 7 4 9 2 2 5 2 4 4;
+ mso-font-charset:0;
+ mso-generic-font-family:modern;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Tms Rmn";
+ panose-1:2 2 6 3 4 5 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Helv;
+ panose-1:2 11 6 4 2 2 2 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"New York";
+ panose-1:2 4 5 3 6 5 6 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:System;
+ panose-1:0 0 0 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Wingdings;
+ panose-1:5 0 0 0 0 0 0 0 0 0;
+ mso-font-charset:2;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"MS Mincho";
+ panose-1:2 2 6 9 4 2 5 8 3 4;
+ mso-font-alt:"\FF2D\FF33 \660E\671D";
+ mso-font-charset:128;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:Batang;
+ panose-1:2 3 6 0 0 1 1 1 1 1;
+ mso-font-alt:\BC14\D0D5;
+ mso-font-charset:129;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:SimSun;
+ panose-1:2 1 6 0 3 1 1 1 1 1;
+ mso-font-alt:\5B8B\4F53;
+ mso-font-charset:134;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:3 680460288 22 0 262145 0;}
+@font-face
+ {font-family:PMingLiU;
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-alt:\65B0\7D30\660E\9AD4;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
+@font-face
+ {font-family:"MS Gothic";
+ panose-1:2 11 6 9 7 2 5 8 2 4;
+ mso-font-alt:"\FF2D\FF33 \30B4\30B7\30C3\30AF";
+ mso-font-charset:128;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:Dotum;
+ panose-1:2 11 6 0 0 1 1 1 1 1;
+ mso-font-alt:\B3CB\C6C0;
+ mso-font-charset:129;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:SimHei;
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-alt:\9ED1\4F53;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482945 953122042 22 0 262145 0;}
+@font-face
+ {font-family:MingLiU;
+ panose-1:2 2 5 9 0 0 0 0 0 0;
+ mso-font-alt:\7D30\660E\9AD4;
+ mso-font-charset:136;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
+@font-face
+ {font-family:Mincho;
+ panose-1:2 2 6 9 4 3 5 8 3 5;
+ mso-font-alt:\660E\671D;
+ mso-font-charset:128;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:fixed;
+ mso-font-signature:1 134676480 16 0 131072 0;}
+@font-face
+ {font-family:Gulim;
+ panose-1:2 11 6 0 0 1 1 1 1 1;
+ mso-font-alt:\AD74\B9BC;
+ mso-font-charset:129;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:Century;
+ panose-1:2 4 6 4 5 5 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Angsana New";
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706429 0 0 0 65537 0;}
+@font-face
+ {font-family:"Cordia New";
+ panose-1:2 11 3 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706429 0 0 0 65537 0;}
+@font-face
+ {font-family:Mangal;
+ panose-1:2 4 5 3 5 2 3 3 2 2;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:32771 0 0 0 1 0;}
+@font-face
+ {font-family:Latha;
+ panose-1:2 0 4 0 0 0 0 0 0 0;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:262144 0 0 0 0 0;}
+@font-face
+ {font-family:Sylfaen;
+ panose-1:1 10 5 2 5 3 6 3 3 3;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:67110535 0 0 0 159 0;}
+@font-face
+ {font-family:Vrinda;
+ panose-1:1 1 6 0 1 1 1 1 1 1;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:65539 0 0 0 1 0;}
+@font-face
+ {font-family:Raavi;
+ panose-1:2 0 5 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:131075 0 0 0 1 0;}
+@font-face
+ {font-family:Shruti;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:262147 0 0 0 1 0;}
+@font-face
+ {font-family:Sendnya;
+ panose-1:0 0 4 0 0 0 0 0 0 0;
+ mso-font-charset:1;
+ mso-generic-font-family:roman;
+ mso-font-format:other;
+ mso-font-pitch:variable;
+ mso-font-signature:0 0 0 0 0 0;}
+@font-face
+ {font-family:Gautami;
+ panose-1:2 0 5 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:-2145386493 0 0 0 1 0;}
+@font-face
+ {font-family:Tunga;
+ panose-1:0 0 4 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:4194307 0 0 0 1 0;}
+@font-face
+ {font-family:"Estrangelo Edessa";
+ panose-1:3 8 6 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147475389 0 128 0 1 0;}
+@font-face
+ {font-family:"Cambria Math";
+ panose-1:2 4 5 3 5 4 6 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611985 1107304683 0 0 159 0;}
+@font-face
+ {font-family:"Arial Unicode MS";
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-134238209 -371195905 63 0 4129279 0;}
+@font-face
+ {font-family:Cambria;
+ panose-1:2 4 5 3 5 4 6 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611985 1073741899 0 0 159 0;}
+@font-face
+ {font-family:Calibri;
+ panose-1:2 15 5 2 2 2 4 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611985 1073750139 0 0 159 0;}
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-520082689 -1073717157 41 0 66047 0;}
+@font-face
+ {font-family:Consolas;
+ panose-1:2 11 6 9 2 2 4 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1610611985 1073750091 0 0 159 0;}
+@font-face
+ {font-family:OpenSymbol;
+ panose-1:5 1 0 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483473 268561642 0 0 1 0;}
+@font-face
+ {font-family:Miriam;
+ panose-1:2 11 5 2 5 1 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:"Lucida Sans Unicode";
+ panose-1:2 11 6 2 3 5 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147480833 14699 0 0 191 0;}
+@font-face
+ {font-family:Marlett;
+ panose-1:0 0 0 0 0 0 0 0 0 0;
+ mso-font-charset:2;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"\@Batang";
+ panose-1:2 3 6 0 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:BatangChe;
+ panose-1:2 3 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:"\@BatangChe";
+ panose-1:2 3 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:Gungsuh;
+ panose-1:2 3 6 0 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:"\@Gungsuh";
+ panose-1:2 3 6 0 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:GungsuhChe;
+ panose-1:2 3 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:"\@GungsuhChe";
+ panose-1:2 3 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:DaunPenh;
+ panose-1:1 1 1 1 1 1 1 1 1 1;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 65536 0 1 0;}
+@font-face
+ {font-family:DokChampa;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:50331651 0 0 0 65537 0;}
+@font-face
+ {font-family:Euphemia;
+ panose-1:2 11 5 3 4 1 2 2 1 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483537 74 8192 0 1 0;}
+@font-face
+ {font-family:"\@Gulim";
+ panose-1:2 11 6 0 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:GulimChe;
+ panose-1:2 11 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:"\@GulimChe";
+ panose-1:2 11 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:"\@Dotum";
+ panose-1:2 11 6 0 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:DotumChe;
+ panose-1:2 11 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:"\@DotumChe";
+ panose-1:2 11 6 9 0 1 1 1 1 1;
+ mso-font-charset:129;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1342176593 1775729915 48 0 524447 0;}
+@font-face
+ {font-family:Impact;
+ panose-1:2 11 8 6 3 9 2 5 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Iskoola Pota";
+ panose-1:2 2 6 3 5 4 5 3 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 512 0 1 0;}
+@font-face
+ {font-family:Kalinga;
+ panose-1:2 0 6 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:524291 0 0 0 1 0;}
+@font-face
+ {font-family:Kartika;
+ panose-1:2 2 5 3 3 4 4 6 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:8388611 0 0 0 1 0;}
+@font-face
+ {font-family:"Lucida Console";
+ panose-1:2 11 6 9 4 5 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482993 6144 0 0 31 0;}
+@font-face
+ {font-family:"Malgun Gothic";
+ panose-1:2 11 5 3 2 0 0 2 0 4;
+ mso-font-charset:129;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1879047505 165117179 18 0 524289 0;}
+@font-face
+ {font-family:"\@Malgun Gothic";
+ panose-1:2 11 5 3 2 0 0 2 0 4;
+ mso-font-charset:129;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1879047505 165117179 18 0 524289 0;}
+@font-face
+ {font-family:Meiryo;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791492095 18 0 131081 0;}
+@font-face
+ {font-family:"\@Meiryo";
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791492095 18 0 131081 0;}
+@font-face
+ {font-family:"Microsoft Himalaya";
+ panose-1:1 1 1 0 1 1 1 1 1 1;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483645 65536 64 0 1 0;}
+@font-face
+ {font-family:"Microsoft JhengHei";
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:136;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:135 680476672 22 0 1048585 0;}
+@font-face
+ {font-family:"\@Microsoft JhengHei";
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:136;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:135 680476672 22 0 1048585 0;}
+@font-face
+ {font-family:"Microsoft YaHei";
+ panose-1:2 11 5 3 2 2 4 2 2 4;
+ mso-font-charset:134;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483001 705641554 22 0 262175 0;}
+@font-face
+ {font-family:"\@Microsoft YaHei";
+ panose-1:2 11 5 3 2 2 4 2 2 4;
+ mso-font-charset:134;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483001 705641554 22 0 262175 0;}
+@font-face
+ {font-family:"\@MingLiU";
+ panose-1:2 2 5 9 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
+@font-face
+ {font-family:"\@PMingLiU";
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
+@font-face
+ {font-family:MingLiU_HKSCS;
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483645 684719354 22 0 1048577 0;}
+@font-face
+ {font-family:"\@MingLiU_HKSCS";
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483645 684719354 22 0 1048577 0;}
+@font-face
+ {font-family:MingLiU-ExtB;
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483601 168296456 16 0 1048577 0;}
+@font-face
+ {font-family:"\@MingLiU-ExtB";
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483601 168296456 16 0 1048577 0;}
+@font-face
+ {font-family:PMingLiU-ExtB;
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483601 168296456 16 0 1048577 0;}
+@font-face
+ {font-family:"\@PMingLiU-ExtB";
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483601 168296456 16 0 1048577 0;}
+@font-face
+ {font-family:MingLiU_HKSCS-ExtB;
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483601 168296456 16 0 1048577 0;}
+@font-face
+ {font-family:"\@MingLiU_HKSCS-ExtB";
+ panose-1:2 2 5 0 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483601 168296456 16 0 1048577 0;}
+@font-face
+ {font-family:"Mongolian Baiti";
+ panose-1:3 0 5 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483613 0 131072 0 1 0;}
+@font-face
+ {font-family:"\@MS Gothic";
+ panose-1:2 11 6 9 7 2 5 8 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"MS PGothic";
+ panose-1:2 11 6 0 7 2 5 8 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"\@MS PGothic";
+ panose-1:2 11 6 0 7 2 5 8 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"MS UI Gothic";
+ panose-1:2 11 6 0 7 2 5 8 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"\@MS UI Gothic";
+ panose-1:2 11 6 0 7 2 5 8 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"\@MS Mincho";
+ panose-1:2 2 6 9 4 2 5 8 3 4;
+ mso-font-charset:128;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"MS PMincho";
+ panose-1:2 2 6 0 4 2 5 8 3 4;
+ mso-font-charset:128;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"\@MS PMincho";
+ panose-1:2 2 6 0 4 2 5 8 3 4;
+ mso-font-charset:128;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870145 1791491579 18 0 131231 0;}
+@font-face
+ {font-family:"MV Boli";
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 256 0 1 0;}
+@font-face
+ {font-family:Nyala;
+ panose-1:2 0 5 4 7 3 0 2 0 3;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610612625 0 2048 0 147 0;}
+@font-face
+ {font-family:"Plantagenet Cherokee";
+ panose-1:2 2 6 2 7 1 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 4096 0 1 0;}
+@font-face
+ {font-family:"Segoe Script";
+ panose-1:2 11 5 4 2 0 0 0 0 3;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:655 0 0 0 159 0;}
+@font-face
+ {font-family:"Segoe UI";
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536861953 -1073733541 9 0 479 0;}
+@font-face
+ {font-family:"\@SimSun";
+ panose-1:2 1 6 0 3 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:3 680460288 22 0 262145 0;}
+@font-face
+ {font-family:NSimSun;
+ panose-1:2 1 6 9 3 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 680460288 22 0 262145 0;}
+@font-face
+ {font-family:"\@NSimSun";
+ panose-1:2 1 6 9 3 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 680460288 22 0 262145 0;}
+@font-face
+ {font-family:SimSun-ExtB;
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 168689664 16 0 262145 0;}
+@font-face
+ {font-family:"\@SimSun-ExtB";
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 168689664 16 0 262145 0;}
+@font-face
+ {font-family:"Microsoft Yi Baiti";
+ panose-1:3 0 5 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483645 66562 524290 0 1 0;}
+@font-face
+ {font-family:"Microsoft Sans Serif";
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-520082689 -1073741822 8 0 66047 0;}
+@font-face
+ {font-family:Gisha;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147481593 1073741890 0 0 33 0;}
+@font-face
+ {font-family:Leelawadee;
+ panose-1:2 11 5 2 4 2 4 2 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706257 1073750091 0 0 65537 0;}
+@font-face
+ {font-family:"Microsoft Uighur";
+ panose-1:2 0 0 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:8195 -2147483648 8 0 65 0;}
+@font-face
+ {font-family:MoolBoran;
+ panose-1:2 11 1 0 1 1 1 1 1 1;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483633 8266 65536 0 1 0;}
+@font-face
+ {font-family:Andalus;
+ panose-1:2 1 0 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:8195 -2147483648 8 0 65 0;}
+@font-face
+ {font-family:"Arabic Typesetting";
+ panose-1:3 2 4 2 4 4 6 3 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610604433 -1073741824 8 0 211 0;}
+@font-face
+ {font-family:"Simplified Arabic";
+ panose-1:2 1 0 0 0 0 0 0 0 0;
+ mso-font-charset:178;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:8193 0 0 0 64 0;}
+@font-face
+ {font-family:"Simplified Arabic Fixed";
+ panose-1:2 1 0 9 0 0 0 0 0 0;
+ mso-font-charset:178;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:8193 0 0 0 64 0;}
+@font-face
+ {font-family:"Traditional Arabic";
+ panose-1:2 1 0 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:8195 -2147483648 8 0 65 0;}
+@font-face
+ {font-family:Aharoni;
+ panose-1:2 1 8 3 2 1 4 3 2 3;
+ mso-font-charset:177;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:David;
+ panose-1:2 14 5 2 6 4 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:FrankRuehl;
+ panose-1:2 14 5 3 6 1 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:"Levenim MT";
+ panose-1:2 1 5 2 6 1 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:"Miriam Fixed";
+ panose-1:2 11 5 9 5 1 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:Narkisim;
+ panose-1:2 14 5 2 5 1 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:Rod;
+ panose-1:2 3 5 9 5 1 1 1 1 1;
+ mso-font-charset:177;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:2049 0 0 0 32 0;}
+@font-face
+ {font-family:FangSong;
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482945 953122042 22 0 262145 0;}
+@font-face
+ {font-family:"\@FangSong";
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482945 953122042 22 0 262145 0;}
+@font-face
+ {font-family:"\@SimHei";
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482945 953122042 22 0 262145 0;}
+@font-face
+ {font-family:KaiTi;
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482945 953122042 22 0 262145 0;}
+@font-face
+ {font-family:"\@KaiTi";
+ panose-1:2 1 6 9 6 1 1 1 1 1;
+ mso-font-charset:134;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147482945 953122042 22 0 262145 0;}
+@font-face
+ {font-family:AngsanaUPC;
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706429 0 0 0 65537 0;}
+@font-face
+ {font-family:"Browallia New";
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706429 0 0 0 65537 0;}
+@font-face
+ {font-family:BrowalliaUPC;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706429 0 0 0 65537 0;}
+@font-face
+ {font-family:CordiaUPC;
+ panose-1:2 11 3 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706429 0 0 0 65537 0;}
+@font-face
+ {font-family:DilleniaUPC;
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706393 2 0 0 65537 0;}
+@font-face
+ {font-family:EucrosiaUPC;
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2130706393 2 0 0 65537 0;}
+@font-face
+ {font-family:FreesiaUPC;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:16777223 2 0 0 65537 0;}
+@font-face
+ {font-family:IrisUPC;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:16777223 2 0 0 65537 0;}
+@font-face
+ {font-family:JasmineUPC;
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:16777223 2 0 0 65537 0;}
+@font-face
+ {font-family:KodchiangUPC;
+ panose-1:2 2 6 3 5 4 5 2 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:16777223 2 0 0 65537 0;}
+@font-face
+ {font-family:LilyUPC;
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:16777223 2 0 0 65537 0;}
+@font-face
+ {font-family:DFKai-SB;
+ panose-1:3 0 5 9 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:script;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 135135232 22 0 1048577 0;}
+@font-face
+ {font-family:"\@DFKai-SB";
+ panose-1:3 0 5 9 0 0 0 0 0 0;
+ mso-font-charset:136;
+ mso-generic-font-family:script;
+ mso-font-pitch:fixed;
+ mso-font-signature:3 135135232 22 0 1048577 0;}
+@font-face
+ {font-family:"Arial Black";
+ panose-1:2 11 10 4 2 1 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:Candara;
+ panose-1:2 14 5 2 3 3 3 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611985 1073750091 0 0 159 0;}
+@font-face
+ {font-family:"Comic Sans MS";
+ panose-1:3 15 7 2 3 3 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:Constantia;
+ panose-1:2 3 6 2 5 3 6 3 3 3;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611985 1073750091 0 0 159 0;}
+@font-face
+ {font-family:Corbel;
+ panose-1:2 11 5 3 2 2 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1610611985 1073750091 0 0 159 0;}
+@font-face
+ {font-family:"Franklin Gothic Medium";
+ panose-1:2 11 6 3 2 1 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:Georgia;
+ panose-1:2 4 5 2 5 4 5 2 3 3;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Palatino Linotype";
+ panose-1:2 4 5 2 5 3 5 10 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-536870265 1073741843 0 0 415 0;}
+@font-face
+ {font-family:"Segoe Print";
+ panose-1:2 0 6 0 0 0 0 0 0 0;
+ mso-font-charset:0;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:655 0 0 0 159 0;}
+@font-face
+ {font-family:"Trebuchet MS";
+ panose-1:2 11 6 3 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:Verdana;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-1593833729 1073750107 16 0 415 0;}
+@font-face
+ {font-family:Webdings;
+ panose-1:5 3 1 2 1 5 9 6 7 3;
+ mso-font-charset:2;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:Nina;
+ panose-1:2 11 6 6 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Bitstream Vera Sans Mono";
+ panose-1:2 11 6 9 3 8 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-2147483473 268443722 0 0 1 0;}
+@font-face
+ {font-family:"Bitstream Vera Serif";
+ panose-1:2 6 6 3 5 6 5 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483473 268443722 0 0 1 0;}
+@font-face
+ {font-family:"Bitstream Vera Sans";
+ panose-1:2 11 6 3 3 8 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-2147483473 268443722 0 0 1 0;}
+@font-face
+ {font-family:"Segoe Condensed";
+ panose-1:2 11 6 6 4 2 0 2 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"DejaVu Sans Condensed";
+ panose-1:2 11 6 6 3 8 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-419426561 1375794687 168042529 0 447 0;}
+@font-face
+ {font-family:"DejaVu Serif";
+ panose-1:2 6 6 3 5 6 5 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-469761281 1342206459 134479904 0 159 0;}
+@font-face
+ {font-family:"DejaVu Serif Condensed";
+ panose-1:2 6 6 6 5 6 5 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-469761281 1342206459 134479904 0 159 0;}
+@font-face
+ {font-family:"DejaVu Sans Mono";
+ panose-1:2 11 6 9 3 8 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-436206849 1342208507 32 0 159 0;}
+@font-face
+ {font-family:"DejaVu Sans";
+ panose-1:2 11 6 3 3 8 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-419418369 -771686913 168042537 0 -2147483137 0;}
+@font-face
+ {font-family:"DejaVu Sans Light";
+ panose-1:2 11 2 3 3 8 4 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-536860929 1342177403 134217760 0 415 0;}
+@font-face
+ {font-family:"MT Extra";
+ panose-1:5 5 1 2 1 2 5 2 2 2;
+ mso-font-charset:2;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"Bookshelf Symbol 7";
+ panose-1:5 1 1 1 1 1 1 1 1 1;
+ mso-font-charset:2;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"MS Reference Sans Serif";
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:536871559 0 0 0 415 0;}
+@font-face
+ {font-family:"MS Reference Specialty";
+ panose-1:5 0 5 0 0 0 0 0 0 0;
+ mso-font-charset:2;
+ mso-generic-font-family:auto;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"Bradley Hand ITC";
+ panose-1:3 7 4 2 5 3 2 3 2 3;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Freestyle Script";
+ panose-1:3 8 4 2 3 2 5 11 4 4;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"French Script MT";
+ panose-1:3 2 4 2 4 6 7 4 6 5;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Juice ITC";
+ panose-1:4 4 4 3 4 10 2 2 2 2;
+ mso-font-charset:0;
+ mso-generic-font-family:decorative;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Kristen ITC";
+ panose-1:3 5 5 2 4 2 2 3 2 2;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Lucida Handwriting";
+ panose-1:3 1 1 1 1 1 1 1 1 1;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Mistral;
+ panose-1:3 9 7 2 3 4 7 2 4 3;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:Papyrus;
+ panose-1:3 7 5 2 6 5 2 3 2 5;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:Pristina;
+ panose-1:3 6 4 2 4 4 6 8 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Tempus Sans ITC";
+ panose-1:4 2 4 4 3 13 7 2 2 2;
+ mso-font-charset:0;
+ mso-generic-font-family:decorative;
+ mso-font-pitch:variable;
+ mso-font-signature:3 0 0 0 1 0;}
+@font-face
+ {font-family:"Book Antiqua";
+ panose-1:2 4 6 2 5 3 5 3 3 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:Garamond;
+ panose-1:2 2 4 4 3 3 1 1 8 3;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Monotype Corsiva";
+ panose-1:3 1 1 1 1 2 1 1 1 1;
+ mso-font-charset:0;
+ mso-generic-font-family:script;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Century Gothic";
+ panose-1:2 11 5 2 2 2 2 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Wingdings 2";
+ panose-1:5 2 1 2 1 5 7 7 7 7;
+ mso-font-charset:2;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"Wingdings 3";
+ panose-1:5 4 1 2 1 8 7 7 7 7;
+ mso-font-charset:2;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:0 268435456 0 0 -2147483648 0;}
+@font-face
+ {font-family:"\@Arial Unicode MS";
+ panose-1:2 11 6 4 2 2 2 2 2 4;
+ mso-font-charset:128;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:-134238209 -371195905 63 0 4129279 0;}
+@font-face
+ {font-family:"Bookman Old Style";
+ panose-1:2 5 6 4 5 5 5 2 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:647 0 0 0 159 0;}
+@font-face
+ {font-family:"Arial Narrow";
+ panose-1:2 11 6 6 2 2 2 3 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:647 2048 0 0 159 0;}
+ /* Style Definitions */
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-parent:"";
+ margin:0cm;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+h1
+ {mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-link:"\00DCberschrift 1 Zchn";
+ mso-margin-top-alt:auto;
+ margin-right:0cm;
+ margin-bottom:5.95pt;
+ margin-left:0cm;
+ mso-pagination:widow-orphan;
+ mso-outline-level:1;
+ font-size:24.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;
+ font-weight:bold;}
+h2
+ {mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-link:"\00DCberschrift 2 Zchn";
+ mso-margin-top-alt:auto;
+ margin-right:0cm;
+ mso-margin-bottom-alt:auto;
+ margin-left:0cm;
+ mso-pagination:widow-orphan;
+ mso-outline-level:2;
+ font-size:18.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;
+ font-weight:bold;}
+h3
+ {mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-link:"\00DCberschrift 3 Zchn";
+ mso-margin-top-alt:auto;
+ margin-right:0cm;
+ mso-margin-bottom-alt:auto;
+ margin-left:0cm;
+ mso-pagination:widow-orphan;
+ mso-outline-level:3;
+ font-size:13.5pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;
+ font-weight:bold;}
+h4
+ {mso-style-noshow:yes;
+ mso-style-priority:9;
+ mso-style-qformat:yes;
+ mso-style-link:"\00DCberschrift 4 Zchn";
+ mso-style-next:Standard;
+ margin-top:10.0pt;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:0cm;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan lines-together;
+ page-break-after:avoid;
+ mso-outline-level:4;
+ font-size:12.0pt;
+ font-family:"Cambria","serif";
+ mso-ascii-font-family:Cambria;
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:Cambria;
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#4F81BD;
+ mso-themecolor:accent1;
+ font-weight:bold;
+ font-style:italic;}
+a:link, span.MsoHyperlink
+ {mso-style-priority:99;
+ color:blue;
+ text-decoration:underline;
+ text-underline:single;}
+a:visited, span.MsoHyperlinkFollowed
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ color:purple;
+ text-decoration:underline;
+ text-underline:single;}
+p
+ {mso-style-priority:99;
+ mso-margin-top-alt:auto;
+ margin-right:0cm;
+ margin-bottom:5.95pt;
+ margin-left:0cm;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+code
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ font-family:"Courier New";
+ mso-ascii-font-family:"Courier New";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;
+ mso-hansi-font-family:"Courier New";
+ mso-bidi-font-family:"Courier New";}
+pre
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-link:"HTML Vorformatiert Zchn";
+ margin:0cm;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ font-size:10.0pt;
+ font-family:"Courier New";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-link:"Sprechblasentext Zchn";
+ margin:0cm;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:"Tahoma","sans-serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
+ {mso-style-noshow:yes;
+ mso-style-priority:34;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ margin-top:0cm;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:36.0pt;
+ margin-bottom:.0001pt;
+ mso-add-space:auto;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
+ {mso-style-noshow:yes;
+ mso-style-priority:34;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-type:export-only;
+ margin-top:0cm;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:36.0pt;
+ margin-bottom:.0001pt;
+ mso-add-space:auto;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
+ {mso-style-noshow:yes;
+ mso-style-priority:34;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-type:export-only;
+ margin-top:0cm;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:36.0pt;
+ margin-bottom:.0001pt;
+ mso-add-space:auto;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
+ {mso-style-noshow:yes;
+ mso-style-priority:34;
+ mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-type:export-only;
+ margin-top:0cm;
+ margin-right:0cm;
+ margin-bottom:0cm;
+ margin-left:36.0pt;
+ margin-bottom:.0001pt;
+ mso-add-space:auto;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+span.berschrift1Zchn
+ {mso-style-name:"\00DCberschrift 1 Zchn";
+ mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:"\00DCberschrift 1";
+ mso-ansi-font-size:14.0pt;
+ mso-bidi-font-size:14.0pt;
+ font-family:"Cambria","serif";
+ mso-ascii-font-family:Cambria;
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:Cambria;
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#365F91;
+ mso-themecolor:accent1;
+ mso-themeshade:191;
+ font-weight:bold;}
+span.berschrift2Zchn
+ {mso-style-name:"\00DCberschrift 2 Zchn";
+ mso-style-noshow:yes;
+ mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:"\00DCberschrift 2";
+ mso-ansi-font-size:13.0pt;
+ mso-bidi-font-size:13.0pt;
+ font-family:"Cambria","serif";
+ mso-ascii-font-family:Cambria;
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:Cambria;
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#4F81BD;
+ mso-themecolor:accent1;
+ font-weight:bold;}
+span.berschrift3Zchn
+ {mso-style-name:"\00DCberschrift 3 Zchn";
+ mso-style-noshow:yes;
+ mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:"\00DCberschrift 3";
+ mso-ansi-font-size:12.0pt;
+ mso-bidi-font-size:12.0pt;
+ font-family:"Cambria","serif";
+ mso-ascii-font-family:Cambria;
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:Cambria;
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#4F81BD;
+ mso-themecolor:accent1;
+ font-weight:bold;}
+span.berschrift4Zchn
+ {mso-style-name:"\00DCberschrift 4 Zchn";
+ mso-style-noshow:yes;
+ mso-style-priority:9;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:"\00DCberschrift 4";
+ mso-ansi-font-size:12.0pt;
+ mso-bidi-font-size:12.0pt;
+ font-family:"Cambria","serif";
+ mso-ascii-font-family:Cambria;
+ mso-ascii-theme-font:major-latin;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:major-fareast;
+ mso-hansi-font-family:Cambria;
+ mso-hansi-theme-font:major-latin;
+ mso-bidi-font-family:"Times New Roman";
+ mso-bidi-theme-font:major-bidi;
+ color:#4F81BD;
+ mso-themecolor:accent1;
+ font-weight:bold;
+ font-style:italic;}
+span.HTMLVorformatiertZchn
+ {mso-style-name:"HTML Vorformatiert Zchn";
+ mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:"HTML Vorformatiert";
+ font-family:Consolas;
+ mso-ascii-font-family:Consolas;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;
+ mso-hansi-font-family:Consolas;}
+span.SprechblasentextZchn
+ {mso-style-name:"Sprechblasentext Zchn";
+ mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-unhide:no;
+ mso-style-locked:yes;
+ mso-style-link:Sprechblasentext;
+ mso-ansi-font-size:8.0pt;
+ mso-bidi-font-size:8.0pt;
+ font-family:"Tahoma","sans-serif";
+ mso-ascii-font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;
+ mso-hansi-font-family:Tahoma;
+ mso-bidi-font-family:Tahoma;}
+span.preprocessor
+ {mso-style-name:preprocessor;
+ mso-style-unhide:no;}
+span.special
+ {mso-style-name:special;
+ mso-style-unhide:no;}
+span.identifier
+ {mso-style-name:identifier;
+ mso-style-unhide:no;}
+span.msoIns
+ {mso-style-type:export-only;
+ mso-style-name:"";
+ text-decoration:underline;
+ text-underline:single;
+ color:teal;}
+span.msoDel
+ {mso-style-type:export-only;
+ mso-style-name:"";
+ text-decoration:line-through;
+ color:red;}
+.MsoChpDefault
+ {mso-style-type:export-only;
+ mso-default-props:yes;
+ font-size:10.0pt;
+ mso-ansi-font-size:10.0pt;
+ mso-bidi-font-size:10.0pt;}
+@page Section1
+ {size:595.3pt 841.9pt;
+ margin:70.85pt 70.85pt 2.0cm 70.85pt;
+ mso-header-margin:35.4pt;
+ mso-footer-margin:35.4pt;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+ /* List Definitions */
+ @list l0
+ {mso-list-id:2052744;
+ mso-list-template-ids:-493329040;}
+@list l0:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l0:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l0:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1
+ {mso-list-id:9528912;
+ mso-list-template-ids:-1730124760;}
+@list l1:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l1:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l1:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2
+ {mso-list-id:61873234;
+ mso-list-template-ids:961943314;}
+@list l2:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l2:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l2:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3
+ {mso-list-id:113259448;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-1334279470 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l3:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l3:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l3:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4
+ {mso-list-id:172650312;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-63165634 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l4:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l4:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l4:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5
+ {mso-list-id:182867113;
+ mso-list-template-ids:1061459582;}
+@list l5:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l5:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l5:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6
+ {mso-list-id:303658219;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1868583318 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l6:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l6:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l6:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7
+ {mso-list-id:396442374;
+ mso-list-type:hybrid;
+ mso-list-template-ids:524832518 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l7:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l7:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l7:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8
+ {mso-list-id:438571780;
+ mso-list-template-ids:1555833732;}
+@list l8:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l8:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l8:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9
+ {mso-list-id:474181410;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1413511628 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l9:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l9:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l9:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10
+ {mso-list-id:502402215;
+ mso-list-template-ids:864963542;}
+@list l10:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l10:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l10:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11
+ {mso-list-id:530804595;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-1673239034 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l11:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l11:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l11:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12
+ {mso-list-id:558129470;
+ mso-list-template-ids:-1638399218;}
+@list l12:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l12:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l12:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13
+ {mso-list-id:602569479;
+ mso-list-template-ids:1018057442;}
+@list l13:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l13:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l13:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14
+ {mso-list-id:610279850;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1023213496 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l14:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l14:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l14:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15
+ {mso-list-id:619726856;
+ mso-list-type:hybrid;
+ mso-list-template-ids:512903894 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l15:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l15:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l15:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16
+ {mso-list-id:649598104;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1536707106 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l16:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l16:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l16:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17
+ {mso-list-id:720399495;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-1279387748 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l17:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ margin-left:54.0pt;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l17:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l17:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18
+ {mso-list-id:754670753;
+ mso-list-template-ids:-1551972502;}
+@list l18:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l18:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l18:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19
+ {mso-list-id:761100156;
+ mso-list-template-ids:836958140;}
+@list l19:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l19:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l19:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20
+ {mso-list-id:781069911;
+ mso-list-type:hybrid;
+ mso-list-template-ids:129686144 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l20:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l20:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l20:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21
+ {mso-list-id:849757469;
+ mso-list-type:hybrid;
+ mso-list-template-ids:516825884 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l21:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ margin-left:54.0pt;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l21:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l21:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22
+ {mso-list-id:963121799;
+ mso-list-template-ids:-350171470;}
+@list l22:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l22:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l22:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23
+ {mso-list-id:991059834;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-458720232 67567617 67567617 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l23:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l23:level2
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l23:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l23:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24
+ {mso-list-id:1040057886;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-936729874 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l24:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l24:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l24:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25
+ {mso-list-id:1055087789;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-2075332068 2091289928 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l25:level1
+ {mso-level-start-at:0;
+ mso-level-number-format:bullet;
+ mso-level-text:-;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+@list l25:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l25:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26
+ {mso-list-id:1145241846;
+ mso-list-template-ids:540567464;}
+@list l26:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l26:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l26:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27
+ {mso-list-id:1168325453;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1479189550 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l27:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l27:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l27:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28
+ {mso-list-id:1259830084;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-2019906010 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l28:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l28:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l28:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29
+ {mso-list-id:1280065955;
+ mso-list-type:hybrid;
+ mso-list-template-ids:272824830 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l29:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ margin-left:54.0pt;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l29:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l29:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30
+ {mso-list-id:1412967759;
+ mso-list-template-ids:-567780602;}
+@list l30:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l30:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l30:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31
+ {mso-list-id:1466392733;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1819157884 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l31:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l31:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l31:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32
+ {mso-list-id:1493108425;
+ mso-list-template-ids:-541802490;}
+@list l32:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l32:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l32:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33
+ {mso-list-id:1501776453;
+ mso-list-template-ids:365886082;}
+@list l33:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l33:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l33:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34
+ {mso-list-id:1616715111;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1879050554 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l34:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l34:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l34:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35
+ {mso-list-id:1659649190;
+ mso-list-template-ids:-1058523542;}
+@list l35:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l35:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l35:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l36
+ {mso-list-id:1694914861;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-1614647314 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l36:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l37
+ {mso-list-id:1745571200;
+ mso-list-template-ids:-429486050;}
+@list l37:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l37:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l37:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38
+ {mso-list-id:1816599751;
+ mso-list-template-ids:-2056904892;}
+@list l38:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l38:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l38:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39
+ {mso-list-id:1854608351;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-136259574 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l39:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l39:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l39:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40
+ {mso-list-id:1904290003;
+ mso-list-template-ids:-1496945720;}
+@list l40:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l40:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l40:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41
+ {mso-list-id:1922173753;
+ mso-list-type:hybrid;
+ mso-list-template-ids:1592819408 -1239144778 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l41:level1
+ {mso-level-start-at:0;
+ mso-level-number-format:bullet;
+ mso-level-text:-;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:"Times New Roman","serif";
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
+@list l41:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l41:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42
+ {mso-list-id:1968387992;
+ mso-list-template-ids:216181760;}
+@list l42:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l42:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l42:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43
+ {mso-list-id:1994023609;
+ mso-list-template-ids:1249929396;}
+@list l43:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l43:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l43:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44
+ {mso-list-id:2024744074;
+ mso-list-template-ids:-225663202;}
+@list l44:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l44:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l44:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45
+ {mso-list-id:2037073662;
+ mso-list-type:hybrid;
+ mso-list-template-ids:-1884630188 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l45:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l45:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l45:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46
+ {mso-list-id:2076778819;
+ mso-list-template-ids:1550886238;}
+@list l46:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ mso-ansi-font-size:10.0pt;
+ font-family:Symbol;}
+@list l46:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l46:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47
+ {mso-list-id:2110462656;
+ mso-list-type:hybrid;
+ mso-list-template-ids:29630954 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
+@list l47:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:none;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l47:level2
+ {mso-level-tab-stop:72.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level3
+ {mso-level-tab-stop:108.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level4
+ {mso-level-tab-stop:144.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level5
+ {mso-level-tab-stop:180.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level6
+ {mso-level-tab-stop:216.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level7
+ {mso-level-tab-stop:252.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level8
+ {mso-level-tab-stop:288.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+@list l47:level9
+ {mso-level-tab-stop:324.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;}
+ol
+ {margin-bottom:0cm;}
+ul
+ {margin-bottom:0cm;}
+-->
+</style>
+<!--[if gte mso 10]>
+<style>
+ /* Style Definitions */
+ table.MsoNormalTable
+ {mso-style-name:"Normale Tabelle";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-qformat:yes;
+ mso-style-parent:"";
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+table.MsoTableGrid
+ {mso-style-name:Tabellengitternetz;
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-style-priority:59;
+ mso-style-unhide:no;
+ border:solid black 1.0pt;
+ mso-border-themecolor:text1;
+ mso-border-alt:solid black .5pt;
+ mso-border-themecolor:text1;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-border-insideh:.5pt solid black;
+ mso-border-insideh-themecolor:text1;
+ mso-border-insidev:.5pt solid black;
+ mso-border-insidev-themecolor:text1;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+table.MsoTableLightShading
+ {mso-style-name:"Helle Schattierung";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ border-top:solid black 1.0pt;
+ mso-border-top-themecolor:text1;
+ border-left:none;
+ border-bottom:solid black 1.0pt;
+ mso-border-bottom-themecolor:text1;
+ border-right:none;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ color:black;
+ mso-themecolor:text1;
+ mso-themeshade:191;}
+table.MsoTableLightShadingFirstRow
+ {mso-style-name:"Helle Schattierung";
+ mso-table-condition:first-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid black;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid black;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingLastRow
+ {mso-style-name:"Helle Schattierung";
+ mso-table-condition:last-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid black;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid black;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingFirstCol
+ {mso-style-name:"Helle Schattierung";
+ mso-table-condition:first-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingLastCol
+ {mso-style-name:"Helle Schattierung";
+ mso-table-condition:last-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingOddColumn
+ {mso-style-name:"Helle Schattierung";
+ mso-table-condition:odd-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:silver;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingOddRow
+ {mso-style-name:"Helle Schattierung";
+ mso-table-condition:odd-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:silver;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightList
+ {mso-style-name:"Helle Liste";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ border:solid black 1.0pt;
+ mso-border-themecolor:text1;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+table.MsoTableLightListFirstRow
+ {mso-style-name:"Helle Liste";
+ mso-table-condition:first-row;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-shading:black;
+ mso-tstyle-shading-themecolor:text1;
+ line-height:normal;
+ color:white;
+ mso-themecolor:background1;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListLastRow
+ {mso-style-name:"Helle Liste";
+ mso-table-condition:last-row;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:2.25pt double black;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-left:1.0pt solid black;
+ mso-tstyle-border-left-themecolor:text1;
+ mso-tstyle-border-bottom:1.0pt solid black;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-right:1.0pt solid black;
+ mso-tstyle-border-right-themecolor:text1;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListFirstCol
+ {mso-style-name:"Helle Liste";
+ mso-table-condition:first-column;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListLastCol
+ {mso-style-name:"Helle Liste";
+ mso-table-condition:last-column;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListOddColumn
+ {mso-style-name:"Helle Liste";
+ mso-table-condition:odd-column;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid black;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-left:1.0pt solid black;
+ mso-tstyle-border-left-themecolor:text1;
+ mso-tstyle-border-bottom:1.0pt solid black;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-right:1.0pt solid black;
+ mso-tstyle-border-right-themecolor:text1;}
+table.MsoTableLightListOddRow
+ {mso-style-name:"Helle Liste";
+ mso-table-condition:odd-row;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid black;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-left:1.0pt solid black;
+ mso-tstyle-border-left-themecolor:text1;
+ mso-tstyle-border-bottom:1.0pt solid black;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-right:1.0pt solid black;
+ mso-tstyle-border-right-themecolor:text1;}
+table.MsoTableMediumShading1
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ border:solid #404040 1.0pt;
+ mso-border-themecolor:text1;
+ mso-border-themetint:191;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-border-insideh:1.0pt solid #404040;
+ mso-border-insideh-themecolor:text1;
+ mso-border-insideh-themetint:191;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+table.MsoTableMediumShading1FirstRow
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:first-row;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-tstyle-shading:black;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-border-top:1.0pt solid #404040;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-top-themetint:191;
+ mso-tstyle-border-left:1.0pt solid #404040;
+ mso-tstyle-border-left-themecolor:text1;
+ mso-tstyle-border-left-themetint:191;
+ mso-tstyle-border-bottom:1.0pt solid #404040;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-bottom-themetint:191;
+ mso-tstyle-border-right:1.0pt solid #404040;
+ mso-tstyle-border-right-themecolor:text1;
+ mso-tstyle-border-right-themetint:191;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ color:white;
+ mso-themecolor:background1;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableMediumShading1LastRow
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:last-row;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:2.25pt double #404040;
+ mso-tstyle-border-top-themecolor:text1;
+ mso-tstyle-border-top-themetint:191;
+ mso-tstyle-border-left:1.0pt solid #404040;
+ mso-tstyle-border-left-themecolor:text1;
+ mso-tstyle-border-left-themetint:191;
+ mso-tstyle-border-bottom:1.0pt solid #404040;
+ mso-tstyle-border-bottom-themecolor:text1;
+ mso-tstyle-border-bottom-themetint:191;
+ mso-tstyle-border-right:1.0pt solid #404040;
+ mso-tstyle-border-right-themecolor:text1;
+ mso-tstyle-border-right-themetint:191;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableMediumShading1FirstCol
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:first-column;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableMediumShading1LastCol
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:last-column;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableMediumShading1OddColumn
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:odd-column;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-tstyle-shading:silver;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:63;}
+table.MsoTableMediumShading1OddRow
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:odd-row;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-tstyle-shading:silver;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableMediumShading1EvenRow
+ {mso-style-name:"Mittlere Schattierung 1";
+ mso-table-condition:even-row;
+ mso-style-priority:63;
+ mso-style-unhide:no;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableColorfulList
+ {mso-style-name:"Farbige Liste";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-tstyle-shading:#E6E6E6;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:25;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ color:black;
+ mso-themecolor:text1;}
+table.MsoTableColorfulListFirstRow
+ {mso-style-name:"Farbige Liste";
+ mso-table-condition:first-row;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#9E3A38;
+ mso-tstyle-shading-themecolor:accent2;
+ mso-tstyle-shading-themeshade:204;
+ mso-tstyle-border-bottom:1.5pt solid white;
+ mso-tstyle-border-bottom-themecolor:background1;
+ color:white;
+ mso-themecolor:background1;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableColorfulListLastRow
+ {mso-style-name:"Farbige Liste";
+ mso-table-condition:last-row;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-tstyle-shading:white;
+ mso-tstyle-shading-themecolor:background1;
+ mso-tstyle-border-top:1.5pt solid black;
+ mso-tstyle-border-top-themecolor:text1;
+ color:#9E3A38;
+ mso-themecolor:accent2;
+ mso-themeshade:204;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableColorfulListFirstCol
+ {mso-style-name:"Farbige Liste";
+ mso-table-condition:first-column;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableColorfulListLastCol
+ {mso-style-name:"Farbige Liste";
+ mso-table-condition:last-column;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableColorfulListOddColumn
+ {mso-style-name:"Farbige Liste";
+ mso-table-condition:odd-column;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-tstyle-shading:silver;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-top:cell-none;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableColorfulListOddRow
+ {mso-style-name:"Farbige Liste";
+ mso-table-condition:odd-row;
+ mso-style-priority:72;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#CCCCCC;
+ mso-tstyle-shading-themecolor:text1;
+ mso-tstyle-shading-themetint:51;}
+table.MsoTableLightShadingAccent1
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;
+ border-left:none;
+ border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;
+ border-right:none;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ color:#365F91;
+ mso-themecolor:accent1;
+ mso-themeshade:191;}
+table.MsoTableLightShadingAccent1FirstRow
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-table-condition:first-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #4F81BD;
+ mso-tstyle-border-top-themecolor:accent1;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #4F81BD;
+ mso-tstyle-border-bottom-themecolor:accent1;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent1LastRow
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-table-condition:last-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #4F81BD;
+ mso-tstyle-border-top-themecolor:accent1;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #4F81BD;
+ mso-tstyle-border-bottom-themecolor:accent1;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent1FirstCol
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-table-condition:first-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent1LastCol
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-table-condition:last-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent1OddColumn
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-table-condition:odd-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#D3DFEE;
+ mso-tstyle-shading-themecolor:accent1;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingAccent1OddRow
+ {mso-style-name:"Helle Schattierung - Akzent 1";
+ mso-table-condition:odd-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#D3DFEE;
+ mso-tstyle-shading-themecolor:accent1;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightListAccent1
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";}
+table.MsoTableLightListAccent1FirstRow
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-table-condition:first-row;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#4F81BD;
+ mso-tstyle-shading-themecolor:accent1;
+ line-height:normal;
+ color:white;
+ mso-themecolor:background1;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListAccent1LastRow
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-table-condition:last-row;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:2.25pt double #4F81BD;
+ mso-tstyle-border-top-themecolor:accent1;
+ mso-tstyle-border-left:1.0pt solid #4F81BD;
+ mso-tstyle-border-left-themecolor:accent1;
+ mso-tstyle-border-bottom:1.0pt solid #4F81BD;
+ mso-tstyle-border-bottom-themecolor:accent1;
+ mso-tstyle-border-right:1.0pt solid #4F81BD;
+ mso-tstyle-border-right-themecolor:accent1;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListAccent1FirstCol
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-table-condition:first-column;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListAccent1LastCol
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-table-condition:last-column;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightListAccent1OddColumn
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-table-condition:odd-column;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #4F81BD;
+ mso-tstyle-border-top-themecolor:accent1;
+ mso-tstyle-border-left:1.0pt solid #4F81BD;
+ mso-tstyle-border-left-themecolor:accent1;
+ mso-tstyle-border-bottom:1.0pt solid #4F81BD;
+ mso-tstyle-border-bottom-themecolor:accent1;
+ mso-tstyle-border-right:1.0pt solid #4F81BD;
+ mso-tstyle-border-right-themecolor:accent1;}
+table.MsoTableLightListAccent1OddRow
+ {mso-style-name:"Helle Liste - Akzent 1";
+ mso-table-condition:odd-row;
+ mso-style-priority:61;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #4F81BD;
+ mso-tstyle-border-top-themecolor:accent1;
+ mso-tstyle-border-left:1.0pt solid #4F81BD;
+ mso-tstyle-border-left-themecolor:accent1;
+ mso-tstyle-border-bottom:1.0pt solid #4F81BD;
+ mso-tstyle-border-bottom-themecolor:accent1;
+ mso-tstyle-border-right:1.0pt solid #4F81BD;
+ mso-tstyle-border-right-themecolor:accent1;}
+table.MsoTableLightShadingAccent2
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ border-top:solid #C0504D 1.0pt;
+ mso-border-top-themecolor:accent2;
+ border-left:none;
+ border-bottom:solid #C0504D 1.0pt;
+ mso-border-bottom-themecolor:accent2;
+ border-right:none;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ color:#943634;
+ mso-themecolor:accent2;
+ mso-themeshade:191;}
+table.MsoTableLightShadingAccent2FirstRow
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-table-condition:first-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #C0504D;
+ mso-tstyle-border-top-themecolor:accent2;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #C0504D;
+ mso-tstyle-border-bottom-themecolor:accent2;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent2LastRow
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-table-condition:last-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #C0504D;
+ mso-tstyle-border-top-themecolor:accent2;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #C0504D;
+ mso-tstyle-border-bottom-themecolor:accent2;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent2FirstCol
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-table-condition:first-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent2LastCol
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-table-condition:last-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent2OddColumn
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-table-condition:odd-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#EFD3D2;
+ mso-tstyle-shading-themecolor:accent2;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingAccent2OddRow
+ {mso-style-name:"Helle Schattierung - Akzent 2";
+ mso-table-condition:odd-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#EFD3D2;
+ mso-tstyle-shading-themecolor:accent2;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingAccent4
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ border-top:solid #8064A2 1.0pt;
+ mso-border-top-themecolor:accent4;
+ border-left:none;
+ border-bottom:solid #8064A2 1.0pt;
+ mso-border-bottom-themecolor:accent4;
+ border-right:none;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ color:#5F497A;
+ mso-themecolor:accent4;
+ mso-themeshade:191;}
+table.MsoTableLightShadingAccent4FirstRow
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-table-condition:first-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #8064A2;
+ mso-tstyle-border-top-themecolor:accent4;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #8064A2;
+ mso-tstyle-border-bottom-themecolor:accent4;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent4LastRow
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-table-condition:last-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #8064A2;
+ mso-tstyle-border-top-themecolor:accent4;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #8064A2;
+ mso-tstyle-border-bottom-themecolor:accent4;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent4FirstCol
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-table-condition:first-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent4LastCol
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-table-condition:last-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent4OddColumn
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-table-condition:odd-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#DFD8E8;
+ mso-tstyle-shading-themecolor:accent4;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingAccent4OddRow
+ {mso-style-name:"Helle Schattierung - Akzent 4";
+ mso-table-condition:odd-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#DFD8E8;
+ mso-tstyle-shading-themecolor:accent4;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingAccent5
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-tstyle-rowband-size:1;
+ mso-tstyle-colband-size:1;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ border-top:solid #4BACC6 1.0pt;
+ mso-border-top-themecolor:accent5;
+ border-left:none;
+ border-bottom:solid #4BACC6 1.0pt;
+ mso-border-bottom-themecolor:accent5;
+ border-right:none;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:10.0pt;
+ font-family:"Times New Roman","serif";
+ color:#31849B;
+ mso-themecolor:accent5;
+ mso-themeshade:191;}
+table.MsoTableLightShadingAccent5FirstRow
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-table-condition:first-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #4BACC6;
+ mso-tstyle-border-top-themecolor:accent5;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #4BACC6;
+ mso-tstyle-border-bottom-themecolor:accent5;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent5LastRow
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-table-condition:last-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-border-top:1.0pt solid #4BACC6;
+ mso-tstyle-border-top-themecolor:accent5;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-bottom:1.0pt solid #4BACC6;
+ mso-tstyle-border-bottom-themecolor:accent5;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;
+ line-height:normal;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent5FirstCol
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-table-condition:first-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent5LastCol
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-table-condition:last-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-ansi-font-weight:bold;
+ mso-bidi-font-weight:bold;}
+table.MsoTableLightShadingAccent5OddColumn
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-table-condition:odd-column;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#D2EAF1;
+ mso-tstyle-shading-themecolor:accent5;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+table.MsoTableLightShadingAccent5OddRow
+ {mso-style-name:"Helle Schattierung - Akzent 5";
+ mso-table-condition:odd-row;
+ mso-style-priority:60;
+ mso-style-unhide:no;
+ mso-tstyle-shading:#D2EAF1;
+ mso-tstyle-shading-themecolor:accent5;
+ mso-tstyle-shading-themetint:63;
+ mso-tstyle-border-left:cell-none;
+ mso-tstyle-border-right:cell-none;
+ mso-tstyle-border-insideh:cell-none;
+ mso-tstyle-border-insidev:cell-none;}
+</style>
+<![endif]-->
+<meta name=CREATED content="20080922;21044300">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGED content="20090326;22005200">
+<meta name="Info 1" content="">
+<meta name="Info 2" content="">
+<meta name="Info 3" content="">
+<meta name="Info 4" content="">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content="Christophe Henry">
+<meta name=CHANGEDBY content=xtoff>
+<meta name=CHANGEDBY content=xtoff>
+<meta name=CHANGEDBY content=xtoff>
+<!--[if gte mso 9]><xml>
+ <o:shapedefaults v:ext="edit" spidmax="38914"/>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <o:shapelayout v:ext="edit">
+ <o:idmap v:ext="edit" data="1"/>
+ </o:shapelayout></xml><![endif]-->
+</head>
+
+<body lang=DE link=blue vlink=purple style='tab-interval:35.4pt'>
+
+<div class=Section1>
+
+<p style='margin-top:11.9pt;margin-right:0cm;margin-bottom:14.2pt;margin-left:
+0cm;page-break-after:avoid'><span lang=EN-US style='font-size:13.5pt;
+font-family:"Arial","sans-serif";mso-ansi-language:EN-US'>The Msm (Meta State
+Machine) library v2.0</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Christophe Henry, <o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>henry UNDERSCORE christophe
+AT hotmail DOT com<o:p></o:p></span></p>
+
+<p style='margin-top:11.9pt;margin-right:0cm;margin-bottom:14.2pt;margin-left:
+0cm;page-break-after:avoid'><span lang=EN-US style='font-size:13.5pt;
+font-family:"Arial","sans-serif";mso-ansi-language:EN-US'>Contents</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Introduction<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Changes_compared_to_1">Changes compared to previous version</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Boost_version">Boost
+version</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Design_Goals">Design
+Goals</a><span style='mso-tab-count:1'>&nbsp; </span><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Msm_v1.x_Features">Msm v1.x Features</a><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l34 level1 lfo1'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Design_Goals">Design
+Goals</a><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l34 level1 lfo1'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Founding_example">Founding
+example</a><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l34 level1 lfo1'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Rows<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l34 level1 lfo1'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Tutorials<o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Your_first_finite">Your
+first finite state machine</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_A_more_advanced">A more
+advanced example</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Orthogonal_States_(+Defer">Orthogonal
+States (+Defer and Terminate states)</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Adding_an_history">Adding
+an history</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Defining_flags">Using
+&#8220;flags&#8221;</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Anonymous_transitions">Anonymous
+transitions</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l21 level1 lfo2'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_The_many_ways">The many
+ways to enter a composite state</a><o:p></o:p></span></p>
+
+<p style='margin-left:18.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Advanced">Advanced</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Conflicting_Transitions">Conflicting
+Transitions</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Containing_state_machine">Containing
+state machine</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Getting_a_pointer">Getting
+a pointer to a state</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Exceptions<o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Helpers_methods">Helpers
+methods</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Getting_more_speed">Getting
+more speed</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l29 level1 lfo3'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Processing_events_inside">Processing
+events inside from within the front-end</a><o:p></o:p></span></p>
+
+<p style='margin-left:18.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Customizing_states">Customizing states</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l17 level1 lfo4'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_User-defined_base_state">User-defined
+base state / Polymorphic states</a><o:p></o:p></span></p>
+
+<p style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l17 level1 lfo4'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Visiting_active_states">Visiting
+active states</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a href="#_New_Msm_v2.0">New
+Msm v2.0 Features</a> <o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo5'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Frontends<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo5'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Functor_rows">Functor
+rows</a><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo5'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>eUML<o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Transition_table">Transition table</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Defining_a_state">Defining a state with entry/exit functors</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Defining_a_state_1">Defining a simple state machine</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Defining_a_composite">Defining a composite state machine</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Anonymous_transitions_1">Anonymous transitions</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Fork">Fork</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Defining_attributes">Defining attributes</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Defining_flags">Defining flags</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Defining_deferred_events">Defining deferred events</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Customizing_a_state">Customizing a state machine</a> <a
+href="#_Customizing_a_state">/ getting more speed</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Wrapping_it_up">Operators</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Adding_STL_support">Adding functional programming and
+boost::phoenix-like STL support</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Binding_to_a">Binding to a function or method</a><o:p></o:p></span></p>
+
+<p style='margin-left:72.0pt;text-indent:-18.0pt;mso-list:l23 level2 lfo5;
+tab-stops:list 72.0pt'><![if !supportLists]><span lang=EN-US style='font-family:
+Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Some_Examples_with_1">Some examples with eUML</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Performance<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Compilers<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Limitations<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Acknowledgments<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Questions_&amp;_Answers">Questions &amp; Answers</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a href="#_Case_Studies">Case
+Studies</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_EUML_Case_Studies">eUML Case Studies</a><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l7 level1 lfo6'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_A_simple_Timer">A simple
+timer</a><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l7 level1 lfo6'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'><a href="#_A_search_function">A
+search function</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Annex_A_Debugging">Annex A Debugging</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_Annex_B_Metaprogramming">Annex B Metaprogramming tools</a><o:p></o:p></span></p>
+
+<h1 style='page-break-before:always'><a name="_Introduction"></a><span
+lang=EN-US style='font-size:16.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Introduction<o:p></o:p></span></h1>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Msm is a framework which
+enables you to build a Finite State Machine in a straightforward, descriptive
+and easy-to-use manner. It requires minimal effort to generate a working
+program from an UML state machine diagram. This work was inspired by the state
+machine described in the book of David Abrahams and Aleksey Gurtovoy &#8220;C++
+Template Metaprogramming&#8221; and adds most of what UML Designers are expecting
+from an UML State Machine framework:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Entry
+and Exit Methods<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Guard
+Conditions<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Sub
+state machines (also called composite states in UML)<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>History<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Terminate
+Pseudo-State<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Deferred
+Events<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Orthogonal
+regions (also called and-states)<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Explicit
+entry into sub state machine states<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Fork<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Entry
+/ Exit pseudo states<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Automatic
+handling of conflicting transitions<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l40 level1 lfo7;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Anonymous
+transitions<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Additional features, absent
+from the UML specification but nevertheless relevant were also implemented:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo8;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Event
+Queue<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo8;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>A
+new concept named &#8220;flags&#8221;. This can be seen as an alternative to Boost.Statechart&#8217;s
+state_downcast<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo8;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Interrupted
+Pseudo-State. A kind of Terminate pseudo-state which can still be left.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo8;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Visitors,
+polymorphic states when needed.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><u><span lang=EN-US style='mso-ansi-language:
+EN-US'>Why Msm v2?<o:p></o:p></span></u></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>The
+new design allows different frontends so that the user now has a choice of how
+to describe a state machine. Msm now proudly offers as a frontend actions made
+of functors instead of actions methods and a new Domain-Specific-Embedded
+Language for UML-like description of transition tables named eUML. This
+frontend also allows writing actions and guards directly in the transition
+table or state definition, without the need to define extra functions.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>Msm
+was designed with the idea of helping developers build software the Model-Driven-Development
+way. State machines are a very useful tool for MDD, as they allow a graphical
+representation of a dynamic view from a modeled system. Msm aims to provide a
+Model-Driven approach with the reversible and repeatable properties. But the
+help provided by state machines usually stops with the structure definition
+(states, transitions, etc.) and there is little help for actually writing the
+actions, guards and stat actions. Msm now brings MDD further by providing a new
+functional language for the definition of actions and guards directly in the
+transition table. Functional languages have interesting properties, one of
+which is relevant to MDD, the ability to be easily graphically represented.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>In
+a UML diagram, a transition is represented as:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shapetype
+ id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
+ path="m_at_4@5l_at_4@11_at_9@11_at_9@5xe" filled="f" stroked="f">
+ <v:stroke joinstyle="miter"/>
+ <v:formulas>
+ <v:f eqn="if lineDrawn pixelLineWidth 0"/>
+ <v:f eqn="sum @0 1 0"/>
+ <v:f eqn="sum 0 0 @1"/>
+ <v:f eqn="prod @2 1 2"/>
+ <v:f eqn="prod @3 21600 pixelWidth"/>
+ <v:f eqn="prod @3 21600 pixelHeight"/>
+ <v:f eqn="sum @0 0 1"/>
+ <v:f eqn="prod @6 1 2"/>
+ <v:f eqn="prod @7 21600 pixelWidth"/>
+ <v:f eqn="sum @8 21600 0"/>
+ <v:f eqn="prod @7 21600 pixelHeight"/>
+ <v:f eqn="sum @10 21600 0"/>
+ </v:formulas>
+ <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
+ <o:lock v:ext="edit" aspectratio="t"/>
+</v:shapetype><v:shape id="Grafik_x0020_16" o:spid="_x0000_i1037" type="#_x0000_t75"
+ alt="Transition.jpg" style='width:151.2pt;height:1in;visibility:visible;
+ mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image001.jpg" o:title="Transition"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=202 height=96
+src="index-Dateien/image027.jpg" alt=Transition.jpg v:shapes="Grafik_x0020_16"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>Where
+guard and action are usually expressed as a natural language or pseudo-code.
+And this is what eUML now offers:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>State1
+() + event1 () == State2 () [Condition1() &amp;&amp; Condition2()] /
+(Action1(),Action2())<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>UML
+designers are also used to write pseudo-code in the action methods, like
+++counter. This is now also possible, along with most of the STL algorithms or
+container methods.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>To
+achieve this, eUML also acts like a compile-time boost::phoenix adapted to the
+state machine context, using a similar functional programming interface.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>All
+this being defined at compile-time, there is no runtime penalty (you might even
+see a speed gain) while using this new capability, only a compile-time one.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'>EUML
+also offers much more, so please have a look at the <a href="#_eUML">eUML
+documentation</a>.<o:p></o:p></span></p>
+
+<h1 style='page-break-before:always'><a name="_Changes_compared_to"></a><span
+lang=EN-US style='font-size:16.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></h1>
+
+<h1 style='page-break-before:always'><a name="_Changes_compared_to_1"></a><span
+lang=EN-US style='font-size:16.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Changes compared to previous version<o:p></o:p></span></h1>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Experienced Msm users might
+want to have a short look at a simple tutorial
+to see the few changes and then move on to the <a href="#_eUML">definition of
+eUML</a>.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Changes from 1.20 to 2.0<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Divided the library into frontend
+and backend.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>The backend is now using a
+fusion::vector to store the machine&#8217;s states, meaning that the state
+machine is almost fully stack-based (with the exception of the message and
+deferred events queues)<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>30% performance gain (thanks to the
+effect of data locality in a fusion vector)<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Added the possibility to use
+functors instead of functions for guards and action methods.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Added eUML, a
+domain-specific-embedded language.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Added a kind of boost::phoenix for
+state machines.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Removed a few constraints for exit
+pseudo states.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Histories are now a backend policy
+for more reuse possibilities.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Copy policy disappeared as the use
+of a fusion vector to store states renders obsolete the concept of deep/shallow
+copying.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:
+36.0pt;text-indent:-18.0pt;mso-list:l24 level1 lfo9'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Improved visitor handling (states of
+a submachine are now automatically called)<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Several breaking changes
+will require developer action:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l15 level1 lfo10'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Previous code now becomes the
+frontend, and a backend typedef must be added.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l15 level1 lfo10'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Entry, exit pseudo states and direct
+entries now have a new syntax.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l15 level1 lfo10'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Entry and exit actions have a new
+parameter (the state machine itself) so that the sm_ptr policy is now obsolete.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l15 level1 lfo10'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is unfortunately now more
+complicated, with the simplest front-end, to call </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>this-&gt;process_event()</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> because the front-end doesn&#8217;t
+have any. The other front-ends now offer a superior way to achieve this.<o:p></o:p></span></p>
+
+<h1><a name="_Msm_v1.x_Features"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></h1>
+
+<h1 style='page-break-before:always'><a name="_Boost_version"></a><span
+lang=EN-US style='font-size:16.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Boost versions<o:p></o:p></span></h1>
+
+<p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Msm v2 was tested with boost v 1.38, 1.39 and 1.40. If
+using eUML with Boost 1.40, please use the trunk version of proto or replace
+the proto file with the delivered traits.hpp.<o:p></o:p></span></p>
+
+<h1><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></h1>
+
+<h1><span lang=EN-US style='mso-ansi-language:EN-US'>Msm v1.x Features<o:p></o:p></span></h1>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;</span>This chapter will present the features
+known from the 1.x versions adapted to the new Msm v2.0 syntax. <o:p></o:p></span></p>
+
+<h2><a name="_Design_Goals"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Design Goals<o:p></o:p></span></h2>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>While Boost.Statechart
+already offers many of the aforementioned features, one may question the very
+existence of the Msm framework. The following advantages are offered:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo11;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Efficiency:
+The heavily-used metaprogramming techniques described in the book allow an O
+(1) double dispatch and the non-use of virtual calls. The result is a very
+efficient code, at the cost of a longer compilation time and bigger executable
+size.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo11;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Declarativeness:
+At the heart of the framework is a transition table. Boost.Statechart is a very
+good tool, but to deduce the original state machine diagram from its source
+code can sometimes be quite a challenge. <o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo11;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Expressiveness:
+The Domain-Specific-Language represents well the abstraction domain and
+displays a high ratio of information to syntactic noise. <o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo11;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Metaprogramming
+tools (see Annex B) can be easily
+written and add much value to your state machine.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo11;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+declarativeness and expressiveness of the framework favor a model-driven
+approach as explained in the BoostCon09 paper.
+<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>For people working on
+embedded systems, selling Boost.Statechart has got the handicap O (n)
+double-dispatch, the virtual calls and the fact that many of them are coming
+from the C world and thus no fans of big template argument lists or
+forward-declarations.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The declarative interface
+of Msm is transparent, and a developer not needing the more complex features is
+not required to learn them, reducing the &quot;entry cost&quot;. As needed, the
+user may choose to delve further in the more advanced policies and underlying
+concepts of the library.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>What the framework does not
+yet offer:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l46 level1 lfo12;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Built-in
+multithreading. For the time being, it is not fully decided whether this should
+be implemented directly in the library or if this should remain at the user's
+discretion.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>If you are looking for an
+efficient and straightforward UML-based finite state machine framework, we sincerely
+hope you will enjoy this work!<o:p></o:p></span></p>
+
+<h2><a name="_Founding_example"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Founding example<o:p></o:p></span></h2>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Let's start with an example
+taken from C++ Template Metaprogramming:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>int
+main()</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>{</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>player
+p; // an instance of the concrete state Machine</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><b style='mso-bidi-font-weight:normal'><span lang=EN-US
+style='font-size:10.0pt;mso-ansi-language:EN-US'>p.start(); // activates the init
+state (calls on_entry on the state machine and the first state)</span></b></code><b
+style='mso-bidi-font-weight:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></b></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>p.process_event(open_close());
+// user opens CD player</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>p.process_event(open_close());
+// inserts CD and closes</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>p.process_event(cd_detected(&#8220;louie&#8221;,&#8221;louie&#8221;));</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>p.process_event(play());</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>...</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>return
+0;</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>}</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The transition table is at
+the heart of the framework, and is implemented using the following DSL
+(Domain-Specific-Language):<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>struct
+transition_table: mpl::vector&lt;</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=28*><COL WIDTH=34*><COL WIDTH=37*><COL WIDTH=31*><COL WIDTH=59*><COL WIDTH=54*><COL WIDTH=14*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Start</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Event</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Next</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Action</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Guard</span></code></p>
+ </td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>play,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Playing,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::start_playback</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>open_close,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Open,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::open_drawer</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>stop,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Open,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>open_close,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Empty,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::close_drawer</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Empty,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>open_close,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Open,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::open_drawer</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Empty,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>cd_detected,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::store_cd_info</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::good_disk_format</span></code></p>
+ </td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Playing,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>stop,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::stop_playback</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Playing,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>pause,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Paused,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::pause_playback</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Playing,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>open_close,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Open,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::stop_and_open</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Paused,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>end_pause,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Playing,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::resume_playback</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Paused,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>stop,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::stop_playback</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Paused,</span></code></p>
+ </td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>open_close,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Open,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::stop_and_open</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;</span></code><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13;mso-yfti-lastrow:yes'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt; {};</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="15%" valign=top style='width:15.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+</table>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>As you see, the whole state
+machine structure is in the transition table.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>You define one row for
+every transition. A transition is made of:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l26 level1 lfo13;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>a
+current state<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l26 level1 lfo13;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>an
+event triggering the transition making the machine leave the current state and
+moving to:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l26 level1 lfo13;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>a
+next state, which becomes the next current state<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l26 level1 lfo13;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>an
+action method which gets called during the transition, if and only if<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l26 level1 lfo13;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>a
+guard condition first gives its ok by returning true<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>For every <u>concrete</u>
+event, the action method has the following signature:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>void</span></code><code><span lang=EN-US style='font-size:10.0pt;
+mso-ansi-language:EN-US'> action_method(<span style='color:blue'>SomeEvent
+const&amp;</span>) //SomeEvent can be play,stop, etc.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>And for the guard method:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>bool</span></code><code><span lang=EN-US style='font-size:10.0pt;
+mso-ansi-language:EN-US'> guard_method( <span style='color:blue'>SomeEvent
+const&amp;</span>) //SomeEvent can be play,stop, etc.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The event being passed the
+action/guard methods may contain data, while evident for action methods, is
+also very useful for guards methods offering a nice alternative to
+Boost.Statechart's explicit branching requirements.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>To define a state, simply
+derive it from:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l5 level1 lfo14;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='font-size:10.0pt;
+mso-ansi-language:EN-US'>terminate_state&lt;&gt;</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'>: if the state is a terminal pseudo-state which
+ends all event processing in the state machine.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l5 level1 lfo14;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>interrupt_state&lt;EndInterruptEvent&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: if the state is only interrupting
+the state machine until the event </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>EndInterruptEvent </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>is fired.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l5 level1 lfo14;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='font-size:10.0pt;
+mso-ansi-language:EN-US'>state_machine&lt;State&gt;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> if State must itself be a sub-
+state machine (composite in UML)<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l5 level1 lfo14;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='font-size:10.0pt;
+mso-ansi-language:EN-US'>state&lt;&gt; </span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'>if it is a normal state<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>You just need to define the
+initial state:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>typedef
+Empty initial_state;</span></code><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";mso-ansi-language:EN-US'>As shown
+in the above code, you need to start the state machine by calling start(). This
+is to avoid calling on_entry immediately at object creation time and allows you
+to delay starting the state machine.</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h2><a name="_Rows"></a><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Rows<o:p></o:p></span></h2>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Attentive readers will
+notice that the above syntax is actually not exactly the one described in the
+book which provides no guard and forces the definition of an action method.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Msm therefore defines
+several types of rows, for all possible combinations of transitions with or
+without guard and action methods.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>As only the Start, Event
+and Next are absolutely necessary, a quick calculation will show that we need 4
+types of rows:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo15;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>row</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> takes 5 arguments: start state, event, next state, action and guard.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo15;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>a_row</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> (&#8220;a&#8221; for action) allows defining only the action and omit
+the guard condition<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo15;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>g_row</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> (&#8220;g&#8221; for guard) allows omitting the action method and
+defining only the guard<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo15;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>_row</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> allows omitting action and guard methods.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>For example:<o:p></o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Start</span></code></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Event</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Next</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Action</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Guard</span></code></p>
+ </td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>a_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>play,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Playing,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::start_playback</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;</span></code><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>g_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>open_close,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Open,</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;p::some_guard</span></code></p>
+ </td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;</span></code><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes'>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped,</span></code></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>stop,</span></code></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Stopped</span></code></p>
+ </td>
+ <td width="23%" valign=top style='width:23.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;</span></code><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h2><a name="_Tutorials"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Tutorials<o:p></o:p></span></h2>
+
+<h3><a name="_Your_first_finite"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Your first finite state machine<o:p></o:p></span></h3>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>SimpleTutorial.cpp<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The previously described transition
+table is an easily-generated view of the following UML State Machine Diagram:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape
+ id="Grafik_x0020_15" o:spid="_x0000_i1036" type="#_x0000_t75" alt="SimpleTutorial.jpg"
+ style='width:450pt;height:435.6pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image003.jpg" o:title="SimpleTutorial"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=600 height=581
+src="index-Dateien/image028.jpg" alt=SimpleTutorial.jpg v:shapes="Grafik_x0020_15"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>First we need to choose a
+frontend. We first take the &#8220;standard&#8221; frontend looking much like Msm
+v1.x. We need to define events, state machine and states, for example:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>play</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> {}; </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:green;mso-ansi-language:EN-US'>//
+event</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>player_</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>state_machine_def</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>player_</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;{...}
+</span></code><code><span lang=EN-US style='font-size:10.0pt;color:green;
+mso-ansi-language:EN-US'>// state machine</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>struct</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Empty</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;&gt;
+</span></code><code><span lang=EN-US style='font-size:10.0pt;color:green;
+mso-ansi-language:EN-US'>// state</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>{</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:green;mso-ansi-language:EN-US'>// every (optional)
+entry/exit methods get the event and containing state machine as parameters.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>template &lt;class
+Event, class FSM&gt; </span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>void</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#C5000B;mso-ansi-language:EN-US'>on_entry</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>(</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>Event
+const</span></code><code><span lang=EN-US style='font-size:10.0pt;color:black;
+mso-ansi-language:EN-US'>&amp;, </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>FSM&amp;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> ) {</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>std</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>cout</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+&lt;&lt; </span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#A31515;mso-ansi-language:EN-US'>&quot;entering: Empty&quot;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+&lt;&lt; </span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>std</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>endl</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;}</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>template &lt;class
+Event, class FSM &gt;</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>void</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#C5000B;mso-ansi-language:EN-US'>on_exit</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>(</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>Event
+const</span></code><code><span lang=EN-US style='font-size:10.0pt;color:black;
+mso-ansi-language:EN-US'>&amp;, </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>FSM&amp;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp; </span>) {</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>std</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>cout</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+&lt;&lt; </span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#A31515;mso-ansi-language:EN-US'>&quot;leaving: Empty&quot;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+&lt;&lt; </span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>std</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>endl</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;}</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>};</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>on_entry</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>on_exit</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> methods are optional. The argument
+is the event which triggered the state switching.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Next, an initial state must
+be defined:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>typedef</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Empty</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>initial_state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The action methods for
+every transition get the event as argument:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>void</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>start_playback</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>(</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>play</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>const</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&amp;)</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:black;mso-ansi-language:
+EN-US'>Guard conditions simply inhibit a transition from occurring, even if an
+acceptable event arrives. The event is passed as parameter, thus allowing
+event-data-dependent decisions on whether to take the transition.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>bool</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#C5000B;mso-ansi-language:EN-US'>good_disk_format</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>(</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>cd_detected
+const&amp;</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> evt) {...}</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>By default, a </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>no_transition</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>method
+is called when an unexpected event is fired. This method simply asserts when
+called.</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>It is possible to overwrite the </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>no_transition</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>method
+to define a different error handling:</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:green;mso-ansi-language:EN-US'>// Replaces the
+default no-transition response.</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>template</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> &lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>class</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Event</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>int</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>no_transition</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>(</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>int</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>, </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Event</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>const</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&amp; </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>e</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>){</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>...}</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'>Finally, a backend must be chosen. For the moment,
+as there is only one backend, the choice is pretty easy to do:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>msm</span>::<span style='color:#030003'>back</span>::<span
+style='color:#030003'>state_machine</span>&lt;<span style='color:#030003'>player_</span>&gt;
+<span style='color:#030003'>player</span>;</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>That's it! People familiar to the player
+state machines of the boost::mpl example will notice just a few changes:</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l37 level1 lfo16;tab-stops:
+list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
+mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span style='mso-list:
+Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><u><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>states are now classes/structs</span></u></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>so
+they can have data. The states get default-constructed at initialization time.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l37 level1 lfo16;tab-stops:
+list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
+mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span style='mso-list:
+Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><u><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>No id as an int has to be defined</span></u></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>,
+which allows reuse of states in other state machines. The ids get generated at
+compile-time. The disadvantage is that it makes debugging harder. See <a
+href="#_Annex_A_Debugging">Annex A</a> for an explanation of how to find the
+generated id. A small helper to get a state array as typeid-generated names is
+explained in Annex A and an example is shown
+at the end of this example.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l37 level1 lfo16;tab-stops:
+list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
+mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span style='mso-list:
+Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><u><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>A Guard condition</span></u></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>was
+added.</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l37 level1 lfo16;tab-stops:
+list 36.0pt'><![if !supportLists]><code><span lang=EN-US style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
+mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span style='mso-list:
+Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span></code><![endif]><code><u><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>A message queue</span></u></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>was
+added so that new events can be generated during a transition.</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";mso-ansi-language:EN-US'><o:p></o:p></span></code></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l37 level1 lfo16;tab-stops:
+list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
+mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span style='mso-list:
+Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>And
+of course, one needs to define a frontend and a backend.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l37 level1 lfo16;tab-stops:
+list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:Symbol;
+mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span style='mso-list:
+Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>As
+a convention, this documentation uses name+_ for frontends (</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>player_</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>) and the name only (</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>player</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>) for back ends.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>Quite easy, isn't it? You may however
+think the added value is not as great as promised, which leads us to the next tutorials...<o:p></o:p></span></code></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3><a name="_A_more_advanced"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>A more advanced example<o:p></o:p></span></h3>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="CompositeTutorial.cpp">CompositeTutorial.cpp</a><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The framework would not be
+a very big subset of an UML state machine if it didn't support composite
+states. The UML specification isn't too clear about the difference between composite
+states and sub-state machines, so Msm ignores it for simplicity and defines
+that a composite state is a state machine itself.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>A small example is better
+as a long explanation, so, we had player defined as:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>player_</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>state_machine_def</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>player_</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;{...}</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>And playing was a sub-state
+of it:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Playing</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;&gt;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> <o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>But now we want Playing to
+be a nested state machine, like the following diagram shows:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape
+ id="Grafik_x0020_14" o:spid="_x0000_i1035" type="#_x0000_t75" alt="CompositeTutorial.jpg"
+ style='width:462pt;height:620.4pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image005.jpg" o:title="CompositeTutorial"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=616 height=827
+src="index-Dateien/image029.jpg" alt=CompositeTutorial.jpg v:shapes="Grafik_x0020_14"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>We need to add the frontend
+(</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>Playing_</span><span lang=EN-US style='mso-ansi-language:EN-US'>)
+declaration to:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Playing_</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::Front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>state_machine_def</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>Playing_</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;{...}</span></code><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>And change </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Playing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> definition to:<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";color:blue;mso-ansi-language:EN-US;
+mso-no-proof:yes'>typedef</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'> <span style='color:#030003'>msm</span>::<span
+style='color:#030003'>back</span>::<span style='color:#030003'>state_machine</span>&lt;<span
+style='color:#030003'>Playing_</span>&gt; <span style='color:#030003'>Playing</span>;<o:p></o:p></span></p>
+
+<p><u><span lang=EN-US style='mso-ansi-language:EN-US'>Note:</span></u><span
+lang=EN-US style='mso-ansi-language:EN-US'> no change to </span><code><span
+lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>player</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> is required!<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>As a transition table for </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Playing_</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> we define:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>struct
+transition_table: mpl::vector&lt;</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=26*><COL WIDTH=34*><COL WIDTH=50*><COL WIDTH=32*><COL WIDTH=54*><COL WIDTH=45*><COL WIDTH=13*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Start</span></code></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Event</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Next</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Action</span></code></p>
+ </td>
+ <td width="18%" valign=top style='width:18.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Guard</span></code></p>
+ </td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>a_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song1,</span></code></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>NextSong,</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song2,</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;pl::start_next_song</span></code></p>
+ </td>
+ <td width="18%" valign=top style='width:18.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>a_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song2,</span></code></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>PreviousSong,</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song1,</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;pl::start_prev_song</span></code></p>
+ </td>
+ <td width="18%" valign=top style='width:18.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>a_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song2,</span></code></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>NextSong,</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song3,</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;pl::start_next_song</span></code></p>
+ </td>
+ <td width="18%" valign=top style='width:18.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;,</span></code></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>a_row&lt;</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song3,</span></code></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>PreviousSong,</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:blue'>Song2,</span></code></p>
+ </td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:#C5000B'>&amp;pl::start_prev_song</span></code></p>
+ </td>
+ <td width="18%" valign=top style='width:18.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt;</span></code><o:p>&nbsp;</o:p></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt'>&gt; {};</span></code></p>
+ </td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="13%" valign=top style='width:13.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="21%" valign=top style='width:21.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="18%" valign=top style='width:18.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="5%" valign=top style='width:5.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+</table>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3><a name="_Orthogonal_States_(+Defer"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Orthogonal States (+Defer and Terminate
+State)<o:p></o:p></span></h3>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="Orthogonal-deferred.cpp">Orthogonal-deferred.cpp</a><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>This tutorial will
+demonstrate the use of three more features that UML defines: Othogonal regions,
+deferring of events and terminate States.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>It is a very common problem
+in many state machines to have to handle errors. It usually involves defining a
+transition from all the states to a special error state. Translation: not fun.
+Luckily, UML provides some helpful concepts here. The first one is orthogonal
+regions. See them as state machines running at the same time in a same state
+machine and having the capability to influence one another. The effect is that
+you have several active states at any time. Actually, you have always the same
+number of active states as the number of regions is not variable.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>We can therefore keep our
+state machine from the previous example and just define a new region made of
+two states, </span><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:
+EN-US'>AllOk</span></code><span lang=EN-US style='mso-ansi-language:EN-US'> and
+</span><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>ErrorMode</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>AllOk</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> is most of the time active. But the
+</span><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>error_found</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> error event makes the second zone
+move to the new active state </span><code><span lang=EN-US style='font-size:
+10.0pt;mso-ansi-language:EN-US'>ErrorMode</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'>. This event does not interest the main region
+so it will simply be ignored. Only if no region at all handles the event will </span><code><span
+lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>no</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'>_</span><code><span lang=EN-US
+style='font-size:10.0pt;mso-ansi-language:EN-US'>transition</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> get called.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Usually, when you get an
+error, you do not want other events to be handled. To achieve this, we use
+another UML feature, terminate states. When any region moves to a terminate
+state, the state machine &#8220;terminates&#8221; (the state machine and all
+its states stay alive) and all further events are ignored.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>This is of course not
+mandatory, one can use orthogonal regions without terminate states.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Also note that, as UML
+mandates, every region gets a chance of handling the event, in the same order
+as defined.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Msm also provides a small
+extension to UML, interrupt states. If you declare </span><code><span
+lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>ErrorMode</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'> as interrupt state instead, the
+state machine will not handle any event other than the one which ends the
+interrupt. So it's like a terminate state, with the difference that you are
+allowed to resume the state machine when a condition (like handling of the
+original error) is met.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Last but not least, this
+example also shows here the handling of event deferring. Let's say someone puts
+a disc and immediately presses play. The event cannot be handled, yet you'd
+want it to be handled at a later point and not force the user to press play
+again. The solution is to define it as deferred in the </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Empty</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Open</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> states and get it handled in the first
+state where the event is not to be deferred. It can then be handled or
+rejected. In this example, only when </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>Stopped</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> becomes active will the event be handled as </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Empty</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Open</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> defer the event.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape
+ id="Bild_x0020_4" o:spid="_x0000_i1034" type="#_x0000_t75" alt="Orthogonal-deferred.jpg"
+ style='width:486.6pt;height:604.2pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image007.jpg" o:title="Orthogonal-deferred"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=649 height=806
+src="index-Dateien/image030.jpg" alt=Orthogonal-deferred.jpg v:shapes="Bild_x0020_4"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Although it may sound
+arcane, it is rather mundane. You only need to add these two new states and
+change the definition of </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>initial_state</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> to reflect the second region:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>typedef</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>mpl</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>vector</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>Empty</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>,</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>AllOk</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt; </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>initial_state;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:
+EN-US'>Now for the terminate state, simply define ErrorMode as a terminate
+state:</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>ErrorMode</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>terminate_state&lt;&gt;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:
+EN-US'>Or as an interrupt state, which can be ended with the event </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>end_error</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:EN-US'>:</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>struct</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>ErrorMode</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> : </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>public</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>
+msm::front::</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>interrupt_state&lt;end_error&gt;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:
+EN-US'>And you're done with the orthogonal regions! You don't have to give the regions
+an id but be advised that there is currently no compile time enforcement of
+region consistency (Msm does not yet check that the regions are truly
+orthogonal)</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:
+EN-US'>As for our deferred event, the following typedef in </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>Empty</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:EN-US'>and
+</span></code><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;
+mso-bidi-font-size:12.0pt;color:#030003;mso-ansi-language:EN-US'>Open</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:EN-US'>will
+do:</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:
+EN-US'>typedef</span></code><code><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>mpl</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>vector</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>play</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt; </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>deferred_events</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:
+EN-US'>With this, the event will be put in the deferred queue until a state
+without this typedef handles or rejects it (with a call to </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>no_transition</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:#030003;mso-ansi-language:EN-US'>).<o:p></o:p></span></code></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3><a name="_Adding_an_history"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Adding an history<o:p></o:p></span></h3>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>History.cpp<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>UML defines two types of
+histories, Shallow History and Deep History. <o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>What is it and when do you
+need it? In the previous examples, if the player was playing the second song
+and the user pressed pause, at the next press on the play button, the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Playing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> state would become active and the
+first song would play again. Soon would the first client complaints follow.
+They'd of course demand, that if the player was paused, then it should remember
+which song was playing. But it the player was stopped, then it should restart
+from the first song. <o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Now, how can it be done? Of
+course, you could add a bit of programming logic and generate extra events to
+make the second song start if coming from Pause. Something like:<o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>if
+(Event == end_pause) </span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>{</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>for
+(int i=0;i&lt; song number;++i)</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>{</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>player.process_event(NextSong());</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>}</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><code><span lang=EN-US style='font-size:10.0pt;mso-ansi-language:EN-US'>}</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Not much to like in this
+example, isn't it? To solve this problem, you define what is called a shallow
+or a deep history.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>A shallow history reactivates
+the last active state of a submachine when this state machine becomes active
+again. <o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>The deep history does the
+same recursively, so if this last active state of the submachine was itself a
+submachine, its last active state would become active and this will continue
+until an active state is a normal state.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>For example, let us have a
+look at the following UML diagram:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt'><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape
+ id="Grafik_x0020_12" o:spid="_x0000_i1033" type="#_x0000_t75" alt="HistoryTutorial.jpg"
+ style='width:427.2pt;height:617.4pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image009.jpg" o:title="HistoryTutorial"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=570 height=823
+src="index-Dateien/image031.jpg" alt=HistoryTutorial.jpg v:shapes="Grafik_x0020_12"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>As explained in the <a
+href="MsmSession_Handout.pdf">BoostCon09 paper</a>, Histories are weird. First,
+there can be just one. And they can have only one out transition, so if you
+have orthogonal regions, you are out of luck. They also replace the initial
+state symbol. And if you have deep policy, things become much worse because you
+cannot easily draw a line into a submachine. To make it worse, they are not
+exactly object-oriented as a on the picture, a transition should have been
+drawn directly into Playing, with the History as target.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Msm goes another way and
+makes this a policy so you can define your own histories. Furthermore, they are
+a policy of the backend. This allows you to reuse the same state machine
+frontend with different history policies.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Concretely, your frontend
+stays unchanged:<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";color:blue;mso-ansi-language:EN-US;
+mso-no-proof:yes'>struct</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'> <span style='color:#030003'>Playing_</span> : <span
+style='color:blue'>public</span> <span style='color:#030003'>msm</span>::<span
+style='color:#030003'>front</span>::<span style='color:#030003'>state_machine_def</span>&lt;<span
+style='color:#030003'>Playing_</span>&gt;</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>You then add the policy to
+the backend:<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";color:blue;mso-ansi-language:EN-US;
+mso-no-proof:yes'>typedef</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'> <span style='color:#030003'>msm</span>::<span
+style='color:#030003'>back</span>::<span style='color:#030003'>state_machine</span>&lt;<span
+style='color:#030003'>Playing_</span>,<span style='color:#030003'>msm</span>::<span
+style='color:#030003'>back</span>::<span style='color:#030003'>ShallowHistory</span>&lt;<span
+style='color:#030003'>mpl</span>::<span style='color:#030003'>vector</span>&lt;<span
+style='color:#030003'>end_pause</span>&gt; &gt; &gt; <span style='color:#030003'>Playing</span>;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>This states that a shallow
+history must be activated if the </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>Playing</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> state machine gets activated by the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>end_pause</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> event and only this one (or any
+other event added to the mpl::vector). If the state machine was in the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Stopped</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> state and the event </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>play</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> was generated, the history would
+not be activated and the normal initial state would become active.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>By default, history is
+disabled. For your convenience the library provides in addition to </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>ShallowHistory</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> a non-UML standard </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>AlwaysHistory</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> policy which always activates
+history, whatever event triggers the submachine activation.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Deep history is not
+directly available. The reason is that it would conflict with policies which
+sub- state machines could define. Of course, if say Song1 were a state machine
+itself, it could use the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>ShallowHistory</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> policy itself thus creating Deep History.<o:p></o:p></span></p>
+
+<h3><a name="_Using_&#8220;flags&#8221;"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></h3>
+
+<h3><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Using &#8220;flags&#8221;<o:p></o:p></span></h3>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>Flags.cpp<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>This tutorial is devoted to
+a concept not defined in UML: flags. It has been added into Msm after proving
+itself useful on many occasions. Please, do not be frightened as we are not
+talking about ugly shortcuts made of an improbable collusion of Booleans.<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>So what is it and what is
+its use?<o:p></o:p></span></p>
+
+<p><span lang=EN-US style='mso-ansi-language:EN-US'>If you look into the
+Boost.Statechart documentation you'll find some code like:<o:p></o:p></span></p>
+
+<pre><span lang=EN-US style='mso-ansi-language:EN-US'>if ( ( state_downcast&lt; const <span
+style='color:blue'>NumLockOff</span> * &gt;() != 0 ) &amp;&amp;<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>( state_downcast&lt; const <span
+style='color:blue'>CapsLockOff</span> * &gt;() != 0 ) &amp;&amp;<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>( state_downcast&lt; const <span
+style='color:blue'>ScrollLockOff</span> * &gt;() != 0 ) )<o:p></o:p></span></pre>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>While correct, this can be
+error-prone and a potential time-bomb when you add new states or orthogonal
+regions.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>And most of all, it hides the real
+question, which would be &#8220;Does my state machine's current state define a
+special property&#8221;? In this special case &#8220;are my keys in a lock
+state&#8221;? So let's apply the Fundamental Theorem of Software Engineering
+and move one level of abstraction higher.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In our player example, let's say we
+need to know if the player has a loaded CD. We could do the same:<o:p></o:p></span></p>
+
+<pre><span lang=EN-US style='mso-ansi-language:EN-US'>if ( ( state_downcast&lt; const <span
+style='color:blue'>Stopped</span> * &gt;() != 0 ) &amp;&amp;<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>( state_downcast&lt; const <span
+style='color:blue'>Open</span> * &gt;() != 0 ) &amp;&amp;<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>( state_downcast&lt; const <span
+style='color:blue'>Paused</span> * &gt;() != 0 ) &amp;&amp;<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>( state_downcast&lt; const <span
+style='color:blue'>Playing</span> * &gt;() != 0 ) )<o:p></o:p></span></pre>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Or flag these 4 states as
+CDLoaded-able. You can do it like this:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>typedef</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>mpl</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>vector1</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>CDLoaded</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt; </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>flag_list</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Inside each of the above states. You
+can even define a list of flags, for example in </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Playing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>typedef</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>mpl</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>::</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>vector2</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>PlayingPaused</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>,</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>CDLoaded</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt; </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>flag_list</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;</span></code><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This means that </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Playing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> supports both properties.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Now to check if your player has a
+loaded CD, check if your flag is active in the current state:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>player</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>p</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>;</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>if (</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>p</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>.</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>is_flag_active</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>CDLoaded</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;())
+...</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>And what if you have orthogonal
+regions? How to decide if a state machine is in a flagged state? By default,
+you keep the same code and the current states will be OR'ed, meaning if one of
+the active states has the flag, then </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>is_flag_active</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> returns true. Of course, in some cases, you
+might want that all of the active states are flagged for the state to be
+active. You can also AND the active states:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>if (</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>p</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>.</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>is_flag_active</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>CDLoaded</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>,</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>player::Flag_AND</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;())
+...</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The following diagram displays the
+flag situation in the tutorial.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_11"
+ o:spid="_x0000_i1032" type="#_x0000_t75" alt="FlagsTutorial.jpg" style='width:462pt;
+ height:655.2pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image011.jpg" o:title="FlagsTutorial"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=616 height=874
+src="index-Dateien/image032.jpg" alt=FlagsTutorial.jpg v:shapes="Grafik_x0020_11"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
+mso-fareast-font-family:"Times New Roman";mso-fareast-theme-font:minor-fareast;
+mso-ansi-language:EN-US;mso-fareast-language:DE;mso-bidi-language:AR-SA'><br
+clear=all style='mso-special-character:line-break;page-break-before:always'>
+</span>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Anonymous_transitions"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Anonymous transitions<o:p></o:p></span></h3>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_13"
+ o:spid="_x0000_i1031" type="#_x0000_t75" alt="Anonymous.jpg" style='width:333pt;
+ height:331.8pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image013.jpg" o:title="Anonymous"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=444 height=442
+src="index-Dateien/image033.jpg" alt=Anonymous.jpg v:shapes="Grafik_x0020_13"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Anonymous transitions are
+transitions without a named event. This means that the transition automatically
+fires when the predecessor state is entered (to be exact, after the entry
+condition). Otherwise it is a normal transition with actions and guards. <o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Why would you need something like
+that? A possible case would be if a part of your state machine implements some
+algorithm, where states are steps of the algorithm implementation. Then, using
+several anonymous transitions with different guard conditions, you are actually
+implementing some if/else statement.<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Another possible use would be a
+real-time system called at regular intervals and always doing the same thing,
+meaning implementing the same algorithm. The advantage is that once you know
+how long a transition takes to execute on the system, by calculating the
+longest path (the number of transitions from start to end), you can pretty much
+know how long your algorithm will take in the worst case, which in turns tells
+you how big of a time frame you are to request from a scheduler.<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>What is the cost of this feature? If
+you do not use any anonymous transition, nothing because Msm will recognize it
+and suppress the functionality. If you do use it, it will cost you a second </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>process_event</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> after each event processing, thus
+doubling the execution time, which is not as bad as it sounds as Msm&#8217;s
+execution speed is high anyway.<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>To define such a transition, use
+&#8220;none&#8221; in the transition table for the standard Msm front-end, or
+for the functor-based front-end, for example:<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt; <span
+style='color:#030003'>State3</span><span style='mso-spacerun:yes'>&nbsp;
+</span>, <span style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>State4</span><span style='mso-spacerun:yes'>&nbsp;
+</span>, &amp;<span style='color:#030003'>p</span>::<span style='color:#030003'>State3ToState4</span><span
+style='mso-spacerun:yes'>&nbsp; </span>, &amp;<span style='color:#030003'>p</span>::<span
+style='color:#030003'>always_true</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Or:<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt; <span
+style='color:#030003'>State3</span><span style='mso-spacerun:yes'>&nbsp;
+</span>, <span style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>State4</span><span style='mso-spacerun:yes'>&nbsp;
+</span>, <span style='color:#030003'>State3ToState4</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>always_true</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>&gt;</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>If you are using eUML,
+it is even easier. Instead of source state + event == next state &#8230; you
+omit the &#8220;+&#8221; part, so the transition would become:<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>State3</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>() == <span
+style='color:#030003'>State4</span>() [<span style='color:#030003'>always_true</span>()]
+/ <span style='color:#030003'>State3ToState4</span>()</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Please have a look at the tutorials,
+there is one defined for plain old Msm, one
+for functors, and one <a
+href="AnonymousTutorialEuml.cpp">using eUML</a>.<br clear=all style='mso-special-character:
+line-break;page-break-before:always'>
+<o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_The_many_ways"></a><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>The many ways to enter a composite state<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Please have a look at the <a
+href="DirectEntryTutorial.cpp">DirectEntryTutorial</a>.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This tutorial is for expert UML
+designers, and most designers will fortunately never need any of the explained
+concepts, with the possible exception of exit points.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Let us count the ways to enter a
+composite state, as specified by UML:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo17;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><u><span lang=EN-US style='mso-ansi-language:
+EN-US'>Default entry</span></u><span lang=EN-US style='mso-ansi-language:EN-US'>:
+A transition leads to the edge of a composite state. This is the default entry,
+as seen in the previous tutorials. The initial state in each orthogonal region
+becomes active.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo17;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><u><span lang=EN-US style='mso-ansi-language:
+EN-US'>Shallow/Deep History entry</span></u><span lang=EN-US style='mso-ansi-language:
+EN-US'>: See History tutorial.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo17;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><u><span lang=EN-US style='mso-ansi-language:
+EN-US'>Explicit entry</span></u><span lang=EN-US style='mso-ansi-language:EN-US'>:
+if a transition goes to a sub-state of a composite state, this state becomes
+active and like in the previous examples, its entry action is executed after
+the entry action from the composite state.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo17;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><u><span lang=EN-US style='mso-ansi-language:
+EN-US'>Fork</span></u><span lang=EN-US style='mso-ansi-language:EN-US'>: an
+explicit entry into more than one region.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo17;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><u><span lang=EN-US style='mso-ansi-language:
+EN-US'>Entry point entry</span></u><span lang=EN-US style='mso-ansi-language:
+EN-US'>: Entering a submachine through an entry point pseudo state. A pseudo
+state is defined as connecting exactly one transition ending on the pseudo
+state outside of the submachine to one transition inside the submachine and
+having the pseudo state as source. There are two differences with explicit
+entries. First you have two transitions, meaning two actions (but just one
+guard as UML forbids guard conditions on the inside transition), second you
+have only one transition inside the composite. It is supposed to provide some
+kind of encapsulation.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo17;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>If
+the entered composite has more than one region, the regions not directly
+entered are starting at the initial state.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Exiting is somehow easier:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l8 level1 lfo18;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>&#8220;Standard&#8221;
+exit: a transition originating from the edge of a composite state to another
+state<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l8 level1 lfo18;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Exit
+point pseudo state: connects one transition inside a composite state to a
+transition outside the composite and leading to another (outside) state.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Msm (almost) fully supports these
+features. Almost because there is currently one limitation, that it is only
+possible to explicitly enter a sub- composite of the target composite and not
+exit it &#8220;upwards&#8221; this way. To exit, Msm just supports the two
+previously described methods.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Sounds a bit complicated? Let us
+explain using an example where all of the previously named methods are used:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:12.0pt;page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_10"
+ o:spid="_x0000_i1030" type="#_x0000_t75" alt="entry tutorial.jpg" style='width:475.8pt;
+ height:574.8pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image015.jpg" o:title="entry tutorial"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=634 height=766
+src="index-Dateien/image034.jpg" alt="entry tutorial.jpg" v:shapes="Grafik_x0020_10"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We find in this diagram:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo19;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>A
+&#8220;normal&#8221; entering into </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>SubFsm2</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> triggered by </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>event1</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and back to </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>State1</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> using the same event. In each zone
+is the initial state activated, i.e. </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>SubState1</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> and </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>SubState1b</span><span lang=EN-US
+style='mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo19;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>An
+explicit entry into </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>SubFsm2::SubState2</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> for zone &#8220;</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>a</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8221; with </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>event2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> as trigger, meaning that in region
+&#8220;</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>b</span><span lang=EN-US style='mso-ansi-language:EN-US'>&#8221; the
+initial state, </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>SubState1b</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>, activated.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo19;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>A
+fork into zones &#8220;</span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>a</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>&#8221; and &#8220;</span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>b</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>&#8221; to the explicit entries </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubState2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubState2b</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, triggered by </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>event3</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>. Both states become active so no
+zone is default activated (if we had a third zone, it would be).<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo19;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>A
+connection of two transitions through an entry pseudo state, </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2::PseudoEntry1</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, triggered by </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>event4</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and triggering also the second
+transition on the same event (both transitions must be triggered by the same
+event). Zone &#8220;</span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>b</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>&#8221; gets default-activated and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubState1b</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> becomes active.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo19;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>An
+exit from </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>SubFsm2</span><span lang=EN-US style='mso-ansi-language:EN-US'> using an
+exit pseudo-state, </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>PseudoExit1</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>, triggered by </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>event5</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> and connecting two transitions using the same event. Again, the event
+is forwarded to the second transition and both regions are exited, as </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> becomes inactive. Note that if no
+transition is defined from </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>PseudoExit1</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>, an error (as defined in the UML standard) will be detected and </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>no_transition</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> called.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Sounds like an awful lot of code to
+write? Not at all, as Msm offers an easy syntax. <o:p></o:p></span></p>
+
+<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'>Explicit entry<o:p></o:p></span></h4>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>First, to define that a state is an
+explicit entry, you have to make it a state and mark it as explicit, giving as
+template parameters the zone id (the zone id starts with 0 and corresponds to
+the first initial state of the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>initial_state</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> type sequence).<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>SubState2</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'> : </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>public</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+msm::front::</span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>state</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;&gt;
+, </span><span lang=EN-US style='font-family:"Courier New";color:blue;
+mso-ansi-language:EN-US'>public</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'> msm::front::</span><span lang=EN-US
+style='font-family:"Courier New";color:#030003;mso-ansi-language:EN-US'>explicit_entry</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;0&gt;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And define the
+submachine as:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>msm</span>::<span style='color:#030003'>back</span>::<span
+style='color:#030003'>state_machine</span>&lt;<span style='color:#030003'>SubFsm2_</span>&gt;
+<span style='color:#030003'>SubFsm2</span>;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>You can then use it as
+target in a transition with </span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>State1</span><span lang=EN-US
+style='color:black;mso-ansi-language:EN-US'> as source:</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=25*><COL WIDTH=36*><COL WIDTH=41*><COL WIDTH=76*><COL WIDTH=77*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>State1,</span></p>
+ </td>
+ <td width="16%" valign=top style='width:16.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Event2,</span></p>
+ </td>
+ <td width="30%" valign=top style='width:30.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>SubFsm2::direct&lt; SubFsm2_::SubState2&gt;</span></p>
+ </td>
+ <td width="30%" valign=top style='width:30.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The syntax deserves some
+explanation. </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>SubFsm2_</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> is a front end. </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>SubState2</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> is a nested state, therefore the </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2_::SubState2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> syntax. The containing machine
+(containing </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>State1</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> and </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>SubFsm2</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>) refers to the backend instance (</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>). </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2::direct</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> states that a direct entry is
+desired.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>While the syntax might seem a bit
+cumbersome, it is an improvement from Msm v1.x which could not support several
+instances of SubFsm2.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We could now have </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2a::direct&lt;SubFsm2_::SubState2&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2b::direct&lt;SubFsm2_::SubState2&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>. Msm v1.x also needed an ugly extra
+constructor in the submachine. This is now gone.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>We here use a _row but
+it can be any of the available rows.</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Note (also valid for forks)</span></u><span
+lang=EN-US style='mso-ansi-language:EN-US'>: in order to make compile time more
+bearable for the more standard cases, and unlike initial states, explicit entry
+states which are also not found in the transition table do NOT get
+automatically created. To explicitly create such states, you need to add in the
+state machine containing the explicit states a simple typedef giving a sequence
+of states to be created like:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>typedef</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+mpl::vector&lt;SubState2,SubState2b&gt; explicit_creation;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Of course, if these states are found
+in the transition table, which is the common case, this is not necessary. The
+tutorial makes use of this typedef for teaching purposes.<o:p></o:p></span></p>
+
+<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Fork_1"></a><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Fork<o:p></o:p></span></h4>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Need a fork instead of
+an explicit entry? Then, as a fork is an entry into states of different
+regions, we need to give it a list of target states:</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=25*><COL WIDTH=36*><COL WIDTH=41*><COL WIDTH=127*><COL WIDTH=27*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>State1,</span></p>
+ </td>
+ <td width="16%" valign=top style='width:16.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Event3,</span></p>
+ </td>
+ <td width="50%" valign=top style='width:50.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span lang=EN-US
+ style='font-family:"Courier New";mso-ansi-language:EN-US'>mpl::vector&lt;SubFsm2::direct&lt;
+ SubFsm2_::SubState2&gt;, SubFsm2::direct &lt;SubFsm2_::SubState2b&gt; &gt;</span><span
+ lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+ </td>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>With SubState2 defined
+as before and SubState2b defined as being in the second zone (Caution: Msm does
+not check yet that the zone is correct):</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>SubState2b</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'> : </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>public</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+msm::front::</span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>state</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;&gt;
+, </span><span lang=EN-US style='font-family:"Courier New";color:blue;
+mso-ansi-language:EN-US'>public</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'> msm::front::</span><span lang=EN-US
+style='font-family:"Courier New";color:#030003;mso-ansi-language:EN-US'>explicit_entry</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;1&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'>Entry pseudo states<o:p></o:p></span></h4>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>To define an entry
+pseudo state, you need derive from the corresponding class and give the zone
+id:</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>PseudoEntry1</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'> : </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>public</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+msm::front::</span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>entry_pseudo_state</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;0&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And add the
+corresponding transition in Fsm's transition table:</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=25*><COL WIDTH=36*><COL WIDTH=41*><COL WIDTH=127*><COL WIDTH=27*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="14%" valign=top style='width:14.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>State1,</span></p>
+ </td>
+ <td width="16%" valign=top style='width:16.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Event4,</span></p>
+ </td>
+ <td width="50%" valign=top style='width:50.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span lang=EN-US
+ style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2::entry_pt&lt;SubFsm2_::PseudoEntry1&gt;
+ </span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+ </td>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And another in the
+SubFsm2_ submachine definition (remember that UML defines an entry point as a
+connection between two transitions), for example this time with an action
+method:</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=24*><COL WIDTH=52*><COL WIDTH=23*><COL WIDTH=29*><COL WIDTH=109*><COL WIDTH=19*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
+ <td width="9%" valign=top style='width:9.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>PseudoEntry1,</span></p>
+ </td>
+ <td width="9%" valign=top style='width:9.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Event4,</span></p>
+ </td>
+ <td width="11%" valign=top style='width:11.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>SubState3,</span></p>
+ </td>
+ <td width="42%" valign=top style='width:42.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&amp;SubFsm2_::entry_action</span></p>
+ </td>
+ <td width="8%" valign=top style='width:8.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'>Exit pseudo states<o:p></o:p></span></h4>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And finally, exit pseudo
+states are to be used almost the same way, but defined differently: it takes as
+template argument the event to be forwarded (no region id is necessary):</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>PseudoExit1</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'> : </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>public</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>exit_pseudo_state</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;</span><span
+lang=EN-US style='font-family:"Courier New";color:#030003;mso-ansi-language:
+EN-US'>event6</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&gt; </span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And you need, as for
+entry pseudo states, two transitions, one in SubFsm2_:</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=24*><COL WIDTH=44*><COL WIDTH=32*><COL WIDTH=50*><COL WIDTH=107*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
+ <td width="9%" valign=top style='width:9.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="17%" valign=top style='width:17.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>SubState3,</span></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Event5,</span></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>PseudoExit1</span></p>
+ </td>
+ <td width="42%" valign=top style='width:42.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>And one in the containing state
+machine:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=24*><COL WIDTH=44*><COL WIDTH=32*><COL WIDTH=50*><COL WIDTH=107*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
+ <td width="9%" valign=top style='width:9.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="17%" valign=top style='width:17.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span lang=EN-US
+ style='font-family:"Courier New";mso-ansi-language:EN-US'>SubFsm2::exit_pt&lt;SubFsm2_::PseudoExit1&gt;,</span><span
+ lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+ </td>
+ <td width="12%" valign=top style='width:12.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Event6,</span></p>
+ </td>
+ <td width="20%" valign=top style='width:20.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>State2</span></p>
+ </td>
+ <td width="42%" valign=top style='width:42.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Important note 1:</span></u><span
+lang=EN-US style='mso-ansi-language:EN-US'> UML defines transiting to an entry
+pseudo state and having either no second transition or one with a guard as an
+error but defines no error handling. Msm will tolerate this behavior; the entry
+pseudo state will simply be the newly active state.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Important note 2:</span></u><span
+lang=EN-US style='mso-ansi-language:EN-US'> UML defines transiting to an exit
+pseudo state and having no second transition as an error, and also defines no
+error handling. Therefore, it was decided to implement exit pseudo state as
+terminate states and the containing composite not properly exited will stay
+terminated as it was technically &#8220;exited&#8221;.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Important note 3:</span></u><span
+lang=EN-US style='mso-ansi-language:EN-US'> UML states that for the exit point,
+the same event must be used in both transitions. Msm relaxes this rule and only
+wants the event on the inside transition to be convertible to the one of the
+outside transition. In our case, </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>event6</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> is convertible from </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>event5</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>. Notice that the forwarded event
+must be named in the exit point definition. For example, we could define </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>event6</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> as simply as:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>event6</span> <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:#030003'>event6</span>(){}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>Event</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:#030003'>event6</span>(<span
+style='color:#030003'>Event</span> <span style='color:blue'>const</span>&amp;){}<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Advanced"></a><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Advanced<o:p></o:p></span></h2>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Conflicting_Transitions"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Conflicting Transitions<o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>According to the UML standard, two
+transitions are said to be in conflict if they can both trigger an exit from
+the same state with the same event, meaning if at a certain time and for a
+given event, these two transitions can be triggered.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>There are two kinds of conflicts,
+both supported by Msm:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l42 level1 lfo20;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>For
+a given source state, several transitions have been defined, triggered by the
+same event but <u>different guards</u>.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l42 level1 lfo20;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>An
+internal transition of a composite state conflicts with a transition causing an
+exit from the composite state.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Unfortunately, UML does not fully
+specify the correct behavior. Msm supports what UML specifies, that the most
+nested transition has the higher priority.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>If two transitions at the same depth
+are possible, there is no specification (except that the user has to take care
+of having guards which uniquely decide of the valid transition), so Msm gives
+higher priority to the last defined in the transition table.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>So, for example you can define (see
+in SimpleTutorial):<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
+ style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
+ 3.0pt 3.0pt 3.0pt 3.0pt'>
+ <COL WIDTH=21*><COL WIDTH=17*><COL WIDTH=26*><COL WIDTH=48*><COL WIDTH=48*><COL WIDTH=48*><COL WIDTH=49*>
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
+ <td width="8%" valign=top style='width:8.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ <td width="7%" valign=top style='width:7.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Start</span></code></p>
+ </td>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Event</span></code></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Next</span></code></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Action</span></code></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><code><span
+ style='font-size:10.0pt;color:green'>Guard</span></code></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width="8%" valign=top style='width:8.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="7%" valign=top style='width:7.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Empty,</span></p>
+ </td>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>cd_detected,</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Stopped</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&amp;fsm::store_cd_info</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&amp;fsm::good_disk_format</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&gt;,</span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
+ <td width="8%" valign=top style='width:8.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:
+ 10.0pt;font-family:"Courier New";color:#030003'>_row &lt;</span></p>
+ </td>
+ <td width="7%" valign=top style='width:7.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Empty,</span></p>
+ </td>
+ <td width="10%" valign=top style='width:10.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>cd_detected,</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>Playing</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&amp;fsm::store_cd_info</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'>
+ <p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-family:
+ "Courier New"'>&amp;fsm::auto_start</span></p>
+ </td>
+ <td width="19%" valign=top style='width:19.0%;padding:3.0pt 3.0pt 3.0pt 3.0pt'></td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The last transition has the highest
+priority so only if </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>auto_start</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> returns false is the other transition tested.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The highest priority given to deeper
+transitions makes sense. If we remember that exit points connects two
+transitions, you want that the inside one gets tested first to really exit.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Containing_state_machine"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Containing state machine
+(deprecated)<o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This feature is still supported in
+Msm v2.0 but made obsolete by the fact that every guard/action/entry
+action/exit action get the state machine passed as argument.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'>All of the states defined in the state machine are created upon program
+initialization. This has the huge advantage of a reduced syntactic noise. The
+cost is a small loss of control of the user on the state creation and access.
+Quite fast came from the beta testers the request of a way for a state to get
+access to its containing state machine. This is implemented via another policy.
+Basically, a state needs to change its declaration to:<o:p></o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:blue;mso-ansi-language:EN-US'>struct</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>Stopped</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> : </span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:blue;mso-ansi-language:EN-US'>public</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> msm::front::</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>state</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'>&lt;</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>sm_ptr</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'>&gt;</span></i></code><i style='mso-bidi-font-style:
+normal'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p>&nbsp;</o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'>And to provide a set_sm_ptr function:<o:p></o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:blue;mso-ansi-language:EN-US'>void</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'> </span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>set_sm_ptr</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'>(</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:blue;mso-ansi-language:EN-US'>player</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'>* </span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:#030003;mso-ansi-language:EN-US'>pl</span></i></code><code><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:10.0pt;
+color:black;mso-ansi-language:EN-US'>)</span></i></code><i style='mso-bidi-font-style:
+normal'><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p>&nbsp;</o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'>to get a pointer to the containing state machine. The same applies to
+terminate_state / interrupt_state and entry_pseudo_state / exit_pseudo_state.<o:p></o:p></span></i></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i
+style='mso-bidi-font-style:normal'><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p>&nbsp;</o:p></span></i></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Getting_a_pointer"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Getting a pointer to a state<o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is sometimes necessary to have
+the client code get access to the states' data. After all, the states are
+created once for good and hang around as long as the state machine does so why
+not use it? You simply just need sometimes to get information about any state,
+even inactive ones. An example is if you want to write a coverage tool and know
+how many times a state was visited. How to do it? Again, quite simply:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>player::Stopped</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>* </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>tempstate</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> = </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>p</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>.</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>get_state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>player::Stopped*</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;();</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>or</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>player::Stopped&amp;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>tempstate2</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> = </span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>p</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>.</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:#030003;mso-ansi-language:EN-US'>get_state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:blue;mso-ansi-language:EN-US'>player::Stopped&amp;</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'>&gt;();</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Depending on your
+personal taste.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Copying"></a><a name="_Exceptions"></a><code><span lang=EN-US
+style='mso-ansi-font-size:13.5pt;mso-bidi-font-size:14.0pt;font-family:"Times New Roman","serif";
+mso-ansi-language:EN-US'>Exceptions</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";mso-ansi-language:EN-US'>Normally, you
+should not need exceptions. UML also says little about exceptions. To handle
+errors, the best UML-safe method is to add an orthogonal region, like
+previously shown.</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";mso-ansi-language:EN-US'>Of course,
+errors happen. In this case, the state machine is said to be unstable, because
+a transition may have been partially executed. The framework offers a chance to
+set it straight by catching std::exception and calling: </span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:blue;mso-ansi-language:EN-US'>void</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>exception_caught (std::exception&amp; e)</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>thus
+giving you a chance to handle the exception. <o:p></o:p></span></code></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>Embedded
+systems often require no exception. You can disable this feature by defining a <a
+href="#_Getting_more_speed">typedef</a>. EUML also offers <a
+href="#_Customizing_a_state">a way</a> to do it.</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Helpers_methods"></a><code><span lang=EN-US style='mso-ansi-font-size:
+13.5pt;mso-bidi-font-size:14.0pt;font-family:"Times New Roman","serif";
+mso-ansi-language:EN-US'>Helpers methods</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>msm::back::state_machine
+also provides a few helper methods which you might need but will probably not:</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l43 level1 lfo21;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;color:blue;mso-ansi-language:EN-US'>const</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>std</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>::</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:#030003;
+mso-ansi-language:EN-US'>vector</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>&lt;</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>int</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>&gt;&amp; </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:#030003;
+mso-ansi-language:EN-US'>current_state</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>() </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>const</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>: the ids of currently active states</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l43 level1 lfo21;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;color:blue;mso-ansi-language:EN-US'>const</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>BaseState</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>* </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:#030003;
+mso-ansi-language:EN-US'>get_state_by_id</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>(</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>int</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>id</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>) </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>const</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>: returns the state with the given id as a
+pointer to a (user- or default-) base state. It executes in O(number of
+states).</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l43 level1 lfo21;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;color:blue;mso-ansi-language:EN-US'>bool</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>is_contained</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>() </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>const</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>: returns true if the state machine is used
+as a composite in another state machine, false otherwise.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Getting_more_speed"></a><code><span lang=EN-US style='mso-ansi-font-size:
+13.5pt;mso-bidi-font-size:14.0pt;font-family:"Times New Roman","serif";
+mso-ansi-language:EN-US'>Getting more speed</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>Msm
+is offering many UML features at a high-speed, but sometimes, you just need
+more speed and are ready to give up some features in exchange.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>A </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>process_event</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>is
+doing 5 different jobs:</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l18 level1 lfo22;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>checking for terminate/interrupt states</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l18 level1 lfo22;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>handling the message queue (for
+entry/exit/transition actions generating themselves events)</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l18 level1 lfo22;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>handling deferred events</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l18 level1 lfo22;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>catching exceptions</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l18 level1 lfo22;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:black;mso-ansi-language:EN-US'>handling the state switching and action
+calls</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>Of these
+jobs, only the last is absolutely necessary to a state machine (its core job),
+the other ones are nice-to-haves which cost CPU time. In many cases, it is not
+so important, but in embedded systems, this can lead to ad-hoc state machine
+implementations.</span></code><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>Msm
+detects itself if a concrete state machine makes use of terminate/interrupt
+states and deferred events and deactivates them if not used. For the other two,
+if you want them out, you need to help by indicating in your implementation
+that you want them out. This is done with two simple typedefs, for example:</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:green;mso-ansi-language:EN-US'>// Concrete FSM implementation </span></code><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>player_</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'> : </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>public</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+msm::front::</span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>state_machine_def</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&lt;</span><span
+lang=EN-US style='font-family:"Courier New";color:#030003;mso-ansi-language:
+EN-US'>player_</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&gt;</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>{</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+no need for exception handling or message queue</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>typedef</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:
+EN-US'>int</span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'> </span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>no_exception_thrown</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>;</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>typedef</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:
+EN-US'>int</span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'> </span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>no_message_queue</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>;</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>...</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:green;
+mso-ansi-language:EN-US'>// rest of implementation</span></code><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>What
+is the gain? It will depend on your compiler and target system, so please refer
+to the performance page (where an example is also provided).
+If you use none of these extras, a </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>process_event</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>can
+execute up to 4 times faster. On a Q6600, an average transition execution lasts
+45ns with a full state machine, 10ns in the minimal case.</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Processing_events_inside"></a><span lang=EN-US style='mso-ansi-language:
+EN-US'>Processing events inside from within the front-end<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>It was possible in Msm v1 to call
+this-&gt;process_event() from within an action. But front-ends are now
+independent from back-ends and have therefore no such function. There are 3
+possible ways to do it:<o:p></o:p></span></p>
+
+<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l6 level1 lfo23;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>(Not recommended) Before the
+front-end definition, forward declare the front-end. Then declare the back-end.
+You can now in your front-end cast to the back-end: <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>struct player_;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>typedef msm::back::state_machine&lt;player_ &gt; player;<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l6 level1 lfo23;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Use a functor &#8220;<a
+href="#_Functor_rows">Row</a>&#8221; transition. These rows offer an FSM
+template argument. This argument is the concrete (back-end) state machine on
+which process_event can be called.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l6 level1 lfo23;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>eUML functors have the same
+property.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Customizing_states"></a><code><span lang=EN-US style='mso-ansi-font-size:
+18.0pt;mso-bidi-font-size:16.0pt;font-family:"Times New Roman","serif";
+mso-ansi-language:EN-US'>Customizing states</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></h2>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>By default, all states derive from </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>msm::default_base_state</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, which is neither polymorphic nor
+has any other useful purpose than to define a base for all states. The
+following part will describe the customization possibilities offered by Msm.<o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_User-defined_base_state"></a><code><span lang=EN-US style='mso-ansi-font-size:
+13.5pt;mso-bidi-font-size:14.0pt;font-family:"Times New Roman","serif";
+mso-ansi-language:EN-US'>User-defined base state / Polymorphic states</span></code><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Sometimes you will need states to be
+polymorphic. You might want to use </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>typeid</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> on them, like the tutorials do for logging.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>You might also need some added
+functionality in form of a virtual method.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Msm offers these possibilities by
+allowing the base state to be user-defined. To do this, you need two simple
+changes:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l32 level1 lfo24;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>add
+the non-default base state in your </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>msm::front::state&lt;&gt; </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>definition, as first template
+argument (except for </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>interrupt_states</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> for which it is the second argument, the first
+one being the event ending the interrupt), for example, </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>my_base_state</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> being your new base state for <u>all
+states</u> in a given state machine: <br>
+</span><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;color:blue;mso-ansi-language:EN-US'>struct</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>Empty</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>: </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>public</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> msm::front::</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>state</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>&lt;my_base_state&gt;</span></code><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'><br>
+</span><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Times New Roman","serif";color:black;mso-ansi-language:
+EN-US'>Now, </span></code><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;color:black;mso-ansi-language:EN-US'>my_base_state</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>is
+your new base state. If it has a virtual function, your states become
+polymorphic. Msm also provides a default polymorphic base type for your
+convenience, </span></code><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;color:black;mso-ansi-language:EN-US'>msm::front::polymorphic_</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>state</span></code><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l32 level1 lfo24;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><code><span lang=EN-US style='mso-ansi-font-size:
+12.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman","serif";
+color:#030003;mso-ansi-language:EN-US'>Add the user-defined base state in the
+state machine frontend definition, as a second template argument, for example:</span></code><span
+lang=EN-US style='color:#030003;mso-ansi-language:EN-US'><br>
+</span><code><span lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:
+12.0pt;color:blue;mso-ansi-language:EN-US'>struct</span></code><code><span
+lang=EN-US style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>player_ </span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>: </span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:blue;
+mso-ansi-language:EN-US'>public</span></code><code><span lang=EN-US
+style='font-size:10.0pt;color:black;mso-ansi-language:EN-US'> msm::front::</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:#030003;mso-ansi-language:EN-US'>state_machine</span></code><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+color:black;mso-ansi-language:EN-US'>&lt;</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:#030003;
+mso-ansi-language:EN-US'>player_</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>,</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:#030003;
+mso-ansi-language:EN-US'>my_base_state</span></code><code><span lang=EN-US
+style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;color:black;
+mso-ansi-language:EN-US'>&gt;</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><code><span
+lang=EN-US style='mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Times New Roman","serif";color:black;mso-ansi-language:EN-US'>You
+now have polymorphic states. Please have a look at <a href="SM-0arg.cpp">an
+example using polymorphic states</a> and the concept presented in the next
+paragraph, visitors.</span></code><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Visiting_active_states"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Visiting active states<o:p></o:p></span></h3>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In some cases, having only the id or
+a pointer-to-base of the currently active states is not enough. You might want
+to call non-virtually a method of the currently active states. It will not be
+said that Msm forces the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>virtual</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> keyword down your throat! <o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>To achieve this goal, Msm provides
+its own variation of a visitor pattern using the previously described
+user-defined state technique. If you add to your user-defined base state an </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>accept_sig</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> typedef giving the return value
+(unused for the moment) and signature and provide an </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> method with this signature, calling
+</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>state_machine::visit_current_states</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> will cause </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> to be called on the currently
+active states. Typically, you will also want to provide an empty default </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> in your base state in order in
+order not to force all your states to implement </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>. For example your base state could
+be:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> </span><span
+lang=EN-US style='font-family:"Courier New";color:#030003;mso-ansi-language:
+EN-US'>my_visitable_state</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>{</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+signature of the accept function</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>typedef</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>args</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&lt;</span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>void</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&gt;
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>accept_sig</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'>;</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+we also want polymorphic states</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>virtual</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+~</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>my_visitable_state</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>() {}</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+default implementation for states who do not need to be visited</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>void</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>accept</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>() </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>const</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+{}</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>This makes your states
+polymorphic and visitable. In this case, </span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> is made const and takes
+no argument. It could also be:</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>SomeVisitor</span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'> {&#8230;};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>my_visitable_state</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>{</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+signature of the accept function</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>typedef</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>args</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&lt;</span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>void</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>,</span><span
+lang=EN-US style='font-family:"Courier New";color:#030003;mso-ansi-language:
+EN-US'>SomeVisitor</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&amp;&gt; </span><span lang=EN-US
+style='font-family:"Courier New";color:#030003;mso-ansi-language:EN-US'>accept_sig</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+we also want polymorphic states</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>virtual</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+~</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>my_visitable_state</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>() {}</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+default implementation for states who do not need to be visited</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>void</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>accept</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>(</span><span lang=EN-US style='font-family:
+"Courier New";color:#030003;mso-ansi-language:EN-US'>SomeVisitor</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&amp;)
+</span><span lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:
+EN-US'>const</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'> {}</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And now, </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> will take one argument.
+It could also be non-const. </span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>By default, </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> takes up to 2
+arguments. To get more, add a #define </span><span lang=EN-US style='font-size:
+10.0pt;color:#030003;mso-ansi-language:EN-US'>BOOST_MSM_VISITOR_ARG_SIZE</span><span
+lang=EN-US style='color:#030003;mso-ansi-language:EN-US'> to another value
+before including state_machine.hpp. For example:</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>#define</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>BOOST_MSM_VISITOR_ARG_SIZE</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'> 3</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>#include</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#A31515;
+mso-ansi-language:EN-US'>&lt;boost/msm/back/state_machine.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>#include</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#A31515;
+mso-ansi-language:EN-US'>&lt;boost/msm/front/state_machine_def.hpp&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:#030003;mso-ansi-language:EN-US'>...</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>my_visitable_state</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>{</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+signature of the accept function</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>typedef</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>args</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&lt;</span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>void</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>,</span><span
+lang=EN-US style='font-family:"Courier New";color:#030003;mso-ansi-language:
+EN-US'>SomeVisitor</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>&amp;,</span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>int</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>,</span><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>const</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:
+EN-US'>char</span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'>*&gt; </span><span lang=EN-US style='font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>accept_sig</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+we also want polymorphic states</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>virtual</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+~</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>my_visitable_state</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>() {}</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:green;mso-ansi-language:EN-US'>//
+default implementation for states who do not need to be visited. Not const</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>void</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>accept</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>(</span><span lang=EN-US style='font-family:
+"Courier New";color:#030003;mso-ansi-language:EN-US'>SomeVisitor</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>&amp;,</span><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>int</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>,</span><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>const</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+</span><span lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:
+EN-US'>char</span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'>*) {}</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>You now only need
+implement </span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'>accept</span><span lang=EN-US style='color:black;
+mso-ansi-language:EN-US'> in states needing it. Note that </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>accept</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> will be called on ALL
+active states <u>and also automatically on sub-states of a composite</u>. </span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Important warning:</span></u><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> The method </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>visit_current_states</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> takes its parameter by
+value, so if the signature of the accept function is to contain a parameter passed
+by reference, pass this parameter with a boost:ref/cref to avoid undesired
+copies or slicing. So, for example, in the above case, call:</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>SomeVisitor</span><span lang=EN-US style='font-size:
+10.0pt;font-family:"Courier New";color:black;mso-ansi-language:EN-US'> </span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>vis</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";color:black;mso-ansi-language:EN-US'>;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>sm</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";color:black;mso-ansi-language:EN-US'>.</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#030003;
+mso-ansi-language:EN-US'>visit_current_states</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";color:black;mso-ansi-language:
+EN-US'>(</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>boost</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";color:black;mso-ansi-language:
+EN-US'>::</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>ref</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";color:black;mso-ansi-language:
+EN-US'>(</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
+color:#030003;mso-ansi-language:EN-US'>vis</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";color:black;mso-ansi-language:
+EN-US'>));</span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'> </span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Please have a look at
+the example using accept with 2 arguments.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_New_Msm_v2.0"></a><span lang=EN-US style='mso-ansi-language:EN-US'>New
+Msm v2.0 Features <o:p></o:p></span></h1>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This chapter will introduce the new
+features of Msm. This is actually just the beginning of the story; more, much
+more will come!<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We will first warm up with a front-end
+based on functors before moving on the eUML, which will provide us with a much
+bigger amount of fun.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Frontends"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Frontends<o:p></o:p></span></h2>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Msm is now divided between front
+&#8211;ends and back-ends. Well, at the moment, there is just one back-end. On
+the front-end side, there is more to see.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>One goal of the redesign in Msm v2.0
+is to offer users more state machine description languages than just the
+standard Msm described above. For example, it would be possible to make a
+front-end looking like Boost.Statechart but using Msm as back-end. In the 1.x
+series, each new language would have required making huge changes to the
+library. Now, everybody can build his own description language (in case one
+gets bored with the ones provided) without changes to the library. For those
+who feel like being a language writer, please feel free to contact me.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Functor_rows"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Functor
+rows<o:p></o:p></span></h2>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The rows which Msm offers come in
+different flavors. We saw the a_row, g_row, _row, row. This is already much to
+know, so why define new rows?<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>These types have some disadvantages:<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l20 level1 lfo25;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>They are more typing and information
+than we would wish. This means syntactic noise.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l20 level1 lfo25;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Function pointers are weird in C++.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l20 level1 lfo25;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>The action/guard signature is limited
+and does not allow for more variations of parameters (source state, target
+state, current state machine, etc.)<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l20 level1 lfo25;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is not easy to reuse action code
+from a state machine to another.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:18.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>To solve these problems, Msm v2.0 is
+based on functors. Concretely, how is this looking like? For example, in our
+first tutorial we could change the transition table to:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>Start<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Event<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Next<span style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Action<span style='mso-tab-count:3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Guard<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;
+</span>+---------+-------------+---------+---------------------+----------------------+<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>&lt; <span style='color:#030003'>Stopped</span>
+, <span style='color:#030003'>play</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>Playing</span> , <span style='color:#030003'>ActionSequence</span>&lt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:212.4pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>mpl</span>::<span style='color:#030003'>vector</span>&lt;<span
+style='color:#030003'>TestFct</span>,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:212.4pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>start_playback</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>&gt; &gt;<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'><o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>,<span style='color:#030003'>DummyGuard</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>&gt;,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>&lt; <span style='color:#030003'>Stopped</span>
+, <span style='color:#030003'>open_close</span><span
+style='mso-spacerun:yes'>&nbsp; </span>, <span style='color:#030003'>Open</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>, <span style='color:#030003'>open_drawer</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>, <span style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>&gt;,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>&lt; <span style='color:#030003'>Stopped</span>
+, <span style='color:#030003'>stop</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>Stopped</span> , <span style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>, <span style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>&gt;,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;
+</span>+---------+-------------+---------+---------------------+----------------------+<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>&lt; <span style='color:#030003'>Open</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>, <span style='color:#030003'>open_close</span><span
+style='mso-spacerun:yes'>&nbsp; </span>, <span style='color:#030003'>Empty</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>, <span style='color:#030003'>close_drawer</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>&gt;,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;
+</span>+---------+-------------+---------+---------------------+----------------------+<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>&lt; <span style='color:#030003'>Empty</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>, <span style='color:#030003'>open_close</span><span
+style='mso-spacerun:yes'>&nbsp; </span>, <span style='color:#030003'>Open</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>, <span style='color:#030003'>open_drawer</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>, <span style='color:#030003'>none</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>&gt;,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='mso-spacerun:yes'>&nbsp;&nbsp;</span>&lt; <span style='color:#030003'>Empty</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>, <span style='color:#030003'>cd_detected</span>
+, <span style='color:#030003'>Stopped</span> , <span style='color:#030003'>store_cd_info</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>, <span
+style='color:#030003'>good_disk_format</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>&gt;,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>g_row</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt; <span
+style='color:#030003'>Empty</span><span style='mso-spacerun:yes'>&nbsp;&nbsp;
+</span>, <span style='color:#030003'>cd_detected</span> , <span
+style='color:#030003'>Playing</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>, &amp;<span style='color:#030003'>p</span>::<span style='color:#030003'>auto_start</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&gt;,<span
+style='color:green'>// yes we can mix rows!</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8230;</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>// more rows</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In a nutshell, what is all this?<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l14 level1 lfo26;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Row is a template type with 5
+arguments. Where no guard, action or event (see <a
+href="#_Anonymous_transitions">anonymous transitions</a>) is needed, write
+&#8220;none&#8221;.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l14 level1 lfo26;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>You can mix new rows with the old
+g_row, a_row, etc.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l14 level1 lfo26;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8220;Row&#8221; allows reusing
+your functors in other state machines. State machine function pointers cannot
+offer this easily.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l14 level1 lfo26;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is possible to write
+combinations. For example, the &#8220;ActionSequence&#8221; type is using a
+list of actions to execute in sequence when the transition fires. So the action
+in the first transition is equivalent to
+&#8220;TestFct(&#8230;);start_playback(&#8230;);&#8221;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:18.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>What is exactly a functor looking
+like? For example, store_cd_info is defined as:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>store_cd_info</span> <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>FSM</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>EVT</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>SourceState</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>TargetState</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>void</span>
+<span style='color:blue'>operator</span>()(<span style='color:#030003'>FSM</span>&amp;
+<span style='color:#030003'>fsm</span>,<span style='color:#030003'>EVT</span> <span
+style='color:blue'>const</span>&amp; ,<span style='color:#030003'>SourceState</span>&amp;
+,<span style='color:#030003'>TargetState</span>&amp; )<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>cout</span> &lt;&lt; <span style='color:#A31515'>&quot;player::store_cd_info&quot;</span>
+&lt;&lt; <span style='color:#030003'>endl</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>fsm</span>.<span style='color:#030003'>process_event</span>(<span
+style='color:#030003'>play</span>());<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is a functor object taking as
+template arguments, the back-end state machine, event, and source and target states.
+<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Notice how the functor places a new
+event into the queue without knowing the exact type of the state machine. The
+functor can now be easily reused in other state machines.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>What if we defined a functor
+pre-incrementing an attribute in the source while another functor compares the
+result with say, 8? We could write
+Equal_&lt;Pre_inc_&lt;Src_data&gt;,Int_&lt;8&gt; &gt; where Equal_ is a functor
+comparing his two template arguments for equality, Pre_inc_ will pre-increment
+his template type, Src_data is a user-provided functor returning a reference to
+some internal state data and Int_ a wrapper around integer types.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Wait, stop a minute. We can combine
+functors?<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can, and why stop here?
+Wouldn&#8217;t we like to define guards like: <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8220;</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>good_disk_format
+&amp;&amp; (some_condition || some_other_condition)&#8221; <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;=&gt;
+<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>And_&lt;good_disk_format,Or_&lt;
+some_condition , some_other_condition&gt;.</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Well, it happens that Msm v2.0
+defines just this. There are And_, Not_, Or_... functors for most operators and
+even functors wrapping STL container methods or algorithms. Interested? Read
+on, it&#8217;s now going to get much more fun.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_eUML"></a><span lang=EN-US style='mso-ansi-language:EN-US'>eUML<o:p></o:p></span></h2>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Important note</span></u><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>: eUML requires a
+compiler supporting the C++0x decltype/typeof feature (from example VC &gt;= 9,
+g++ &gt;= 4.3. VC8 is partially supported)<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>The previous example is
+ok for simple actions but frankly, it is an awful lot to type and the
+readability isn&#8217;t great, so it would be nice to write code looking like
+C++ directly inside the transition table, like UML designers like to do on
+their state machine diagrams. This is what eUML is for.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>eUML is a
+(Boost.)Proto-based compile-time domain specific embedded language. It provides
+grammars which allow the definition of actions/guards directly inside the
+transition table or entry/exit in the state definition. It is defined in the
+namespace </span><u><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>msm::front::euml</span></u><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>There are grammars for
+actions, guards, flags, attributes, deferred events, initial states.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>It also relies on
+Boost.Typeof as a wrapper around the new decltype C++0x feature to provide a
+compile-time evaluation of all the grammars. Unfortunately, all the underlying
+Boost libraries are not Typeof-enabled, so for the moment, you will need a
+compiler where Typeof is natively implemented (like VC8-9-10, g++ &gt;= 4.3)<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>To play with grammars,
+we need one change compared to the plain Msm v1.x frontend; we need to make all
+actors (states, events, actions) of state machines proto terminals:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l41 level1 lfo27;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:black;
+mso-ansi-language:EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='color:black;mso-ansi-language:
+EN-US'>States need to inherit from </span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'>euml_state&lt;state&gt;</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> or be created using the
+</span><span lang=EN-US style='font-family:"Courier New";color:black;
+mso-ansi-language:EN-US'>build_state</span><span lang=EN-US style='color:black;
+mso-ansi-language:EN-US'> function (described later)<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l41 level1 lfo27;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:black;
+mso-ansi-language:EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='color:black;mso-ansi-language:
+EN-US'>Events need to inherit from </span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'>euml_event&lt;event&gt;</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l41 level1 lfo27;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:black;
+mso-ansi-language:EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='color:black;mso-ansi-language:
+EN-US'>Flags need to inherit from </span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'>euml_flag&lt;flag&gt;</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l41 level1 lfo27;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:black;
+mso-ansi-language:EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='color:black;mso-ansi-language:
+EN-US'>Action (transition, entry, exit) and guards need to inherit from </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>euml_action&lt;action&gt;</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Examples will be
+provided in the next paragraphs. The basic eUML features can be found in:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/euml.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Transition_table"></a><span lang=EN-US style='color:black;mso-ansi-language:
+EN-US'>To include STL support (at possible cost of longer compilation times),
+include also:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/stl.hpp&gt;<o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></h3>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Simple transition table<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>The previously defined
+transition table can be defined using eUML as:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_stt<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>((<span style='color:#030003'>Stopped</span>()
++ <span style='color:#030003'>play</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>Playing</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>[DummyGuard()] / (TestFct(),<span style='color:#030003'>start_playback</span>())
+,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Stopped</span>() + <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>/ <span
+style='color:#030003'>open_drawer</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Stopped</span>() + <span style='color:#030003'>stop</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>Stopped</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;
+</span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>+ <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Empty</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>/ <span style='color:#030003'>close_drawer</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;
+</span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Empty</span>()<span style='mso-spacerun:yes'>&nbsp;&nbsp;
+</span>+ <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>/ <span
+style='color:#030003'>open_drawer</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Empty</span>()<span style='mso-spacerun:yes'>&nbsp;&nbsp;
+</span>+ <span style='color:#030003'>cd_detected</span>() == <span
+style='color:#030003'>Stopped</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>[<span style='color:#030003'>good_disk_format</span>()] / <span
+style='color:#030003'>store_cd_info</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;
+</span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//<span
+style='mso-spacerun:yes'>&nbsp; </span>more rows</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp; </span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>) ) ) <span style='color:#030003'>transition_table</span>;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>UML defines guards
+between &#8220;[ ]&#8221; and actions after a &#8220;/&#8221;, so this is
+already more readable for UML designers. UML also allows designers to define
+several actions sequentially (our previous </span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>ActionSequence</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>) separated by a comma.
+The first transition does just this: 2 actions separated by a comma and
+enclosed inside parenthesis to respect C++ operator precedence.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Notice the parenthesis
+after each functor/state/event names. This is the way Typeof works: it
+evaluates the function (in this case </span><span lang=EN-US style='font-family:
+"Courier New";color:black;mso-ansi-language:EN-US'>build_stt</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>) and therefore needs
+concrete arguments, that&#8217;s why we give him default-constructed arguments,
+like states and events. And in case you ask, no constructor call actually
+happens, so there is no performance penalty.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>UML also allows
+designers to define more complicated guards, like </span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>[</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>good_disk_format
+&amp;&amp; (some_condition || some_other_condition)</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>]</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>. This was possible with
+our previously defined functors, but eUML makes it more readable, for example
+the guard becomes in eUML: </span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>[</span><span lang=EN-US style='font-size:
+10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>good_disk_format()
+&amp;&amp; (some_condition() || some_other_condition())</span><span lang=EN-US
+style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>] </span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>with </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>some_condition</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> and </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>some_other_condition</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> being functors, which
+you could define as:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>some_condition</span> : <b style='mso-bidi-font-weight:
+normal'><span style='color:#030003'>euml_action</span>&lt;<span
+style='color:#030003'> some_condition</span> &gt;</b><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+called inside a transition action</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>FSM</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>EVT</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>SourceState</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>TargetState</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>bool</span>
+<span style='color:blue'>operator</span>()(<span style='color:#030003'>FSM</span>&amp;
+,<span style='color:#030003'>EVT</span> <span style='color:blue'>const</span>&amp;
+<span style='color:#030003'>evt</span>,<span style='color:#030003'>SourceState</span>&amp;
+,<span style='color:#030003'>TargetState</span>&amp; )<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='mso-spacerun:yes'>&nbsp; </span><span style='color:green'>// whatever</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:blue'>return</span> <span style='color:blue'>true</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The only differences with our
+previous functors is that they return a bool (guards are in UML actions
+returning a bool and producing no side-effect), and they must inherit from </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>euml_action</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> in order to enable the grammar. The
+same is also necessary for events which must inherit from euml_event:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>play</span> : <b style='mso-bidi-font-weight:normal'><span
+style='color:#030003'>euml_event</span>&lt;<span style='color:#030003'>play</span>&gt;</b>{};<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Defining_a_state"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Defining
+a state with entry/exit functors<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is also possible to use the same
+action grammar with state entry and exit actions:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>euml</span>::<span
+style='color:#030003'>build_state</span>( (<span style='color:#030003'>Empty_Entry</span>(),<span
+style='color:#030003'>Dummy_Entry</span>())<span style='color:green'>/*2 entry
+actions*/</span>,<span style='color:#030003'>Empty_Exit</span>()<span
+style='color:green'>/*1 exit action*/</span> )) <span style='color:#030003'>Empty</span>;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This means that Empty is defined as
+a state with an entry action made of two sub-actions, </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Empty_Entry</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Dummy_Entry </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>(enclosed inside parenthesis), and
+an exit action, </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>Empty_Exit</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>There are several overloads of the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_state</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> function:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>(): </span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>state without entry or exit action.</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>(Expr1): </span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>state with entry but no exit action.</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>(Expr1,Expr2): </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>state with entry and exit action.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>(Expr1,Expr2,Attributes): </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>state with entry and exit action, defining some
+attributes (read further on).<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>(Expr1,Expr2,Attributes,Configure): </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>state with entry and exit action, defining some
+attributes (read further on) and flags (plain msm flags) or deferred events
+(plain msm deferred events).</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>(Expr1,Expr2,Attributes,Configure,Base):
+</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>state with entry and exit action,
+defining some attributes (read further on), flags and deferred events (plain
+msm deferred events) and a non-default base state (as defined in plain Msm).<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>A </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:
+yes'>NoAction</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'> is also defined, which does, well,
+nothing except being a placeholder (needed for example as entry action if we
+have no entry but an exit).</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Expr1</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Expr2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> are a sequence of actions, obeying
+the same action grammar as in the transition table (following the
+&#8220;/&#8221; symbol).<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The state functors have a slightly
+different signature as there is no source and target state but only a current
+state (entry/exit actions are transition-independent), for example:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>Empty_Entry</span> : <b style='mso-bidi-font-weight:normal'><span
+style='color:#030003'>euml_action</span>&lt;<span style='color:#030003'>Empty_Entry</span>&gt;</b><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:blue'>template</span> &lt;<span style='color:blue'>class</span> <span
+style='color:#030003'>Event</span>,<span style='color:blue'>class</span> <span
+style='color:#030003'>FSM</span>,<span style='color:blue'>class</span> <span
+style='color:#030003'>STATE</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b
+style='mso-bidi-font-weight:normal'><span style='color:blue'>void</span> <span
+style='color:blue'>operator</span>()(<span style='color:#030003'>Event</span> <span
+style='color:blue'>const</span>&amp;,<span style='color:#030003'>FSM</span>&amp;,<span
+style='color:#030003'>STATE</span>&amp; )<o:p></o:p></b></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>std</span>::<span style='color:#030003'>cout</span>
+&lt;&lt; <span style='color:#A31515'>&quot;entering: Empty&quot;</span>
+&lt;&lt; <span style='color:#030003'>std</span>::<span style='color:#030003'>endl</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Notice again the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>euml_action</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, to make the functor play nice with
+the grammar.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Likewise, eUML provides other
+state-building functions for other types of states:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_terminal_state </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>takes the same arguments as </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'> and defines, well, a terminate
+state.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_interrupt_state </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>takes the same arguments as </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'> and defines an interrupt state.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_exit_state </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>takes the same arguments as </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'> and defines an exit pseudo state.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_entry_state </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>takes the same arguments as </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_state</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'> and defines an interrupt state. The
+region index to be entered is defined as an int template argument, so </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_entry_state&lt;0&gt;</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'> defines an entry state into the
+first region of a submachine.</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>build_explicit_entry_state
+</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>takes the same
+arguments as </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";color:#030003;mso-ansi-language:EN-US;
+mso-no-proof:yes'>build_state</span><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'> and
+defines an explicit entry state. The region index to be entered is defined as
+an int template argument, so </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";color:#030003;mso-ansi-language:EN-US;
+mso-no-proof:yes'>build_explicit_entry_state&lt;0&gt;</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";color:#030003;mso-ansi-language:
+EN-US;mso-no-proof:yes'> defines an explicit entry state into the first region
+of a submachine.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Defining_a_state_1"></a><a name="_Defining_a_simple"></a><span
+lang=EN-US style='mso-ansi-language:EN-US'>Defining a simple state machine<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Sometimes you might want to define
+the same way a state machine on the fly (if, for example, you need to provide
+an on_entry/on_exit for this state machine as a functor). For this, there is also
+a function, </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>build_sm</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>, which has up to 8 arguments:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_sm(Stt,
+Init)</span><span lang=EN-US style='mso-ansi-language:EN-US'>: simplest state
+machine where only the transition table and initial state(s) are defined.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_sm(Stt,
+Init, Expr1)</span><span lang=EN-US style='mso-ansi-language:EN-US'>: state
+machine where the transition table, initial state and entry action are defined.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_sm(Stt,
+Init, Expr1, Expr2)</span><span lang=EN-US style='mso-ansi-language:EN-US'>:
+state machine where the transition table, initial state, entry and exit actions
+are defined.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_sm(Stt,
+Init, Expr1, Expr2, Attributes)</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>: state machine where the transition table, initial state, entry and
+exit actions are defined. Furthermore, some attributes are added (read further
+on).</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_sm(Stt,
+Init, Expr1, Expr2, Attributes, Configure)</span><span lang=EN-US
+style='mso-ansi-language:EN-US'>: state machine where the transition table,
+initial state, entry and exit actions are defined. Furthermore, some attributes
+(read further on)</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>, flags, deferred events and <a
+href="#_Customizing_a_state">configuration capabilities</a> (no message queue /
+no exception catching) </span><span lang=EN-US style='mso-ansi-language:EN-US'>are
+added.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_sm(Stt,
+Init, Expr1, Expr2, Attributes, Flags, Deferred , Base)</span><span lang=EN-US
+style='mso-ansi-language:EN-US'>: state machine where the transition table,
+initial state, entry and exit actions are defined. Furthermore, attributes
+(read further on), </span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>flags , deferred events and
+configuration capabilities (no message queue / no exception catching) </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>are added and a non-default base
+state (see base state) is defined.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>For example, a minimum state machine
+could be defined like:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//
+define transition table</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_stt</span>(<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>( <span style='mso-tab-count:1'>&nbsp;&nbsp; </span><span
+style='color:#030003'>Stopped</span>() + <span style='color:#030003'>play</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>Playing</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>/ <span style='color:#030003'>start_playback</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Stopped</span>() + <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>/ <span
+style='color:#030003'>open_drawer</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Stopped</span>() + <span style='color:#030003'>stop</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>Stopped</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp; </span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>+ <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Empty</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>/ <span style='color:#030003'>close_drawer</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;
+</span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Empty</span>()<span style='mso-spacerun:yes'>&nbsp;&nbsp;
+</span>+ <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>/ <span
+style='color:#030003'>open_drawer</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Paused</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>+ <span style='color:#030003'>open_close</span>()<span
+style='mso-spacerun:yes'>&nbsp; </span>== <span style='color:#030003'>Open</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>/ <span
+style='color:#030003'>stop_and_open</span>()<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp;
+</span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>) ) )
+<span style='color:#030003'>transition_table</span>;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//
+declare state machine</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(
+<span style='color:#030003'>transition_table</span>(),init_ &lt;&lt; <span
+style='color:#030003'>Empty</span>() )) <span style='color:#030003'>player_</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>To define more initial states (and thus more orthogonal
+regions), &#8220;shift left&#8221; some, for example, if we had another initial
+state named AllOk :<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>//
+declare state machine</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(
+<span style='color:#030003'>transition_table</span>(),init_ &lt;&lt; <span
+style='color:#030003'>Empty</span>() &lt;&lt; AllOk() )) <span
+style='color:#030003'>player_</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>This is yet another grammar allowing initial state
+definition.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><u><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>Note for VC9: <o:p></o:p></span></u></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>This defined </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:
+yes'>build_sm</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'> syntax works most of the time. But
+once in a while, VC9 will display the problem shown in the next section (not
+enough heap space). For example, this <a href="EumlSimple.cpp">simple
+performance test</a>, while really simple, will display the bug. To correct it,
+the same solution works:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>#ifndef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_MSVC<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+create a state machine &quot;on the fly&quot; for Playing. VC9 will NOT accept
+this<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>typedef</span>
+<span style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(<span
+style='mso-spacerun:yes'>&nbsp; </span><span style='color:#030003'>transition_table</span>(),init_
+&lt;&lt; <span style='color:#030003'>Empty</span>() &lt;&lt; AllOk() )) <span
+style='color:#030003'>player_</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>#else<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+but this definition is ok for VC9. But again, not for g++.<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>struct</span>
+<span style='color:#030003'>player_</span> : <span style='color:blue'>public</span>
+<span style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(<span
+style='mso-spacerun:yes'>&nbsp; </span><span style='color:#030003'>transition_table</span>(),init_
+&lt;&lt; <span style='color:#030003'>Empty</span>() &lt;&lt; AllOk() )) <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>#endif<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Defining_a_composite"></a><span lang=EN-US style='mso-ansi-language:
+EN-US'>Defining a composite state machine<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>As you probably noticed in the <a href="#_A_more_advanced">composite
+tutorial</a>, defining a composite state simply means putting a state machine
+in the transition table of another state machine. This is the same with eUML.
+One only needs define a second state machine and reference it in the transition
+table of the containing state machine.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><u><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>Note:</span></u><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> VC9 and VC10 Beta1
+seem to have a problem defining composite states inside a same compilation unit
+with eUML and you get an error after a long waiting time (</span><span
+lang=EN-US style='font-size:12.5pt;font-family:Consolas;mso-fareast-font-family:
+"Times New Roman";mso-bidi-font-family:Consolas;mso-ansi-language:EN-US'>fatal
+error C1060: compiler is out of heap space</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>).<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>To avoid this, use a simple workaround provided in the <a
+href="CompositeTutorialEuml.cpp">composite tutorial</a>. Define at least one of
+both machines this way:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>#ifndef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_MSVC<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+create a state machine &quot;on the fly&quot; for Playing. VC9 will NOT accept
+this<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>typedef</span>
+<span style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(<span
+style='mso-spacerun:yes'>&nbsp; </span><span style='color:#030003'>playing_transition_table</span>(),
+<span style='color:green'>//STT<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>init_</span> &lt;&lt; <span
+style='color:#030003'>Song1</span>() <span style='color:green'>// Init State<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>)) <span style='color:#030003'>Playing_</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>#else<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+but this definition is ok for VC9. But again, not for g++.<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>struct</span>
+<span style='color:#030003'>Playing_</span> : <span style='color:blue'>public</span>
+<span style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(<span
+style='mso-spacerun:yes'>&nbsp; </span><span style='color:#030003'>playing_transition_table</span>(),
+<span style='color:green'>//STT<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>init_</span> &lt;&lt; <span
+style='color:#030003'>Song1</span>() <span style='color:green'>// Init State<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>)) <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>#endif<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>The world of compilers is full of surprises, isn&#8217;t it?<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Anonymous_transitions_1"></a><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>Anonymous
+transitions<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>Anonymous transitions are (<a
+href="#_Anonymous_transitions">see above</a>) transitions without a named event
+which are therefore triggered immediately when the source state becomre active,
+provided a guard allows it.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>As there is no event, to define such a transition,
+simply omit the &#8220;+&#8221; part of the transition, for example:<o:p></o:p></span></p>
+
+<p style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>State3</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>() == <span
+style='color:#030003'>State4</span>() [<span style='color:#030003'>always_true</span>()]
+/ <span style='color:#030003'>State3ToState4</span>()</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Fork"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Fork<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>A fork is a direct entry into
+several regions of a composite substate. EUML also supports this by allowing
+the user to define a list of entry states separated by a comma and enclosed
+inside parenthesis, for eaxample:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>State1()<span
+style='mso-spacerun:yes'>&nbsp; </span>+ event3()<span
+style='mso-spacerun:yes'>&nbsp; </span>== (SubFsm2::direct&lt;SubState2&gt;(),
+SubFsm2::direct&lt;SubState2b&gt;(), SubFsm2::direct&lt;SubState2c&gt;())<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>Please have a look at the tutorial.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Defining_attributes"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Defining
+attributes<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We now want to make our grammar more
+useful. Very often, one needs only very simple action methods, for example </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>++Counter</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> or </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Counter &gt; 5</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> where </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Counter</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> is usually defined as some
+attribute of the class containing the state machine. <o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Unlike many expensive tools which
+one can find on the market, states within Msm are also classes so they can have
+attributes, and we would also like to provide them with attributes.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We need a way to declare attributes
+in the state (or state machine) declaration contained in </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><a
+href="#_Defining_a_state">build_state</a></span><span lang=EN-US
+style='mso-ansi-language:EN-US'> or </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>build_sm</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>. EUML provides another grammar
+(similar to the initial states grammar) to achieve this:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+(<span style='color:#030003'>Empty_Entry</span>(),<span style='color:#030003'>Dummy_Entry</span>()),(<span
+style='color:#030003'>Empty_Exit</span>()),<b style='mso-bidi-font-weight:normal'>attributes_
+&lt;&lt; int() &lt;&lt; std::map&lt;int,int&gt;() &lt;&lt; bool()</b> )) <span
+style='color:#030003'>Empty</span>;</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We now defined a state
+&#8220;Empty&#8221; containing 3 attributes:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l31 level1 lfo28;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>An int, at index 0<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l31 level1 lfo28;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>A std::map&lt;int,int&gt; at index 1<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l31 level1 lfo28;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>A bool at index 2.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Events sometimes also need some
+attributes, so the same grammar can also apply to them but needs to be called
+explicitly using the type of the </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>build_attributes</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> function. For example, the following code
+gives a </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>string</span><span lang=EN-US style='mso-ansi-language:EN-US'> and </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>DiskTypeEnum</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> attributes to an event:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef
+BOOST_TYPEOF(build_attributes</span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>(attributes_ &lt;&lt; <span style='color:#030003'>std</span>::<span
+style='color:#030003'>string()</span> &lt;&lt; <span style='color:#030003'>DiskTypeEnum()</span>
+)) cd_detected_attributes;</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>cd_detected</span> : <span style='color:#030003'>euml_event</span>&lt;<span
+style='color:#030003'>cd_detected</span>&gt;, cd_detected_attributes<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>cd_detected</span>(){}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>cd_detected</span>(<span style='color:#030003'>std</span>::<span
+style='color:#030003'>string</span> <span style='color:#030003'>name</span>, <span
+style='color:#030003'>DiskTypeEnum</span> <span style='color:#030003'>diskType</span>)<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>// initialize attributes 0 and 1</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style='color:
+#030003'>get_attributes&lt;0&gt;</span>()=<span style='color:#030003'>name</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>get_attributes&lt;1&gt;</span>()=<span style='color:#030003'>diskType</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can now reference these
+attributes in our grammar. To this aim, eUML provides several functors:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l39 level1 lfo29;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>State_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;x&gt;</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>: used in a <b style='mso-bidi-font-weight:normal'>state
+action (entry or exit)</b>, returns per reference, the x attribute of the
+state. For example, </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:
+yes'>State_</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;0&gt;() applied to the previously
+defined </span><span lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>Entry</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'> state would return an int&amp;.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l39 level1 lfo29;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Source_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;x&gt;</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>: used in a <b style='mso-bidi-font-weight:normal'>transition</b>
+action/guard, returns per reference, the x attribute of the transition source
+state. </span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l39 level1 lfo29;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Target_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;x&gt;</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>: used in a <b style='mso-bidi-font-weight:normal'>transition</b>
+action/guard, returns per reference, the x attribute of the transition target
+state. </span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l39 level1 lfo29;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>State_Attribute_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;State,x&gt;</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>: used <b style='mso-bidi-font-weight:normal'>anywhere</b>,
+returns per reference, the x attribute of the state machine&#8217;s inner </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>State</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l39 level1 lfo29;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Event_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;x&gt;</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>: used <b style='mso-bidi-font-weight:normal'>anywhere</b>,
+returns per reference, the x attribute of the event.</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l39 level1 lfo29;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>Fsm_&lt;x&gt;
+</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>: used <b style='mso-bidi-font-weight:
+normal'>anywhere</b>, per reference, the x attribute of the current state
+machine.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>EUML also provides the same functionality as functions,
+to make the whole thing more &#8220;functional&#8221;:<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>state_() used </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>in a <b style='mso-bidi-font-weight:normal'>state
+action (entry or exit)</b>, returns per reference the current state.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>source_()</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> used </span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>in a <b style='mso-bidi-font-weight:
+normal'>transition</b> action/guard, returns per reference, the transition
+source state.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>target_()</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> used </span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>in a <b style='mso-bidi-font-weight:
+normal'>transition</b> action/guard, returns per reference, the transition
+target state.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>event_()</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> used </span><b style='mso-bidi-font-weight:normal'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>anywhere</span></b><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>, returns per
+reference, the current event.</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>fsm_()</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> used </span><b style='mso-bidi-font-weight:normal'><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>anywhere</span></b><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>, returns per
+reference, the current state machine.</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>substate_(substate name() [, state machine])</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> used </span><b style='mso-bidi-font-weight:
+normal'><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>anywhere</span></b><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>, returns per reference, the given substate of the current
+state machine or of the one passed as 2<sup>nd</sup> parameter.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l11 level1 lfo30;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>attribute_(target(),index())</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> used </span><b style='mso-bidi-font-weight:
+normal'><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>anywhere</span></b><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>, returns per reference, the attribute &#8220;index&#8221; of
+&#8220;target&#8221;, target being a state, an event or a state machine.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:18.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>A few examples will help understand
+these new concepts.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:18.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Using the previous definitions of </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Empty</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>cd_detected</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Defining_flags"></a><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>State1() +
+cd_detected() == Empty() / ++Target_&lt;0&gt;()<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Will increment the int attribute of
+Empty (the target in this transition). The same can be done the functional way
+using:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>State1() +
+cd_detected() == Empty() / ++attribute_(target_() , Int_&lt;0&gt;() )<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Or even:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>State1() +
+cd_detected() == Empty() / ++attribute_(substate_(Empty()) , Int_&lt;0&gt;() )<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Which one to use is dependent on
+your personal preference. Note, however, that the function form tends to break
+compilers faster than the functor form.<o:p></o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></h3>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Defining flags<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>You remember from the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><a
+href="#_Defining_a_state">build_state</a></span><span lang=EN-US
+style='mso-ansi-language:EN-US'> and </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>build_sm</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> signatures that just after
+attributes, we can define flags, <a href="#_Using_">like in the standard Msm v1
+frontend</a>. To do this, we have a grammar very similar to the attributes
+grammar, for example:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>// state not defining any
+entry or exit<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(<span
+style='color:#030003'>NoAction</span>(),<span style='color:#030003'>NoAction</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>attributes_</span> &lt;&lt; <span
+style='color:#030003'>no_attributes_</span>,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>configure_</span>&lt;&lt; <span
+style='color:#030003'>PlayingPaused</span>() &lt;&lt; <span style='color:#030003'>CDLoaded</span>()
+)) <span style='color:#030003'>Paused</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We now defined that Paused will get
+2 flags, </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>PlayingPaused</span><span lang=EN-US style='mso-ansi-language:EN-US'>
+and </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>CDLoaded</span><span lang=EN-US style='mso-ansi-language:EN-US'>,
+defined, for example as:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>struct
+CDLoaded : euml_flag&lt;CDLoaded&gt; {};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This corresponds to the following
+standard Msm definition of Paused:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>// state not defining any
+entry or exit<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>Paused</span> : <span style='color:blue'>public</span> <span
+style='color:#030003'>msm</span>::<span style='color:#030003'>front</span>::<span
+style='color:#030003'>state</span>&lt;&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:
+normal'><span style='color:blue'>typedef</span> <span style='color:#030003'>mpl</span>::<span
+style='color:#030003'>vector2</span>&lt;<span style='color:#030003'>PlayingPaused</span>,<span
+style='color:#030003'>CDLoaded</span>&gt;<span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>flag_list</span>;</b><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This way, nobody needs to know
+metaprogramming techniques to define a state machine. Under the hood, what you
+get really is mpl::vector2.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Note</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: As we use the version of </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_state</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> with 4 arguments, we need to tell
+eUML that we need no attributes. Similarly to a &#8220;</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>cout &lt;&lt; endl</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8221;, we need a &#8220;</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>attributes_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt;&lt; <span
+style='color:#030003'>no_attributes</span></span><span lang=EN-US
+style='font-size:10.0pt;mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>_&#8221; syntax.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Defining_deferred_events"></a><span lang=EN-US style='mso-ansi-language:
+EN-US'>Defining deferred events<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>EUML also supports defining <a
+href="#_Orthogonal_States_(+Defer">deferred events</a> in the state (state
+machine) definition. To this aim, we can reuse the previous flag grammar. For
+example:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(<span
+style='color:#030003'>Empty_Entry</span>(),<span style='color:#030003'>Empty_Exit</span>(),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>attributes_</span> &lt;&lt; <span
+style='color:#030003'>no_attributes_</span>,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>configure_</span> &lt;&lt; <span
+style='color:#030003'>play</span>() )) <span style='color:#030003'>Empty</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This replaces the standard Msm
+definition:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>Empty</span> : <span style='color:blue'>public</span> <span
+style='color:#030003'>msm</span>::<span style='color:#030003'>front</span>::<span
+style='color:#030003'>state</span>&lt;&gt; <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+if the play event arrives in this state, defer it until a state handles it or<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+rejects it<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:
+normal'><span style='color:blue'>typedef</span> <span style='color:#030003'>mpl</span>::<span
+style='color:#030003'>vector</span>&lt;<span style='color:#030003'>play</span>&gt;
+<span style='color:#030003'>deferred_events</span>;<o:p></o:p></b></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+every (optional) entry/exit methods get the event passed.<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>Event</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>FSM</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>void</span>
+<span style='color:#030003'>on_entry</span>(<span style='color:#030003'>Event</span>
+<span style='color:blue'>const</span>&amp;,<span style='color:#030003'>FSM</span>&amp;
+) {<span style='color:#030003'>std</span>::<span style='color:#030003'>cout</span>
+&lt;&lt; <span style='color:#A31515'>&quot;entering: Empty&quot;</span>
+&lt;&lt; <span style='color:#030003'>std</span>::<span style='color:#030003'>endl</span>;}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>Event</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>FSM</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>void</span>
+<span style='color:#030003'>on_exit</span>(<span style='color:#030003'>Event</span>
+<span style='color:blue'>const</span>&amp;,<span style='color:#030003'>FSM</span>&amp;
+) {<span style='color:#030003'>std</span>::<span style='color:#030003'>cout</span>
+&lt;&lt; <span style='color:#A31515'>&quot;leaving: Empty&quot;</span> &lt;&lt;
+<span style='color:#030003'>std</span>::<span style='color:#030003'>endl</span>;}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>You can define flags and deferred
+events using the same grammar, so the following code is also possible:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>configure_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt;&lt; <span
+style='color:#030003'>PlayingPaused</span>() &lt;&lt; <span style='color:#030003'>CDLoaded</span>()
+&lt;&lt; <span style='color:#030003'>play</span>()</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p><span style='text-decoration:
+ none'>&nbsp;</span></o:p></span></u></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Note</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: As we use the version of </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>build_state</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> with 5 arguments, we need to tell
+eUML that we need no attributes. Similarly to a &#8220;</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>cout &lt;&lt; endl</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8221;, we need a &#8220;</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>attributes_</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'> &lt;&lt; <span style='color:#030003'>no_attributes</span></span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>_&#8221; syntax to indicate we have
+no attributes.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Customizing_a_state"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Customizing
+a state machine / getting more speed<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In the part about <a
+href="#_Getting_more_speed">getting more speed</a> we saw that Msm offers a way
+to deactivate the message queue and/or exception handling. EUML also supports
+these features reusing the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>configure_</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> grammar. To have these options activated, left-shift them into
+configure. The options are named </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>no_exception</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> and </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>no_msg_queue</span><span lang=EN-US
+style='mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Supposing we have a state machine
+defining the same deferred events and flags as the previous state, the
+configuration would become:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>configure_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt;&lt; <span
+style='color:#030003'>PlayingPaused</span>() &lt;&lt; <span style='color:#030003'>CDLoaded</span>()
+&lt;&lt; <span style='color:#030003'>play</span>() &lt;&lt; no_exception()
+&lt;&lt; no_msg_queue()</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Wrapping_it_up"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Operators<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We now have a way to access state
+and event data, define flags and deferred events, all we need is now a way to
+do something useful with them. To this aim, the grammar overloads most
+operators so that our language looks like real C++.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>For guards, we have the logical
+operators at our disposal:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l16 level1 lfo31;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>And<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l16 level1 lfo31;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Or<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l16 level1 lfo31;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Not<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l16 level1 lfo31;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Comparison: ==, &lt;=, &gt;=, &lt;,
+&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>For actions and guards, we have most
+of C++ operators at our disposal:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l9 level1 lfo32;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Pre/post increment/decrement<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l9 level1 lfo32;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>+, -, *, /, %, bitwise (&amp;,|,^)<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l9 level1 lfo32;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Subscript (for the moment, just for
+vector and map)<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l9 level1 lfo32;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Assign: =, +=, -=, *=, /=, %=,
+&lt;&lt;=, &gt;&gt;=<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l9 level1 lfo32;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>&lt;&lt;, &gt;&gt;<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l9 level1 lfo32;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Dereferencing.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'>Operators can be found in:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/operator.hpp&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/euml.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>EUML also provides flow control
+syntax:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l45 level1 lfo33;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>if_then_else_(guard,
+action, action)</span><span lang=EN-US style='mso-ansi-language:EN-US'> where
+guard respects the guard grammar and action the action sequence grammar.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l45 level1 lfo33;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>if_then_(guard,
+action)</span><span lang=EN-US style='mso-ansi-language:EN-US'> where guard
+respects the guard grammar and action the action sequence grammar.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l45 level1 lfo33;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>while_(guard,
+action)</span><span lang=EN-US style='mso-ansi-language:EN-US'> where guard
+respects the guard grammar and action the action sequence grammar.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l45 level1 lfo33;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>do_while_(guard,
+action)</span><span lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp; </span>where guard respects the guard grammar
+and action the action sequence grammar.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l45 level1 lfo33;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>for_(action,
+guard, action, action)</span><span lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp; </span>where guard respects the guard grammar
+and action the action sequence grammar.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>EUML provides functors to support
+Msm state machine functionality:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>process_(some_event()
+[, some state machine] [, some state machine] [, some state machine] [, some
+state machine])</span><span lang=EN-US style='mso-ansi-language:EN-US'> will
+call </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>process_event (some_event())</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> on the current state machine or on the one(s) passed as 2<sup>nd</sup>
+, 3<sup>rd</sup>, 4<sup>th</sup>, 5<sup>th</sup> argument. This allow sending
+events to several external machines.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>process2_(some_event(),Value
+[, some state machine] [, some state machine] [, some state machine])</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> will call </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>process_event
+(some_event(Value))</span><span lang=EN-US style='mso-ansi-language:EN-US'> on
+the current state machine or on the one(s) passed as 3<sup>rd</sup>, 4<sup>th</sup>,
+5<sup>th</sup> argument.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>is_
+flag_(some_flag()[, some state machine])</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> will call </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>is_flag_active</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> on the current state machine or on
+the one passed as 2<sup>nd</sup> argument.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Predicate_&lt;some
+predicate&gt;</span><span lang=EN-US style='mso-ansi-language:EN-US'>: Used in <a
+href="#_Adding_functional_programming">STL algorithms</a>. Wraps unary/binary
+functions to make them eUML-compatible so that they can be used in STL
+algorithms.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Basic types are also provided:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Int_&lt;int&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: 5 is not a type but </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Int_&lt;5&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> is and can be used in the action
+grammars. <o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Size_t_&lt;size_t&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: Wrapper around size_t<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Char_&lt;char&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: Wrapper around char<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>String_&lt;mpl::string&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: Wrapper around std::string. Needs
+Boost &gt;= 1.40. You can then define a string in an action, for example
+String_&lt;mpl::string&lt;&#8217;Hell&#8217;,&#8217;o
+wo&#8217;,&#8217;rld&#8217;&gt; &gt;(). Please refer to the <a
+href="http://www.boost.org/doc/libs/1_40_0/libs/mpl/doc/refmanual/string.html">MPL
+documentation</a>. This is the one case where you will see some Metaprogramming.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l3 level1 lfo34;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>True_</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>False_</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>You can therefore pretty much put
+whatever you want as action and guard, as long as the operators are supported
+and that you respect the grammar:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l47 level1 lfo35;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Guards are not a sequence and must
+return a bool.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l47 level1 lfo35;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Actions can be sequences, separated
+by commas and return nothing.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Some examples will help understand
+all this:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l27 level1 lfo36;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>[(<span
+style='color:#030003'>Event_</span>&lt;1&gt;()==<span style='color:#030003'>
+Int_</span>&lt;<span style='color:#030003'>DISK_CD</span>&gt;())] </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>is a guard returning true if the second event attribute
+is DISK_CD</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l27 level1 lfo36;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>[(attribute_(<span
+style='color:#030003'>event_(),Int_</span>&lt;1&gt;())==<span style='color:
+#030003'> Int_</span>&lt;<span style='color:#030003'>DISK_CD</span>&gt;())] </span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>means the same</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l27 level1 lfo36;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>[(if_then_else_(
+True_(),Guard1(),Guard2()))] </span><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>is a guard
+returning the result of calling </span><span lang=EN-US style='font-family:
+"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>Guard1</span><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> (True_ will, well,
+return true).</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l27 level1 lfo36;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>/(store_cd_info(),process_(play()))</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>is a transition action calling the user-defined functor
+</span><span lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>store_cd_info</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'> and then immediately process the event </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>play</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>.</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l27 level1 lfo36;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-size:10.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>(for(NoAction(),Current_&lt;1&gt;()[
+Int_&lt;0&gt;()]&lt;=
+Int_&lt;5&gt;(),(++Current_&lt;1&gt;()[Int_&lt;0&gt;()],++Current_&lt;0&gt;()),
+Current_&lt;0&gt;()+= Int_&lt;3&gt;() )) </span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>is a contrived expression, used in an entry (as </span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>Current_</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'> is used) and meaning: for(; second attribute[0] &lt;= 5;
+(++second attribute[0],++first attribute);first attribute +=3 )</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Note</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: do not forget the () after every functor, as
+we need to evaluate the expression and thus pretend to create a functor object.
+<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Notice that we have lots of operators,
+functors and functions like </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>build_stt</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> but all is compile-time, there is no run-time penalty as the code is
+not really called but simply evaluated. Now try to do this with your local
+javac compiler&#8230;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The following table lists the
+operators and basic functors supported:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:5'><b><span lang=EN style='color:white;mso-themecolor:background1;
+ mso-ansi-language:EN'>eUML function / operator<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:1'><b><span lang=EN style='color:white;mso-themecolor:background1;
+ mso-ansi-language:EN'>Description<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:1'><b><span lang=EN style='color:white;mso-themecolor:background1;
+ mso-ansi-language:EN'>Example<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:1'><b><span lang=EN style='color:white;mso-themecolor:background1;
+ mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>&amp;&amp;<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1&amp;&amp; Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1()
+ &amp;&amp; Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>And_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border-top:none;border-left:
+ solid #4F81BD 1.0pt;mso-border-left-themecolor:accent1;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>||<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1|| Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() || Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:none;border-left:
+ none;border-bottom:solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Or_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border-top:none;border-left:
+ solid #4F81BD 1.0pt;mso-border-left-themecolor:accent1;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;mso-border-top-alt:
+ solid #4F81BD 1.0pt;mso-border-top-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>!<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;mso-border-top-alt:
+ solid #4F81BD 1.0pt;mso-border-top-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ !Action1<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;mso-border-top-alt:
+ solid #4F81BD 1.0pt;mso-border-top-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>!Action1()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:none;border-left:
+ none;border-bottom:solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ mso-border-top-alt:solid #4F81BD 1.0pt;mso-border-top-themecolor:accent1;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Not_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>!=<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 != Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() != Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>NotEqualTo_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>==<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 == Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() ==
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>EqualTo_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>&gt;<o:p>&nbsp;</o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 &gt; Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() &gt; Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Greater_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>&gt;=<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 &gt;= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() &gt;=
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Greater_Equal_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>&lt;<o:p>&nbsp;</o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 &lt; Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() &lt; Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Less_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>&lt;=<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 &lt;= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() &lt;=
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Less_Equal_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>&amp; (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 &amp; Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() &amp; Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Bitwise_And_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>| (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 | Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() |
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Bitwise_Or_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>^ (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 ^ Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() ^ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Bitwise_Xor_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>-- (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ --Action1 / Action1--.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>--Action1()
+ (predecrement)<o:p></o:p></span></p>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1()--
+ (postdecrement)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Pre_Dec_<o:p></o:p></span></p>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Post_Dec_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>++ (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily ++Action1 / Action1++<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>++Action1() (preincrement)<o:p></o:p></span></p>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1++ (postincrement)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Pre_Inc_<o:p></o:p></span></p>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Post_Inc_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:14'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>/ (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 / Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() /
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Divides_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:15'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>/= (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 /= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() /= Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Divides_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:16'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>* (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 * Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() *
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Multiplies_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:17'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>*= (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 *= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() *= Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Multiplies_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:18'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>+ (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 + Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() +
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Plus_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:19'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>+<span
+ style='mso-spacerun:yes'>&nbsp; </span>(unary)<span
+ style='mso-spacerun:yes'>&nbsp; </span>(see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily +Action1<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>+Action1()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Unary_Plus_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:20'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>+= (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 += Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() +=
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Plus_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:21'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>-<span
+ style='mso-spacerun:yes'>&nbsp; </span>(binary)<span
+ style='mso-spacerun:yes'>&nbsp; </span>(see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 - Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() - Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Minus_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:22'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>-<span
+ style='mso-spacerun:yes'>&nbsp; </span>(unary) (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ -Action1<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>-Action1()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Unary_Minus_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:23'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>-= (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 -= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() -= Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Minus_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:24'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>% (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 % Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1() %
+ Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Modulus_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:25'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>%= (see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 %= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() %= Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Modulus_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:26'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>&gt;&gt; (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 &gt;&gt; Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1()
+ &gt;&gt; Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>ShiftRight_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:27'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>&gt;&gt;= (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 &gt;&gt;= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() &gt;&gt;= Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>ShiftRight_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:28'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>&lt;&lt; (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 &lt;&lt; Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1()
+ &lt;&lt; Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>ShiftLeft_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:29'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>&lt;&lt;= (see
+ below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls lazily Action1 &lt;&lt;= Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Action1() &lt;&lt;= Action2()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>ShiftLeft_Assign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:30'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>[] </span></b><span
+ lang=EN style='mso-ansi-language:EN;mso-bidi-font-weight:bold'>(works on vector,
+ map, arrays)<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls lazily
+ Action1 [Action2]<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Action1()
+ [Action2()]<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Subscript_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:31'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>if_then_else_(Condition,Action1,Action2)<o:p></o:p></span></b></p>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>(see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns either the result of calling
+ Action1 or the result of calling Action2<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>if_then_else_(Condition1(),++Source_&lt;0&gt;(),<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'><span
+ style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ </span>--Source_&lt;0&gt;())<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>[if_then_else_(Condition1(),True_(), False())]<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>If_Else_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:32'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>if_then_(Condition,Action)<o:p></o:p></span></b></p>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>(see below)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ result of calling Action<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'></td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>If_Then_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:33'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>while_(Condition,
+ Body)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>While Condition(), calls Body(). Returns
+ nothing.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>while_(Source_&lt;0&gt;() &lt;=
+ Int_&lt;5&gt;(),<span
+ style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ </span>++Source_&lt;0&gt;())<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>While_Do_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:34'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>do_while(Condition,
+ Body)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls Body()
+ while Condition(). Returns nothing.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>do_while_(Source_&lt;0&gt;()
+ &lt;= Int_&lt;5&gt;(),<span
+ style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ </span>++Source_&lt;0&gt;())<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>Do_While_</span><span
+ lang=EN-US style='font-size:10.0pt;mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'><o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:35'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>for_(Begin,Stop,EndLoop,Body)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Calls
+ for(Begin();Stop();EndLoop()){Body();}<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>for_(Source_&lt;0&gt;()=Int_&lt;0&gt;(),Source_&lt;0&gt;()
+ &lt;= Int_&lt;5&gt;(), ++Source_&lt;0&gt;(),Action1())<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>For_Loop_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:36'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>Event_&lt;some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ some_int attribute of the currently processed event.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>[Source_&lt;0&gt;() ==
+ Event_&lt;1&gt;()]<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Event_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:37'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>Source_&lt;some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns the some_int attribute of the
+ source state from the currently triggered transition.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>++Source_&lt;0&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Source_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:38'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>Target_&lt;some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ some_int attribute of the target state from the currently triggered
+ transition.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>++Target_&lt;0&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Target_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:39'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>State_&lt;some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns the some_int attribute of the current
+ state (valid inside an entry/exit state action).<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>++State_&lt;0&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>State_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:40'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>State_attribute_&lt;state,
+ some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ some_int attribute of the given state from the current state machine.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>++State_Attribute_&lt;Empty,0&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>State_Attribute_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:41'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>Fsm_&lt;some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns the some_int attribute of the
+ current state machine (valid inside an entry/exit state action or a
+ transition).<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>++Fsm_&lt;0&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Fsm_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:42'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span style='mso-fareast-font-family:
+ "Times New Roman"'>Int_&lt;some_int&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Wrappers around
+ the value some_int<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>Int_&lt;5&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Int_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:43'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span style='mso-fareast-font-family:
+ "Times New Roman"'>Size_t_&lt;some_size&gt;()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Wrappers around the value some_size<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>Size_t_&lt;5&gt;()<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Size_t_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:44'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span style='mso-fareast-font-family:
+ "Times New Roman"'>True_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Creates a
+ functor always returning true.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>[if_then_else_(Condition1(),True_(),
+ False())]<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>True_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:45'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>False_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Creates a functor always returning
+ false.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>[if_then_else_(Condition1(),True_(), False())]<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>False_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:46'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>process_(Event
+ [,fsm1] [,fsm2] [,fsm3] [,fsm4])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Processes Event
+ on the current state machine (if no fsm specified) or on up to 4 state
+ machines returned by an appropriate functor.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>process_(play()) // current fsm<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>process_(play(),fsm_()) // current
+ fsm<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>process_(play(), fsm1(),fsm2()) // 2
+ state machines<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>Process_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:47'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>process2_(Event,
+ Data [,fsm1] [,fsm2] [,fsm3])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Processes Event on the current state
+ machine (if no fsm specified) or on up to 2 state machines returned by an
+ appropriate functor. The event is copy-constructed from what Data() returns.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>process2_(play(), Event_&lt;1&gt;()) // current fsm<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>process2_(play(), Event_&lt;1&gt;(), fsm_()) // current<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>process2_(play(), Event_&lt;1&gt;(), fsm1(),fsm2()) //
+ 2 state machines<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>Process2_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:48'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>is_flag_(Flag
+ [,fsm])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Calls
+ is_flag_active() on the current state machine or the one returned by calling
+ fsm()<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>is_flag_(CDLoaded()) // current fsm<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>is_flag_(CDLoaded(),fsm_()) //
+ current fsm<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>is_flag_(CDLoaded(), some_fsm()) //
+ another fsm<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>Get_Flag_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:49'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>attribute_(Target,
+ Index)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns the attribute at index Index
+ from Target<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>clear_(attribute_(fsm_(), Int_&lt;0&gt;()))<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>Calls clear() on the first attribute of the current fsm
+ (probably a STL container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span style='mso-fareast-font-family:"Times New Roman"'>GetAttribute_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:50'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>event_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ current event (as const reference)<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>[attribute_(event_(),Int_&lt;0&gt;())
+ &gt; 0]<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>Guard evaluating to true if the first
+ attribute of the current event is &gt; 0<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>GetEvent_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:51'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>source_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns the source state of the
+ currently triggered transition (as reference)<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>[attribute_(source_(),Int_&lt;0&gt;()) &gt; 0]<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>Guard evaluating to true if the first attribute of the
+ source state is &gt; 0<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>GetSource_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:52'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>target_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ target state of the currently triggered transition (as reference)<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>[attribute_(target_(),Int_&lt;0&gt;())
+ &gt; 0]<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>Guard evaluating to true if the first
+ attribute of the target state is &gt; 0<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>GetTarget_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:53'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>state_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns the source state of the
+ currently active state (as reference). Valid inside a state entry/exit
+ action.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>++attribute_(state_(),Int_&lt;0&gt;())<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN'>Preincrements the first attribute of the current state<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>GetState_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:54'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:68'><b><span lang=EN style='mso-ansi-language:EN'>fsm_()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:EN'>Returns the
+ current state machine (as reference). Valid inside a state entry/exit action
+ or a transition.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>++attribute_(fsm_(),Int_&lt;0&gt;())<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN'>Preincrements the first attribute of
+ the current state machine<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'>GetFsm_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:55;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:none;border-left:
+ solid #4F81BD 1.0pt;mso-border-left-themecolor:accent1;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+ mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:EN'>substate_(state_name
+ [,fsm])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+ lang=EN style='mso-ansi-language:EN'>Returns (as reference) the state
+ state_name referenced in the current state machine or the one given as
+ argument.<o:p></o:p></span></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>++attribute_(substate_(Empty())</span><span lang=EN
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN'>,Int_&lt;0&gt;()</span><span
+ lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+ EN-US'>) // current fsm <o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>++attribute_(substate_(Empty(),fsm_())</span><span
+ lang=EN style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+ EN'>,Int_&lt;0&gt;()</span><span lang=EN-US style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN-US'>) // same<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>++attribute_(substate_(Empty(),some_fsm())</span><span
+ lang=EN style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+ EN'>,Int_&lt;0&gt;()</span><span lang=EN-US style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN-US'>) // preincrements the first
+ attribute of Empty from another state machine.<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:none;border-left:
+ none;border-bottom:solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'>SubState_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Note on if_then_ / if_then_else_and
+functors used with operators returning a value:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The default return value of these
+functions is a bool to allow easier guard writing. If your functor needs to
+return something else, you will need to indicate this, for example, NoAction
+(doing nothing) is defined as:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>NoAction</span> : <span style='color:#030003'>euml_action</span>&lt;<span
+style='color:#030003'>NoAction</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+return value if used inside a state action (entry/exit)<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>Event</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>FSM</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>STATE</span> &gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>struct</span>
+<span style='color:#030003'>state_action_result</span> <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:blue'>typedef</span> <span style='color:blue'>bool</span> <span
+style='color:#030003'>type</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+return value if used inside a transition (action/guard)<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>EVT</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>FSM</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>SourceState</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>TargetState</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>struct</span>
+<span style='color:#030003'>transition_action_result</span> <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:blue'>typedef</span> <span style='color:blue'>bool</span> <span
+style='color:#030003'>type</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>};<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+this functor can be used in both modes, state action and transition action<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>typedef</span>
+::<span style='color:#030003'>boost</span>::<span style='color:#030003'>mpl</span>::<span
+style='color:#030003'>set</span>&lt;<span style='color:#030003'>state_action_tag</span>,<span
+style='color:#030003'>action_tag</span>&gt; <span style='color:#030003'>tag_type</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+state action<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>Event</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>FSM</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>STATE</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>bool</span>
+<span style='color:blue'>operator</span>()(<span style='color:#030003'>Event</span>
+<span style='color:blue'>const</span>&amp;,<span style='color:#030003'>FSM</span>&amp;,<span
+style='color:#030003'>STATE</span>&amp; )<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>// does nothing<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:blue'>return</span> <span style='color:blue'>true</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:green'>//
+transition action<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>template</span>
+&lt;<span style='color:blue'>class</span> <span style='color:#030003'>EVT</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>FSM</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>SourceState</span>,<span
+style='color:blue'>class</span> <span style='color:#030003'>TargetState</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>bool</span>
+<span style='color:blue'>operator</span>()(<span style='color:#030003'>EVT</span>
+<span style='color:blue'>const</span>&amp; <span style='color:#030003'>evt</span>
+,<span style='color:#030003'>FSM</span>&amp; ,<span style='color:#030003'>SourceState</span>&amp;
+,<span style='color:#030003'>TargetState</span>&amp;)<span style='color:blue'>const<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>// does nothing<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:blue'>return</span> <span style='color:blue'>true</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Your functors will usually not need
+this. You will only need these extra declarations if your functors are to be
+used in combination with eUML functions (if_then_else_ , STL algorithms) or
+operators returning a value (++, +=, etc.). If you simply need simple guards
+/actions like [Condition1() &amp;&amp; Condition2()] / (Action1(),Action2()),
+you do not need to declare the return type.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This declaration is not very nice
+and you might want to have a look at a much easier way
+to build eUML functors.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Adding_STL_support"></a><a name="_Adding_functional_programming"></a><span
+lang=EN-US style='mso-ansi-language:EN-US'>Adding functional programming and
+boost::phoenix-like STL support<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>All objects do not use only standard
+C++ operators. Soon, we will also need more complex code in our actions.
+Therefore, eUML comes in with a lot of functors to simplify your day-to-day
+programming. For almost every algorithm or container method of the STL, a
+corresponding eUML function is defined. Like boost::phoenix, &#8220;.&#8221;
+And &#8220;-&gt;&#8221; of call on objects are replaced by a functional
+programming paradigm, for example:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>begin_(container),
+end_(container): returns iterators of a container.<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>empty_(container):
+returns container.empty()<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>clear_(container):
+container.clear()<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>transform_
+: std::transform<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In a nutshell, almost every STL
+method or algorithm is matched by a corresponding functor, which can then be
+used in the transition table or state actions. The following tables explain in
+detail the possible argument combination and the underlying functor, so that
+this possibility is not reserved to eUML but also to the functor-based
+front-end previously explained.<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The file structure of this
+Phoenix-like library matches the one of Boost.Phoenix:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>All STL functors are to be found in:<i
+style='mso-bidi-font-style:normal'><o:p></o:p></i></span></p>
+
+<p class=MsoNormal style='margin-top:0cm;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:9.0pt;mso-bidi-font-size:12.0pt;font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";color:black;mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='margin-top:0cm;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include
+&lt;msm/front/euml/algorithm.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The algorithms are also divided into
+sub-headers, matching the phoenix structure for simplicity:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='margin-top:0cm;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/iteration.hpp&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/transformation.hpp&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/querying.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'>Container methods can be found in:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt; msm/front/euml/container.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'>Or one can simply include the whole STL
+support (you will also need to include euml.hpp):<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-top:12.0pt;margin-right:36.45pt;margin-bottom:
+0cm;margin-left:36.45pt;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='font-size:11.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:black;mso-ansi-language:EN'>#include &lt;
+msm/front/euml/stl.hpp&gt;<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'>The following tables illustrate the
+supported algorithms and container methods:<o:p></o:p></span></p>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>STL functions in
+ iteration.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>for_each(first, last, unary op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>for_each_(first,last, unary op</span><span lang=EN style='mso-ascii-font-family:
+ "Times New Roman";mso-ascii-theme-font:minor-fareast;mso-hansi-font-family:
+ "Times New Roman";mso-hansi-theme-font:minor-fareast;mso-bidi-font-family:
+ "Times New Roman";mso-bidi-theme-font:minor-fareast;mso-ansi-language:EN'>&#7491;</span><span
+ lang=EN style='mso-ansi-language:EN'>)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ForEach_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:none;border-left:
+ solid #4F81BD 1.0pt;mso-border-left-themecolor:accent1;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>accumulate(first, last, init [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>accumulate_(first,
+ last, init [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:none;border-left:
+ none;border-bottom:solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Accumulate_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>STL functions in
+ querying.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>find(first, last, value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>find_(first, last, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Find_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>find_if(first, last, value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>find_if_(first,
+ last, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>FindIf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>lower_bound(first, last, value[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>lower_bound_(first, last, value [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>LowerBound_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>upper_bound(first, last, value[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>upper_bound_(first,
+ last, value [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>UpperBound_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>equal_range(first, last, value[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>equal_range _(first, last, value [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>EqualRange_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>binary_search(first, last, value[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>binary_search_(first,
+ last, value [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>BinarySearch_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>min_element(first, last[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>min_element_(first, last[,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>MinElement_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>max_element(first, last[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>max_element_(first,
+ last[,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>MaxElement_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>adjacent_find(first, last[,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>adjacent_find _(first, last[,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>AdjacentFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>find_end(first1, last1, first2, last2 [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>find_end_(
+ first1, last1, first2, last2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>FindEnd_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>find_first_of(first1, last1, first2, last2
+ [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>find_first_of_( first1, last1, first2, last2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>FindFirstOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>equal(first1, last1, first2 [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>equal_( first1,
+ last1, first2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Equal_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>search(first1, last1, first2, last2 [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>search_( first1, last1, first2, last2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Search_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>includes(first1, last1, first2, last2 [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>includes_(
+ first1, last1, first2, last2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Includes_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:14'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>lexicographical_compare<o:p></o:p></span></b></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>(first1, last1, first2, last2 [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>lexicographical_compare_<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>( first1, last1, first2, last2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>LexicographicalCompare_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:15'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>count(first, last, value[,size])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>count_(first,
+ last, value [,size])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Count_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:16'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>count_if(first, last, op[,size])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>count_if_(first, last, op &#7491; [,size])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>CountIf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:17'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>distance(first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>distance_(first,
+ last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Distance_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:18;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>mismatch(first1, last1, first2 [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>mismatch _( first1, last1, first2 [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Mismatch_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>STL functions in
+ transformation.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>copy(first, last, result)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>copy_(first, last, result)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Copy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>copy_backward(first, last, result)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>copy_backward_(first,
+ last, result)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>CopyBackward_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>reverse(first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>reverse_(first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Reverse_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>reverse_copy(first, last,result)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>reverse_copy_(first,
+ last , result)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Reverse Copy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>remove(first, last, value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>remove_(first, last, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Remove_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>remove_if(first, last , op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>remove_if_(first,
+ last , op&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>RemoveIf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>remove_copy(first, last , output, value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>remove_copy_(first, last , output, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>RemoveCopy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>remove_copy_if(first, last, output, op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>remove_copy_if_(first,
+ last, output, op&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>RemoveCopy If_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>fill(first, last, value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>fill_(first, last, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Fill_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>fill_n(first, size, value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>fill_n_(first,
+ size, value)&#7495;<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>FillN_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>generate(first, last, generator)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>generate_(first, last, generator&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Generate_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>generate_n(first, size, generator)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>generate_(first,
+ size, generator&#7491;)&#7495;<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>GenerateN_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>unique(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>unique_(first, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Unique_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>unique_copy(first, last, output [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>unique_copy_(first,
+ last, output [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>UniqueCopy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:14'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>random_shuffle(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>random_shuffle_(first, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>RandomShuffle_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:15'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>rotate_copy(first, middle, last, output)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>rotate_copy_(first,
+ middle, last, output)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>RotateCopy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:16'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>partition (first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>partition_ (first, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Partition_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:17'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>stable_partition (first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>stable_partition_
+ (first, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StablePartition_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:18'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>stable_sort(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>stable_sort_(first, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StableSort_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:19'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>sort(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>sort_(first,
+ last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Sort_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:20'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>partial_sort(first, middle, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>partial_sort_(first, middle, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>PartialSort_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:21'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>partial_sort_copy<o:p></o:p></span></b></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>(first, last, res_first, res_last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>partial_sort_copy_<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>(first, last,
+ res_first, res_last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>PartialSortCopy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:22'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>nth_element(first, nth, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>nth_element_(first, nth, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>NthElement_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:23;height:23.35pt'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt;height:23.35pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>merge(first1, last1, first2, last2, output [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt;
+ height:23.35pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>merge_( first1,
+ last1, first2, last2, output [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt;height:23.35pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Merge_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:24'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>inplace_merge(first, middle, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>inplace_merge_(first, middle, last [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>InplaceMerge_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:25'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>set_union(first1, last1, first2, last2, output [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>set_union_(first1,
+ last1, first2, last2, output [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>SetUnion_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:26'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>push_heap(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>push_heap_(first, last [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>PushHeap_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:27'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>pop_heap(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>pop_heap_(first,
+ last [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>PopHeap_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:28'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>make_heap(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>make_heap_(first, last [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>MakeHeap_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:29'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>sort_heap(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>sort_heap_(first,
+ last [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>SortHeap_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:30'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>next_permutation(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>next_permutation_(first, last [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>NextPermutation_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:31'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>prev_permutation(first, last [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>prev_permutation_(first,
+ last [,op &#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>PrevPermutation_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:32'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>inner_product(first1, last1, first2, init <o:p></o:p></span></b></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>[,op1] [,op2])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>inner_product_(first1, last1, first2, init <o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>[,op1&#7491;] [,op2&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>InnerProduct_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:33'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>partial_sum(first, last, output [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>partial_sum_(first,
+ last, output [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>PartialSum_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:34'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>adjacent_difference(first, last, output [,op])<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>adjacent_difference_(first, last, output [,op&#7491;])<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>AdjacentDifference_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:35'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>replace(first, last, old_value, new_value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>replace_(first,
+ last, old_value, new_value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Replace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:36'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>replace_if(first, last, op, new_value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>replace_if_(first, last, op&#7491;, new_value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ReplaceIf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:37'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>replace_copy(first, last, result, old_value, new_value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>replace_copy_(first,
+ last, result, old_value, new_value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>ReplaceCopy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:38'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>replace_copy_if(first, last, result, op,
+ new_value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>replace_copy_if_(first, last, result, op&#7491;, new_value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ReplaceCopyIf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:39;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:none;border-left:
+ solid #4F81BD 1.0pt;mso-border-left-themecolor:accent1;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>rotate(first, middle, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>rotate_(first, middle,
+ last)&#7495;<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:none;border-left:
+ none;border-bottom:solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Rotate_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Some_Examples_with"></a><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>STL container
+ methods(common) in container.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>front<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>container::reference front_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Front_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>back<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>container::reference
+ back_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Back_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>begin<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>container::iterator begin_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Begin_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>end<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>container::iterator
+ end_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>End_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>rbegin<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>container::reverse_iterator rbegin_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>RBegin_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>rend<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>container::reverse_iterator
+ rend_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>REnd_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>push_back<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void push_back_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Push_Back_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>pop_back<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ pop_back_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Pop_Back_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>push_front<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void push_front_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Push_Front_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>pop_front<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ pop_front_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Pop_Front_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>clear<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void clear_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Clear_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>capacity<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ capacity_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Capacity_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type size_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Size_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>max_size<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ max_size_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Max_Size_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:14'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>reserve<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void reserve_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Reserve _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:15'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>resize<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ resize_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Resize _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:16'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>iterator insert(pos, const T&amp; value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>iterator insert_(container, pos, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Insert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:17'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>void insert(pos, first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void insert_(
+ container , pos, first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Insert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:18'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>void insert(pos, number ,<span
+ style='mso-spacerun:yes'>&nbsp; </span>const T&amp; value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void insert_( container , pos, number, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Insert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:19'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>void swap(other_container&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void swap_(
+ container , other_container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Swap_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:20'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>iterator erase(pos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void erase_( container , pos)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Erase_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:21'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>iterator erase(first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void erase_(
+ container , first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Erase_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:22;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>bool empty<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>bool empty_( container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Empty_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>std::list methods in
+ container.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>remove (const T&amp; value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void list_remove_(container, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ListRemove_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>remove_if (op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ list_remove_if_(container, op&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>ListRemove_If_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>merge(list&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void list_merge_(container, other_list)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ListMerge_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>merge(list&amp;, op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ list_merge_(container, other_list, op&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>ListMerge_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>splice(iterator, list&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void splice_(container, iterator, other_list)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Splice_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>splice(iterator, list&amp;, iterator)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ splice_(container, iterator, other_list, iterator)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Splice_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>splice(iterator, list&amp;, first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void splice_(container, iterator, other_list, first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Splice_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>reverse<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ list_reverse_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>ListReverse_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>unique<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void list_unique_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ListUnique_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>unique(op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ list_unique_(container, op&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>ListUnique_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>sort<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void list_sort_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>ListSort_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:none;border-left:
+ solid #4F81BD 1.0pt;mso-border-left-themecolor:accent1;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>sort(op)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-bottom:
+ solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void
+ list_sort_(container, op&#7491;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:none;border-left:
+ none;border-bottom:solid #4F81BD 1.0pt;mso-border-bottom-themecolor:accent1;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>ListSort _<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Associative container
+ methods in container.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>iterator insert(pos, const T&amp; value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>iterator insert_(container, pos, value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Insert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>void insert(first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void insert_(
+ container , first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Insert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>pair&lt;iterator, bool&gt; insert(const T&amp;
+ value)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>pair&lt;iterator, bool&gt; insert_( container , value)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Insert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>void erase(pos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>void associative_erase_(
+ container , pos)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Associative_Erase_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>void erase(first, last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>void associative_erase_( container , first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Associative_Erase_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type erase(const key_type&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ associative_erase_( container , key)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Associative_Erase_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>iterator find(const key_type&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>iterator associative_find_( container , key)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Associative_Find_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type count(const key_type&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ associative_count_( container , key)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>AssociativeCount_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>iterator lower_bound(const key_type&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>iterator associative_lower_bound_( container , key)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Associative_Lower_Bound_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>iterator upper_bound(const key_type&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>iterator
+ associative_upper_bound_( container , key)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Associative_Upper_Bound_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>pair&lt;iterator, iterator&gt; equal_range(const
+ key_type&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>pair&lt;iterator, iterator&gt; associative_equal_range_( container , key)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Associative_Equal_Range_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>std::pair in
+ container.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>first<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>first_type first_(pair&lt;T1, T2&gt;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>First_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>second<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>second_type
+ second_(pair&lt;T1, T2&gt;)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Second_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<table class=MsoTableLightListAccent1 border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none;mso-border-alt:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
+ <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:solid #4F81BD 1.0pt;mso-border-left-themecolor:
+ accent1;border-bottom:none;border-right:none;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:5'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>std::string method in
+ container.hpp<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;background:#4F81BD;mso-background-themecolor:
+ accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>eUML function<o:p></o:p></span></b></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:none;
+ border-right:solid #4F81BD 1.0pt;mso-border-right-themecolor:accent1;
+ background:#4F81BD;mso-background-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:1'><b><span lang=EN style='color:
+ white;mso-themecolor:background1;mso-ansi-language:EN'>Functor<o:p></o:p></span></b></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:0'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>substr (size_type<span
+ style='mso-spacerun:yes'>&nbsp; </span>pos, size_type size)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string substr_(container, pos, length)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Substr_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:1'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>int compare(string)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>int string_compare_(container,
+ another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringCompare_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:2'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>int compare(char*)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>int string_compare_(container, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringCompare_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:3'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>int compare(size_type<span style='mso-spacerun:yes'>&nbsp; </span>pos,
+ size_type size, string)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>int
+ string_compare_(container, pos, size,<span style='mso-spacerun:yes'>&nbsp;
+ </span>another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringCompare_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:4'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>int compare (size_type<span
+ style='mso-spacerun:yes'>&nbsp; </span>pos, size_type size, string, size_type
+ length)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>int string_compare_(container, pos, size,<span
+ style='mso-spacerun:yes'>&nbsp; </span>another_string, length)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringCompare_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:5'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; append(const string&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp; append_(container,
+ another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Append_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:6'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; append (charT*)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; append_(container, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Append _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:7'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; append (string , size_type<span
+ style='mso-spacerun:yes'>&nbsp; </span>pos, size_type size)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ append_(container, other_string, pos, size)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Append _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:8'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; append (charT*, size_type size)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; append_(container, another_string, length)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Append _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:9'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; append (size_type size, charT)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ append_(container, size,<span style='mso-spacerun:yes'>&nbsp; </span>char)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>Append _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:10'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; append (iterator begin, iterator
+ end)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; append_(container, begin, end)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>Append _<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:11'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; insert (size_type pos, charT*)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_insert_(container, pos, other_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringInsert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:12'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; insert(size_type pos,
+ charT*,size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_insert_(container, pos, other_string, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringInsert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:13'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; insert(size_type pos,size_type n, charT c)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_insert_(container, pos, n, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringInsert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:14'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; insert (size_type pos, const
+ string&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_insert_(container, pos, other_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringInsert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:15'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; insert (size_type pos, const string&amp;, size_type pos1,
+ size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_insert_(container, pos, other_string, pos1, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringInsert_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:16'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; erase(size_type pos=0, size_type
+ n=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_erase_(container, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringErase_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:17'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; assign(const string&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_assign_(container, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringAssign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:18'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; assign(const charT*)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_assign_(container, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringAssign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:19'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; assign(const string&amp;, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_assign_(container, another_string, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringAssign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:20'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; assign(const charT*, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_assign_(container, another_string, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringAssign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:21'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; assign(size_type n, charT c)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_assign_(container, n, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringAssign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:22'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; assign(iterator first, iterator
+ last)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_assign_(container, first, last)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringAssign_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:23'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; replace(size_type pos, size_type n, const string&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_replace_(container, pos, n, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:24'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; replace(size_type pos, size_type n,
+ const charT*, size_type n1)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_replace_(container, pos, n, another_string, n1)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:25'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; replace(size_type pos, size_type n, const charT*)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_replace_(container, pos, n, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:26'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; replace(size_type pos, size_type n,
+ size_type n1, charT c)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_replace_(container, pos, n, n1, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:27'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; replace(iterator first, iterator last, const string&amp;)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_replace_(container, first, last, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:28'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; replace(iterator first, iterator
+ last, const charT*, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_replace_(container, first, last, another_string, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:29'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; replace(iterator first, iterator last, const charT*)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp; string_replace_(container,
+ first, last, another_string)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:30'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>string&amp; replace(iterator first, iterator
+ last, size_type n, charT c)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; string_replace_(container, first, last, n, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:31'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>string&amp; replace(iterator first, iterator last, iterator f, iterator
+ l)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>string&amp;
+ string_replace_(container, first, last, f, l)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringReplace_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:32'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>const charT* c_str()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>const charT* c_str_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>CStr_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:33'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>const charT* data()<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>const charT* string_data_(container)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringData_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:34'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type copy(charT* buf, size_type n,
+ size_type pos = 0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_copy_(container, buf, n, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_copy_(container, buf, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringCopy_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:35'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find(charT* s, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ string_find_(container, s, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:36'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find(charT* s, size_type pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_find_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_find_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:37'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find(const string&amp; s, size_type pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ string_find_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ string_find_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:38'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find(charT c, size_type pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_find_(container, c, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_find_(container, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:39'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type rfind(charT* s, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ string_rfind_(container, s, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringRFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:40'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type rfind(charT* s, size_type pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_rfind_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_rfind_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringRFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:41'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type rfind(const string&amp; s, size_type pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ string_rfind_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ string_rfind_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringRFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:42'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type rfind(charT c, size_type pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_rfind_(container, c, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type string_rfind_(container, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringRFind_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:43'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_of(charT* s, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_first_of_(container, s, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindFirstOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:44'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_first_of (charT* s, size_type
+ pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindFirstOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:45'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_of (const string&amp; s, size_type pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type find_first_of_(container,
+ s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_first_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindFirstOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:46'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_first_of (charT c, size_type
+ pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_of_(container, c, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_of_(container, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindFirstOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:47'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_not_of(charT* s, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_first_not_of_(container, s, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindFirstNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:48'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_first_not_of (charT* s, size_type
+ pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_not_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_not_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindFirstNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:49'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_not_of (const string&amp; s, size_type pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_first_not_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_first_not_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindFirstNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:50'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_first_not_of (charT c, size_type
+ pos=0)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_not_of_(container, c, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_first_not_of_(container, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindFirstNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:51'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of(charT* s, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type find_last_of_(container,
+ s, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindLastOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:52'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_last_of (charT* s, size_type
+ pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindLastOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:53'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of (const string&amp; s, size_type pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_last_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_last_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindLastOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:54'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_last_of (charT c, size_type
+ pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of_(container, c, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of_(container, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindLastOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:55'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_not_of(charT* s, size_type pos, size_type n)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_last_not_of_(container, s, pos, n)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindLastNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:56'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_last_not_of (charT* s, size_type pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_not_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_of_(container, s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindLastNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:57'>
+ <td width=437 valign=top style='width:261.95pt;border:none;border-left:solid #4F81BD 1.0pt;
+ mso-border-left-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:4'><b><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_not_of (const string&amp; s, size_type pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type
+ find_last_not_of_(container, s, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>size_type find_last_not_of_(container,
+ s)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:none;border-right:solid #4F81BD 1.0pt;
+ mso-border-right-themecolor:accent1;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal><span lang=EN style='mso-ansi-language:EN'>StringFindLastNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+ <tr style='mso-yfti-irow:58;mso-yfti-lastrow:yes'>
+ <td width=437 valign=top style='width:261.95pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:68'><b><span lang=EN
+ style='mso-ansi-language:EN'>size_type find_last_not_of (charT c, size_type
+ pos=npos)<o:p></o:p></span></b></p>
+ </td>
+ <td width=437 valign=top style='width:262.25pt;border-top:solid #4F81BD 1.0pt;
+ mso-border-top-themecolor:accent1;border-left:none;border-bottom:solid #4F81BD 1.0pt;
+ mso-border-bottom-themecolor:accent1;border-right:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_not_of_(container, c, pos)<o:p></o:p></span></p>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>size_type find_last_not_of_(container, c)<o:p></o:p></span></p>
+ </td>
+ <td width=248 valign=top style='width:148.85pt;border:solid #4F81BD 1.0pt;
+ mso-border-themecolor:accent1;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
+ <p class=MsoNormal style='mso-yfti-cnfc:64'><span lang=EN style='mso-ansi-language:
+ EN'>StringFindLastNotOf_<o:p></o:p></span></p>
+ </td>
+ </tr>
+</table>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Notes:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'>&#7491;: algorithms requiring a predicate
+need to make them eUML compatible by wrapping them inside a Predicate_ functor.
+For example, std::less&lt;int&gt; =&gt; Predicate_&lt;std::less&lt;int&gt;
+&gt;()<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN style='mso-ansi-language:EN'>&#7495;: If using the SGI STL
+implementation, these functors use the SGI return value.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<h3 style='text-align:justify;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Binding_to_a"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Binding
+to a function or method<o:p></o:p></span></h3>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::phoenix/bind/lambda provide a
+way of binding a function to some arguments. <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>It is hard to provide the exact same
+functionality compile-time (I&#8217;ll be grateful for a solution though).
+Furthermore, bind does not fit well into the nice flow of functional
+programming and are usually not incredibly readable. On the other hand,
+providing wrappers around all STL methods or algorithms will hardly be
+sufficient. At some point, a user will want to call his own functions / methods
+inside his transition table or state action.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>EUML provides two macros (sorry
+about that) to convert a function or method into a eUML-compatible functor for
+use in action / guard declarations.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Let&#8217;s suppose we wrote a function
+printing the typeid of its parameter:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>template</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> &lt;<span
+style='color:blue'>class</span> <span style='color:#030003'>T</span>&gt;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>int</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>do_print</span>(<span style='color:#030003'>T</span>&amp;
+<span style='color:#030003'>t</span> ) {<span style='color:#030003'>std</span>::<span
+style='color:#030003'>cout</span> &lt;&lt; <span style='color:#A31515'>&quot;print(T):&quot;</span>
+&lt;&lt; <span style='color:blue'>typeid</span>(<span style='color:#030003'>T</span>).<span
+style='color:#030003'>name</span>() &lt;&lt; <span style='color:#030003'>std</span>::<span
+style='color:#030003'>endl</span>;<span style='color:blue'>return</span> 1;}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can create a functor from it:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>MSM_EUML_FUNCTION</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>(<span
+style='color:#030003'>PrintState_</span> , <span style='color:#030003'>do_print</span>
+, <span style='color:#030003'>print_</span> , <span style='color:blue'>int</span>
+, <span style='color:blue'>int</span> )</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This creates from the function </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>do_print</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> (the second argument), a functor </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>PrintState_</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> (the first argument) and an eUML
+function </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>print_</span><span lang=EN-US style='mso-ansi-language:EN-US'> (the
+third argument). The 2 ints declare the return value of the function in the
+context of a transition and of a state action. We now have valid eUML functors
+and can use them, for example in a state action:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+(<span style='color:#030003'>print_</span>(<span style='color:#030003'>state_</span>()),NoAction()
+)) SomeState;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This declares a state printing its
+own name at each entry.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can also enable methods to play
+with eUML. Let&#8217;s have a look at the following event:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_attributes</span>(<span
+style='color:#030003'>attributes_</span> &lt;&lt; <span style='color:#030003'>string</span>()<span
+style='color:green'>/*m_song*/</span> )) <span style='color:#030003'>FoundDef</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>struct</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>Found</span> : <span style='color:#030003'>euml_event</span>&lt;<span
+style='color:#030003'>Found</span>&gt;,<span style='color:#030003'>FoundDef<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>{<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>int</span>
+<span style='color:#030003'>foo</span>()<span style='color:blue'>const</span> {<span
+style='color:#030003'>std</span>::<span style='color:#030003'>cout</span>
+&lt;&lt; <span style='color:#A31515'>&quot;foo()&quot;</span> &lt;&lt; <span
+style='color:#030003'>std</span>::<span style='color:#030003'>endl</span>; <span
+style='color:blue'>return</span> 0;}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>int</span>
+<span style='color:#030003'>foo</span>(<span style='color:blue'>int</span> <span
+style='color:#030003'>i</span>)<span style='color:blue'>const</span> {<span
+style='color:#030003'>std</span>::<span style='color:#030003'>cout</span>
+&lt;&lt; <span style='color:#A31515'>&quot;foo(int):&quot;</span> &lt;&lt; <span
+style='color:#030003'>i</span> &lt;&lt; <span style='color:#030003'>std</span>::<span
+style='color:#030003'>endl</span>; <span style='color:blue'>return</span> 1;}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style='color:blue'>int</span>
+<span style='color:#030003'>foo</span>(<span style='color:blue'>int</span> <span
+style='color:#030003'>i</span>,<span style='color:blue'>int</span> <span
+style='color:#030003'>j</span>)<span style='color:blue'>const</span> {<span
+style='color:#030003'>std</span>::<span style='color:#030003'>cout</span>
+&lt;&lt; <span style='color:#A31515'>&quot;foo(int,int):&quot;</span> &lt;&lt; <span
+style='color:#030003'>i</span> &lt;&lt;<span style='color:#A31515'>&quot;,&quot;</span>
+&lt;&lt; <span style='color:#030003'>j</span> &lt;&lt; <span style='color:#030003'>std</span>::<span
+style='color:#030003'>endl</span>; <span style='color:blue'>return</span> 2;}<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>};</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This event declares three overloaded
+foo methods. We enable all three for eUML:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>MSM_EUML_METHOD</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>(<span
+style='color:#030003'>FoundFoo_</span> , <span style='color:#030003'>foo</span>
+, <span style='color:#030003'>foo_</span> , <span style='color:blue'>int</span>
+, <span style='color:blue'>int</span> )</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>And can now use them, for example:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+(<span style='color:#030003'>foo_</span>(<span style='color:#030003'>event_</span>(),<span
+style='color:#030003'>Int_</span>&lt;0&gt;()),NoAction() )) SomeState;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This will call the second version of
+foo.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can also call the third version:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+(<span style='color:#030003'>foo_</span>(<span style='color:#030003'>event_</span>(),<span
+style='color:#030003'>Int_</span>&lt;0&gt;(),<span style='color:#030003'>Int_</span>&lt;0&gt;()),NoAction()
+)) SomeState;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We now have a way to bind a method
+of an event, state or state machine or a simple function with a nicer syntax than
+a normal bind.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h3 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Some_Examples_with_1"></a><span lang=EN-US style='mso-ansi-language:
+EN-US'>Some examples with eUML<o:p></o:p></span></h3>
+
+<p style='margin-bottom:0cm;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>A few concrete examples also make
+use of the possibilities offered by eUML and are provided to help you master
+these new concepts faster:<o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="SimpleTutorialEuml.cpp">an eUML version of the simple tutorial</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="CompositeTutorialEuml.cpp">an eUML version of the composite tutorial</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="DirectEntryEuml.cpp">an eUML version of the entry tutorial</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="FlagsTutorialEuml.cpp">an eUML version of the flags tutorial</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="HistoryEuml.cpp">an eUML version of the history tutorial</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="OrthogonalDeferredEuml.cpp">an eUML version of the orthogonal-deferred
+tutorial</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="AnonymousTutorialEuml.cpp">an eUML version of anonymous transitions</a><o:p></o:p></span></p>
+
+<p style='margin-top:5.0pt;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;
+margin-bottom:.0001pt;text-indent:-18.0pt;mso-list:l25 level1 lfo37;tab-stops:
+45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><a
+href="#_EUML_Case_Studies">a few case studies (timer, algorithm implementation
+as a state machine)</a><o:p></o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Performance"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Performance</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><o:p></o:p></span></h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Tests were made on different PCs
+running Windows XP and Vista and compiled with VC9 SP1 or Ubuntu and compiled
+with g++ 4.2 and 4.3.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>For these tests, the same player
+state machine was written using Boost.Statechart, as a <a href="SC%20Simple.cpp">state
+machine with only simple states</a> and as a <a href="SC%20Composite.cpp">state
+machine with a composite state</a>. <o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The same simple
+and composite state machines are implemented
+with Msm2 with standard frontend, the simple one also with <a
+href="EumlSimple.cpp">eUML</a>.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>As these simple machines need no terminate/interrupt
+states, no message queue and have no-throw guarantee on their actions, the Msm
+state machines are defined with minimum functionality.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>VC9:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l10 level1 lfo38;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+simple test completes 36 times faster with Msm than with Boost.Statechart<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l10 level1 lfo38;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+composite test completes 18 times faster with Msm<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l10 level1 lfo38;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+fastest version is with eUML. It completes 47 times faster than
+Boost.Statechart. A transition costs on my Q6600 9ns.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>gcc 4.2.3:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l30 level1 lfo39;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>the
+simple test completes 33 times faster with Msm<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l30 level1 lfo39;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>the
+composite test completes 25 times faster with Msm<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Executable size<o:p></o:p></span></h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>There are some worries that Msm
+generates huge code. Is it true? It depends on the compiler. <o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>On VC9, the test state machines used
+in the performance section produce executables of 14kB (for simple and eUML) and
+21kB (for the composite). This includes the test code and iostreams. By
+comparison, an empty executable with iostreams generated by VC9 has a size of
+7kB. Boost.Statechart generates executables of 43kB and 54kB. As a bonus, eUML
+comes for &#8220;free&#8221; in terms of executable size. You even get a speed
+gain.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>With g++, it seems to be true, even
+though I admit not being a g++ expert. A good size state machine can generate
+an executable of 600kB, and with eUML you can get to 1.5MB. I tried with -O0 to
+&#8211;O3 and did not manage to get it smaller. I&#8217;d be happy with some
+help about how to make g++ come at a reasonable level.<o:p></o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Compilers"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Compilers<o:p></o:p></span></h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Msm v2 was successfully tested with:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l19 level1 lfo40;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>VC8,
+VC9SP1, VC10 Beta1<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l19 level1 lfo40;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>g++
+4.1 and higher<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l19 level1 lfo40;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Green
+Hills Software MULTI for ARM v5.0.5 patch 4416 (Simple and Composite tutorials)<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>EUML will only work with:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l19 level1 lfo40;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>VC8
+(partly). You cannot, however use any overloaded function (like splice) and
+compile times and RAM consumption explode.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l19 level1 lfo40;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>VC9SP1,
+VC10 Beta1-2<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l19 level1 lfo40;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>g++
+4.3 and higher (previous versions lack native typeof support)<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Limitations"></a>Limitation</h1>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l33 level1 lfo41;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Compilation
+times that are going to make you storm the CFO's office and make sure you get a
+shiny octocore with 8GB RAM by next week, unless he's interested in paying you
+watch the compiler agonize for hours... (Make sure you ask for dual 24&quot; as
+well, it doesn't hurt).<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l33 level1 lfo41;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>eUML
+allows very long constructs but will also quickly increase your compile time on
+some compilers (VC9, VC10 Beta1) with buggy decltype support (I suspect some at
+least quadratic algorithms there).<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l33 level1 lfo41;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Quick
+need to overwrite the mpl::vector/list default-size-limit of 20 and fusion
+default vector size of 10 if more than 10 states found in a state machine.<o:p></o:p></span></p>
+
+<h1 style='margin-left:23.55pt;text-indent:-23.55pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:16.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></h1>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Compilers&#8217; corner<o:p></o:p></span></h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Compilers are sometimes full of
+surprises and such strange errors happened in the course of the development
+that I wanted to list the most fun for readers&#8217; entertainment.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>VC8</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>template &lt;class StateType&gt;<br>
+typename ::boost::enable_if&lt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typename
+::boost::mpl::and_&lt;typename ::boost::mpl::not_&lt;typename
+has_exit_pseudo_states&lt;StateType&gt;::type&gt;::type,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
+style='mso-spacerun:yes'>&nbsp; </span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>typename
+::boost::mpl::not_&lt;typename is_pseudo_exit&lt;StateType&gt;::type&gt;::type<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;::type,BaseState*&gt;::type<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>I get following error:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>error C2770: invalid explicit
+template argument(s) for '`global<br>
+namespace'::boost::enable_if&lt;is_pseudo_exit&lt;StateType&gt;::type,BaseState*&gt;::type<br>
+boost::msm::state_machine&lt;Derived,HistoryPolicy,BaseState&gt;::add_state&lt;ContainingSM&gt;::new_state_helper(boost::msm::dummy&lt;__formal&gt;)<br>
+const'<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>If I now remove the first
+&#8220;::&#8221; in ::boost::mpl , the compiler shuts up. So in this case, it
+is not possible to follow Boost&#8217;s guidelines.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>VC9</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l28 level1 lfo42;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>This one is my all times&#8217;
+favorite. Do you know why the exit pseudo states are referenced in the
+transition table with a &#8220;</span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>submachine::exit_pt</span><span lang=EN-US
+style='mso-ansi-language:EN-US'>&#8221; ? Because &#8220;</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>exit</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8221; will crash the compiler.
+&#8220;</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>Exit</span><span lang=EN-US style='mso-ansi-language:EN-US'>&#8221; is
+not possible either because it will crash the compiler on one machine, but not
+on another (the compiler was installed from the same disk).<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l28 level1 lfo42;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>If you look at the definition of
+back::state_machine you will notice an extra template parameter named &#8220;</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>WorkaroundVC9</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>&#8221;. It happened that when the
+CopyPolicy was removed, the compiler crashed, asking to simplify the program,
+which was simpler because with one less template argument. Note: VC10 beta
+seems to have solved the problem.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l28 level1 lfo42;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Typeof: While g++ and VC9 compile
+&#8220;standard&#8221; state machines in comparable times, Typeof (while in
+both ways natively supported) seems to behave in a quadratic complexity with
+VC9 and VC10.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>g++ 4.x</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boring compiler, almost all is
+working almost as expected. Being not a language lawyer I am unsure about the
+following case &#8220;Typeof problem&#8221;.
+VC9 and g++ disagree on the question if you can derive from the BOOST_TYPEOF
+generated type without first defining a typedef. I will be thankful for an
+answer on this.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>I only found two ways to break the
+compiler:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l36 level1 lfo48;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Add more eUML constructs until
+something explodes. <o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l36 level1 lfo48;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>The </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>build_terminate</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> function uses 2 </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>mpl::push_back</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> instead of </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>mpl::insert_range</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> because g++ would not accept
+insert_range.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>On the minus side, the generated
+code seems to be huge compared to what VC generates.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>You can test your compiler&#8217;s
+decltype implementation with <a href="CompilerStressTestEuml.cpp">the following
+stress test</a> and reactivate the commented-out code until the compiler
+crashes.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Acknowledgments"></a>Acknowledgments</h1>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Msm2:<o:p></o:p></span></h2>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>eUML
+was made possible by Boost.Proto and Boost.Typeof<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Thanks
+to Eric Niebler for his patience correcting my grammar errors<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Special
+thanks to Joel de Guzman who gave me very good ideas at the BoostCon09. These
+ideas were the starting point of the redesign. Any time again, Joel </span><span
+lang=EN-US style='font-family:Wingdings;mso-ascii-font-family:"Times New Roman";
+mso-hansi-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-char-type:
+symbol;mso-symbol-font-family:Wingdings'><span style='mso-char-type:symbol;
+mso-symbol-font-family:Wingdings'>J</span></span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Thanks
+to Richard O&#8217;Hara for making Green Hills bring a patch in less than 1
+week, thus adding one more compiler to the supported list.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'>Msm1</h2>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+original version of this framework is based on the brilliant work of David
+Abrahams and Aleksey Gurtovoy who laid down the base and the principles of the
+framework in their excellent book, &#8220;C++ template Metaprogramming&#8221;.
+The implementation also makes heavy use of the boost::mpl.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Thanks
+to Jeff Flinn for his idea of the user-defined base state and his review which
+allowed Msm to be presented at the BoostCon09.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l38 level1 lfo43;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Thanks
+to my Msm v1beta testers, <a
+href="mailto:woch%20AT%20hrz%20DOT%20tu%20MINUS%20chemnitz%20DOT%20de">Christoph
+Woskowski</a> and <a href="mailto:f%20DOT%20alt%20AT%20gmx%20DOT%20net">Franz
+Alt</a> for using the framework with little documentation and to my private
+reviewer, <a
+href="mailto:%20edouard%20DOT%20alligand%20AT%20bureau14%20DOT%20fr">Edouard
+Alligand</a>.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Used libraries:<o:p></o:p></span></h1>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::bind<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::mpl<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::fusion<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::proto<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::typeof<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost:TypeTraits<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::utility<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l4 level1 lfo44;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
+Symbol;mso-ansi-language:EN-US'><span style='mso-list:Ignore'>&middot;<span
+style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span
+lang=EN-US style='mso-ansi-language:EN-US'>Boost::function<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Questions_&amp;_Answers"></a>Questions &amp; Answers</h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: on_entry gets as argument, the sent event.
+What event do I get when the state becomes default-activated (because it is an
+initial state)?<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: To allow you to know that the state was
+default-activated, Msm generates a boost::msm::InitEvent default event.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Why do I see no call to </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>no_transition</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> in my composite state?<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Because of the priority rule defined by UML.
+It says that in case of transition conflict, the most inner state has a higher
+priority. So after asking the inner state, the containing composite has to be
+also asked to handle the transition. So it makes more sense to call his </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>no_transition</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Why do I get a compile error saying the
+compiler cannot convert to a function ...</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Fsm::*(some_event)</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>?<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Probably you defined a transition triggered
+by the event </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>some_event</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>, but used a guard/action method taking another event.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Why do I get a compile error saying something
+like &#8220;too few&#8221; or &#8220;too many&#8221; template arguments?<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Probably you defined a transition in form of
+a a_row where you wanted just a _row or the other way around.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Why do I get a very long compile error when I
+define more than 20 rows in the transition table?<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Msm uses Boost.MPL under the hood and this is
+the default maximum size. Please define the following 2 macros before including
+any Msm headers:<o:p></o:p></span></p>
+
+<div id=limit-vector-size>
+
+<div id=configuration-limit-example><pre><span lang=EN-US style='mso-ansi-language:
+EN-US'>#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'>#define BOOST_MPL_LIMIT_VECTOR_SIZE 30 // or whatever you need<o:p></o:p></span></pre><pre><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre></div>
+
+</div>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Why do I get a very long compile error when I
+define more than 10 states in a state machine?<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: Msm uses Boost.Fusion under the hood and this
+is the default maximum size. Please define the following macro before including
+any Msm headers:<o:p></o:p></span></p>
+
+<pre><span lang=EN-US style='mso-ansi-language:EN-US'>#define FUSION_MAX_VECTOR_SIZE 20 // or whatever you need<o:p></o:p></span></pre>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Question</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: why do I get this error with VC9? </span><span
+lang=EN-US style='font-size:12.5pt;font-family:Consolas;mso-fareast-font-family:
+"Times New Roman";mso-bidi-font-family:Consolas;mso-ansi-language:EN-US'>fatal
+error C1060: compiler is out of heap space<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Answer:</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>&nbsp;
+</span>This is a compiler bug. For a workaround, check <a
+href="#_Defining_a_composite">here</a>.<o:p></o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Case_Studies"></a><span lang=EN-US style='mso-ansi-language:EN-US'>Case
+Studies<o:p></o:p></span></h1>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><i><span
+lang=EN-US style='font-size:14.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US'>Explicit Entry vs Orthogonal zones<o:p></o:p></span></i></h2>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Let us try to implement the state
+machine defined in a paper from David Harel (Figure 8 in <a
+href="http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf">http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf>).<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We will discuss here two possible
+implementations. The first one, shown in the figure 8, is using the UML
+equivalent of what Harel uses in this chart, explicit entries, described in a <a
+href="#_The_many_ways">previous tutorial</a>.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Please have a look at the <a
+href="HarelWithEntry.cpp">source code implementation with Msm</a>.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The biggest advantage of using this
+method is that the code is very simple and easy to understand.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Now, this method has quite a few
+disadvantages. <o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>First, we notice that
+&#8220;alarm-beeps&#8221; has an implementation visible to the outside world.
+This particularity is being used and this leads to three states with close
+names, &#8220;alarm1 beeps&#8221;, &#8220;alarm2 beeps&#8221;, &#8220;both
+beep&#8221;. If you think that this starts sounding like duplication of
+information, you are not the only one. The second point is about design and
+reuse. Let us imagine what could happen if Harel really was working for a
+company producing watches.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l44 level1 lfo45;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Harel
+would implement this state machine.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l44 level1 lfo45;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Some
+time later, he would be asked to do the same for a new model of watch. But this
+model would have 3 alarms.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l44 level1 lfo45;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Or
+maybe 4 alarms?<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l44 level1 lfo45;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+alarm could be triggered with only a few seconds interval.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Please keep in mind that these
+companies produce hundreds of slightly different products, which makes this
+quite a realistic scenario.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>What would be the result? New states
+like &#8220;alarm3 beeps&#8221; or &#8220;three beep&#8221; + &#8220;both
+beep&#8221; (backward compatibility). Maintenance would quickly become a
+nightmare. The reason? A breach of encapsulation caused by &#8220;alarm
+beeps&#8221; letting other state machines use its internals.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Luckily, UML provides not only the
+dangerous explicit entry weapons but also some much more powerful ones, which
+Msm also supports, for example orthogonal regions and instances of a same state
+machine.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Let us redesign Alarm-Beeps by:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l35 level1 lfo46;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Encapsulating
+the alarm functionality in its own state (machine).<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l35 level1 lfo46;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Defining
+orthogonal regions, one for each sub alarm instance. This way it can easily be
+extended to support new alarms. This leads to the following diagram:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_5"
+ o:spid="_x0000_i1029" type="#_x0000_t75" alt="clock.jpg" style='width:415.8pt;
+ height:388.8pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image017.jpg" o:title="clock"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=554 height=518
+src="index-Dateien/image035.jpg" alt=clock.jpg v:shapes="Grafik_x0020_5"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>As you see, it is quite simple. You
+only need define an instance of Alarm in each zone. To add a new alarm is as
+simple as adding a new instance. The Alarm submachine is simply defined as:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_6"
+ o:spid="_x0000_i1028" type="#_x0000_t75" alt="alarm.jpg" style='width:350.4pt;
+ height:229.2pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image019.jpg" o:title="alarm"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=467 height=306
+src="index-Dateien/image036.jpg" alt=alarm.jpg v:shapes="Grafik_x0020_6"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>All what still has to be done is to
+forward the event in the entry method of </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>alarmBeeps</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> to give each alarm instance a
+chance to handle or reject the event in its </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>check_beep</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> guard condition.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>To make implementation easier, each
+alarm is identified by a bit and </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>check_beep </span><span lang=EN-US
+style='mso-ansi-language:EN-US'>is simply calling operator&amp; to decide if it
+wants to accept the event.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>How are instances defined with Msm?
+Msm knows only types, not instances, so you need to define Alarms with
+different types, for example using a template type: <o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>template</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+&lt;</span><span lang=EN-US style='font-family:"Courier New";color:blue;
+mso-ansi-language:EN-US'>int</span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'> Index&gt; </span><span lang=EN-US
+style='font-family:"Courier New";color:blue;mso-ansi-language:EN-US'>struct</span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>
+Alarm_ : public msm::front::state_machine_def&lt;Alarm&lt;Index&gt; &gt;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>And identify each
+instance in </span><span lang=EN-US style='font-family:"Courier New";
+color:black;mso-ansi-language:EN-US'>alarmBeeps</span><span lang=EN-US
+style='color:black;mso-ansi-language:EN-US'> as Alarm&lt;1&gt;, Alarm&lt;2&gt;,
+etc.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>typedef
+msm::back::state_machine&lt;Alarm_&lt;1&gt; &gt; Alarm1;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>typedef
+msm::back::state_machine&lt;Alarm_&lt;2&gt; &gt; Alarm2;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>in the </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>initial_state</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'> typedef of </span><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>alarmBeeps</span><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>, which can therefore do
+without a single row in its transition table:<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>typedef
+mpl::vector&lt;Alarm&lt;1&gt;,Alarm&lt;2&gt; &gt; initial_state;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";color:black;mso-ansi-language:EN-US'>struct
+mpl::vector&lt;Alarm1,Alarm2&gt; initial_state;<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This way, if Harel ever needs to
+support a third alarm, he simply needs a third entry in this typedef. Notice
+how having front-ends and back-ends elegantly solves this problem while staying
+generic. Notice also that it is now possible to have each alarm instance use
+different history policies.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='color:black;mso-ansi-language:EN-US'>Please have a look at
+the example
not using any explicit entry.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Which of both methods should you
+use? It is a matter of taste and you will hear different opinions from
+different designers. If you need something fast and with a short life cycle,
+then you could consider the method with explicit entries. If you are more
+interested in reusable design, then the method using instances is for you. The
+personal preference of the author goes to, you guessed it, the second one.<o:p></o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_EUML_Case_Studies"></a><span lang=EN-US style='mso-ansi-language:EN-US'>eUML
+Case Studies<o:p></o:p></span></h1>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Learning a new language is not
+trivial, and as a few examples are better than 1000 words, let us try a few
+concrete examples based on cases a bit less academic than the player examples.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>These case studies have two main
+goals: show concrete examples of EUML to help users get to speed and provide
+reasons why a model-based approach will help your reasoning.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_A_simple_Timer"></a><span lang=EN-US style='mso-ansi-language:EN-US'>A
+simple timer<o:p></o:p></span></h2>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Let us imagine we get to implement a
+piece of clock watch functionality, the countdown. We get the following
+specification:<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>When
+the user enters a countdown value and presses the start button, the countdown
+has to start. The sent event contains the countdown value </span>in<span
+lang=EN-US style='mso-ansi-language:EN-US'> seconds<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>When
+the countdown is finished, the clock has to ring for exactly 5s.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>At
+any time, the user can stop the countdown or ringing by pressing the stop
+button.<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+ringing can be stopped by pressing any button (start or stop)<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>The
+clock gets constant tick events. We unfortunately have an imprecise timer. To
+compensate, the tick event will contain the time elapsed since last tick.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='margin-left:18.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='margin-left:18.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The following UML diagram shows how
+a UML designer might want to solve the problem (note, in UML, guards are
+surrounded by &#8220;[ ]&#8221; and actions follow a &#8220; / &#8220;):<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_7"
+ o:spid="_x0000_i1027" type="#_x0000_t75" alt="Timer.jpg" style='width:445.8pt;
+ height:471pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image021.jpg" o:title="Timer"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=594 height=628
+src="index-Dateien/image037.jpg" alt=Timer.jpg v:shapes="Grafik_x0020_7"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In a nutshell, </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Started</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> contains a counter, which is
+initialized with the event countdown data (</span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>start_timer.m_timer</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>) in the action method (written after
+a slash) of the transition fired by the </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>start_timer</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> event. <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>While </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Started</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> is active, it gets the tick events.
+At every tick, the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>m_counter</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> attribute of the state is decremented by the event </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>m_tick</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> value. When the counter is 0, a </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>start_ringing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> event is triggered from inside the
+transition and queued into the event queue of Msm. At the end of handling of
+the </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>tick</span><span lang=EN-US style='mso-ansi-language:EN-US'> event, this
+event is processed and </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>Ringing</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> becomes active. Notice how UML is now extended with C++ operator rules:
+</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>Source.m_counter -= Event.m_tick</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> returns the new value </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>of Source.m_counter</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> which then gets compared to 0.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We are now in </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Ringing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, which now gets to process the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>tick</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> events. Again, this state has a
+counter, the counter is decremented by the </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>tick</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> value and if the counter is equal
+to 0, we move back to </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>Stopped</span><span lang=EN-US style='mso-ansi-language:
+EN-US'>. To avoid repeating the previous solution and for the extra fun, we use
+another solution to the same problem, transition conflict. From </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Ringing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, 2 transitions can handle the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>tick</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> event. We therefore define 2
+mutually exclusive guards: the one moving back to </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Ringing</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> is true if </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>counter &#8211; tick
+&gt; 0</span><span lang=EN-US style='mso-ansi-language:EN-US'> (and the counter
+is then decremented by the tick value), the one moving back to </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Stopped</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> is true if counter </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>&#8211;
+tick &lt;= 0</span><span lang=EN-US style='mso-ansi-language:EN-US'>. <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Otherwise, if any button
+(start/stop) is pressed, we move back to </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Stopped</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Now, ideally, in a model-driven
+approach, if a problem is solved by a design, the code should be equivalent.
+But instead in most cases, a developer will have to understand this
+specification and reimplement it in (hopefully) C++. This can lead to errors
+and definitely leads to lost time.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>With eUML, the code is equivalent to
+the model (and could be parsed back to the model if necessary). So let&#8217;s
+go back to what we wrote in the model and analyze the conversion:<o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Target.m_counter
+= Event.m_timer =&gt; </span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>Target_</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;<span style='color:#030003'>m_counter</span>&gt;()=
+<span style='color:#030003'>Event_</span>&lt;<span style='color:#030003'>m_timer</span>&gt;()</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>if
+(Source.m_counter -= Event.m_tick) &lt;= 0 process (start_ringing) =&gt; </span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";color:#030003;mso-ansi-language:EN-US;mso-no-proof:yes'>if_then_</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'>( (<span
+style='color:#030003'>Source_</span>&lt;<span style='color:#030003'>m_counter</span>&gt;()
+-= <span style='color:#030003'>Event_</span>&lt;<span style='color:#030003'>m_tick</span>&gt;())
+&lt;= <span style='color:#030003'>Int_</span>&lt;0&gt;(),<span
+style='color:#030003'> process_</span>(<span style='color:#030003'>start_ringing</span>())
+)</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'> </span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Target.m_ringing_counter
+= RINGING_TIME =&gt; </span><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:#030003;
+mso-ansi-language:EN-US;mso-no-proof:yes'>Target_</span><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>&lt;<span style='color:#030003'>m_ringing_cpt</span>&gt;()
+= <span style='color:#030003'>Int_</span>&lt;<span style='color:#030003'>RINGING_TIME</span>&gt;()</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l25 level1 lfo37;
+tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><![if !supportLists]><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>[
+Source.m_ringing_cpt &#8211; Event.m_tick &gt; 0] / Source.m_ringing_cpt -=
+Event.m_tick =&gt; </span><span lang=EN-US style='font-size:10.0pt;font-family:
+"Courier New";mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>[ <span style='color:#030003'>Source_</span>&lt;<span
+style='color:#030003'>m_ringing_cpt</span>&gt;() - <span style='color:#030003'>Event_</span>&lt;<span
+style='color:#030003'>m_tick</span>&gt;() &gt; <span style='color:#030003'>Int_</span>&lt;0&gt;()
+] </span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoListParagraphCxSpLast style='margin-left:460.8pt;mso-add-space:
+auto;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp; </span>/ (<span style='color:#030003'>Source_</span>&lt;<span
+style='color:#030003'>m_ringing_cpt</span>&gt;() -= <span style='color:#030003'>Event_</span>&lt;<span
+style='color:#030003'>m_tick</span>&gt;() )</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>As you see, the conversion model to
+code is pretty simple, thus reducing errors. And both models (UML model and
+code) are equivalent, so it is easy to build a mapping function from one to the
+other.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Of course, the <a
+href="SimpleTimer.cpp">code example</a> is also provided.<o:p></o:p></span></p>
+
+<h2 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_A_search_function"></a><span lang=EN-US style='mso-ansi-language:EN-US'>A
+search function<o:p></o:p></span></h2>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The previous example is a standard
+application for state machines. But we want to push our model-driven approach
+further by using a state machine to write an algorithm. I already see some at
+the back of the room looking perplexed. Well, why not? Usually, UML designers
+like to use Activity Diagrams to do this, but mostly for documentation purposes
+because Activity Diagrams are hard to define with a precision needed for
+automatic code generation. On the other hand, state machines have a very strict
+formalism which enables code generation while being &#8220;cousin&#8221; with
+Activity Diagrams.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Let&#8217;s suppose we are asked to
+write the song function of an iPod. It is a pretty simple function: the
+function takes as arguments the list of all songs and the letters typed by the
+user so far and returns the matching songs (the ones containing the
+user-provided letters).<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The algorithm would be something
+like:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>For each
+song in the player<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>If (song.find (letters) != npos)<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Result.push_back
+(song)<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can also understand it as a kind
+of </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>copy_if</span><span lang=EN-US style='mso-ansi-language:EN-US'>. <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We now want to do this using a
+model-driven approach with state machines. I suggest the following machine:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_8"
+ o:spid="_x0000_i1026" type="#_x0000_t75" alt="iPodSearch.jpg" style='width:231pt;
+ height:200.4pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image023.jpg" o:title="iPodSearch"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=308 height=267
+src="index-Dateien/image038.jpg" alt=iPodSearch.jpg v:shapes="Grafik_x0020_8"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Foreach</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> sends one </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>OneSong</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> event for every song of the song
+list. If </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>StringFind</span><span lang=EN-US style='mso-ansi-language:EN-US'> finds
+the user-provided letters in the song, it sends a </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Found</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> event, if not a </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>NotFound</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>. When </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Insert</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> becomes active, it inserts the song
+into the result list.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>While this clearly intends to start building
+an algorithm library, this example will be kept not generic to display the use
+of eUML.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We define in the state machine 2
+containers, one with the input songs, and one with the result.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Foreach</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> we add as attribute an iterator on
+the input list.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>StringFind</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> we add as attribute a string (the
+provided letters to search).<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>In </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Insert</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> we define no attribute. The result
+will be directly pushed into the second container of the state machine.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>OneSong</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>, </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Found</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>NotFound</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> events will contain as attribute
+the processed song.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The complete algorithm will be
+implemented in the entry actions of every state.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Foreach: </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>if (Foreach.iterator
+!= Input.end()) process (OneSong)</span><span lang=EN-US style='mso-ansi-language:
+EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>StringFind: if </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>(Event.attribute.find(State.attribute)
+!= npos) process (Found); else process (NotFound);</span><span lang=EN-US
+style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Insert: </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>Fsm.result.push_back(Event.attribute);
+process(Done) ;</span><span lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can now implement this in eUML:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>Foreach</span></u><span lang=EN-US
+style='mso-ansi-language:EN-US'>: <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+<span style='color:#030003'>if_then_</span>( <span style='color:#030003'>State_</span>&lt;<span
+style='color:#030003'>m_src_it</span>&gt;() != <span style='color:#030003'>end_</span>(<span
+style='color:#030003'>Fsm_</span>&lt;<span style='color:#030003'>m_src_container</span>&gt;()),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
+style='color:#030003'>process2_</span>(<span style='color:#030003'>OneSong</span>(),<span
+style='color:#030003'>*</span>(<span style='color:#030003'>State_</span>&lt;<span
+style='color:#030003'>m_src_it</span>&gt;()++)) ),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>NoAction</span>(), <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>attributes_</span> &lt;&lt; <span
+style='color:#030003'>vector</span>&lt;<span style='color:#030003'>OneSong</span>&gt;::<span
+style='color:#030003'>iterator</span>()<span style='color:green'>/*m_src_it*/</span>
+)) <span style='color:#030003'>Foreach</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We define one attribute in Foreach, an
+iterator on the Input list. <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Entry:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>State_ means &#8220;current
+state&#8221;, so in this case Foreach. <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>State_&lt;m_src_it&gt; (with m_src_it defined to be 0, so the first and
+only attribute) refers to the iterator attribute.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp; </span>Fsm_ refers to the current state machine
+containing Input and Result lists.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>Fsm_&lt;m_src_container&gt; refers to the Input list.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>end_(&#8230;) is
+the past-the-end iterator on this Input list.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><span
+style='mso-spacerun:yes'>&nbsp;</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>process2</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>_ deserves a bit of explanation.
+There are 2 process functions. </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>process_(Event)</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> will call </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>process_event</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> on the state machine with a <i
+style='mso-bidi-font-style:normal'>default-constructed</i> event. </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>process2_</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>(Event,Value) will process the event
+initialized with the given value. This means that we are going to send an event
+</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>OneSong</span><span lang=EN-US style='mso-ansi-language:EN-US'>
+initialized with the value referenced by the iterator, which is afterwards
+(post) incremented.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>So, every time </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Foreach</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> will be entered, a song will be
+sent as event, then the iterator incremented, until all songs are sent.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-ansi-language:EN-US'>StringFind</span></u><span
+lang=EN-US style='mso-ansi-language:EN-US'>:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+<span style='color:#030003'>if_then_else_</span>( <span style='color:#030003'>string_find_</span>(<span
+style='color:#030003'>Event_</span>&lt;<span style='color:#030003'>m_song</span>&gt;(),<span
+style='color:#030003'>State_</span>&lt;<span style='color:#030003'>m_letters</span>&gt;())
+!= <span style='color:#030003'>Npos_</span>&lt;<span style='color:#030003'>string</span>&gt;()
+,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>process2_</span>(<span style='color:#030003'>Found</span>(),<span
+style='color:#030003'>Event_</span>&lt;<span style='color:#030003'>m_song</span>&gt;()),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>process2_</span>(<span style='color:#030003'>NotFound</span>(),<span
+style='color:#030003'>Event_</span>&lt;<span style='color:#030003'>m_song</span>&gt;())
+) ,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
+style='color:#030003'>NoAction</span>(), <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>attributes_</span> &lt;&lt; <span
+style='color:#030003'>string</span>()<span style='color:green'>/*m_letters*/</span>
+)) <o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>StringFind</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>StringFind</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'> is given as attribute the user-provided letters.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>Entry:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><span style='mso-spacerun:yes'>&nbsp;&nbsp; </span></span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>string_find_(string, string)</span><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'> is a function which is going to look for the second
+string in the first one. </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:
+yes'>State_&lt;m_letters&gt;</span><span lang=EN-US style='mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> is the first and
+only attribute of the </span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:
+yes'>StringFind</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'> state.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><span style='mso-spacerun:yes'>&nbsp;&nbsp; </span>If
+the string is found</span><span lang=EN-US style='font-family:"Courier New";
+mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:
+yes'>, process2_</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'> will send a </span><span lang=EN-US
+style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>Found</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'> event initialized with the incoming event&#8217;s (</span><span
+lang=EN-US style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>OneSong</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'>) attribute (the song), a </span><span lang=EN-US
+style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'>NotFound</span><span lang=EN-US
+style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;
+mso-no-proof:yes'> event otherwise.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><u><span
+lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+EN-US;mso-no-proof:yes'>Insert:<o:p></o:p></span></u></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_state</span>(
+(<span style='color:#030003'>push_back_</span>(<span style='color:#030003'>Fsm_</span>&lt;<span
+style='color:#030003'>m_tgt_container</span>&gt;(),<span style='color:#030003'>Event_</span>&lt;<span
+style='color:#030003'>m_song</span>&gt;()) ,<span style='color:#030003'>process_</span>(<span
+style='color:#030003'>Done</span>())),<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>NoAction</span>() )) <span style='color:
+#030003'>Insert</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>This state has no attribute and simply
+calls the function </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>push_back_(container, element)</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> on the state machine&#8217;s result list, then
+sends a Done event, thus moving back to Foreach, which will send the next song,
+etc.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Notice the several statements (</span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>push_back_,
+process_)</span><span lang=EN-US style='mso-ansi-language:EN-US'> enclosed
+inside parenthesis to generate a sequence of actions.<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The state machine only provides a
+simple transition table corresponding to the diagram with Foreach as initial
+state and defining a source and result container:<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>// replaces the old
+transition table<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_stt<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>((<span style='color:#030003'>Foreach</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>+ <span
+style='color:#030003'>OneSong</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>StringFind</span>() ,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>StringFind</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>+ <span style='color:#030003'>Found</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>Insert</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>StringFind</span>()<span style='mso-spacerun:yes'>&nbsp;
+</span>+ <span style='color:#030003'>NotFound</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>== <span style='color:#030003'>Foreach</span>()
+,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:#030003'>Insert</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>+ <span
+style='color:#030003'>Done</span>()<span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== <span
+style='color:#030003'>Foreach</span>()<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
+style='color:green'>//<span style='mso-spacerun:yes'>&nbsp; </span>+------------------------------------------------------------------------------+<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>) ) ) <span style='color:#030003'>transition_table</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:green;mso-ansi-language:EN-US;mso-no-proof:yes'>// create a state machine
+&quot;on the fly&quot;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+color:blue;mso-ansi-language:EN-US;mso-no-proof:yes'>typedef</span><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'> <span
+style='color:#030003'>BOOST_TYPEOF</span>(<span style='color:#030003'>build_sm</span>(<span
+style='mso-spacerun:yes'>&nbsp; </span><span style='color:#030003'>transition_table</span>(),
+<span style='color:green'>//STT<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>init_</span> &lt;&lt; <span
+style='color:#030003'>Foreach</span>(), <span style='color:green'>// Init<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>NoAction</span>(), <span style='color:green'>//
+Entry<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>NoAction</span>(), <span style='color:green'>//
+Exit<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>attributes_</span> &lt;&lt; <span
+style='color:#030003'>vector</span>&lt;<span style='color:#030003'>OneSong</span>&gt;()
+<span style='color:green'>/*m_src_container*/</span> <span style='color:green'>//
+song list<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>&lt;&lt;
+<span style='color:#030003'>vector</span>&lt;<span style='color:#030003'>OneSong</span>&gt;()
+<span style='color:green'>/*m_tgt_container*/</span>, <span style='color:green'>//
+result<o:p></o:p></span></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>flags_</span>&lt;&lt; <span
+style='color:#030003'>no_flags_</span>,<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
+mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US
+style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span><span style='color:#030003'>defer_</span> &lt;&lt; <span
+style='color:#030003'>no_defer_</span><o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><span
+style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span>)) <span style='color:#030003'>iPodSearch_</span>;<o:p></o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
+"Times New Roman";mso-ansi-language:EN-US;mso-no-proof:yes'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>An <a href="iPodSearchEuml.cpp">example
+program</a> is also provided.<o:p></o:p></span></p>
+
+<h1 style='page-break-before:always;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Annex_A_Debugging"></a><span lang=EN-US style='font-size:16.0pt;
+font-family:"Arial","sans-serif";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Annex A Debugging<o:p></o:p></span></h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Normally, one does not need to know
+the ids generated for all the states of a state machine, unless for debugging
+purposes, like the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>pstate</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> function does in the tutorials in order to display the name of the
+current state. The next annex will show how to automatically display
+typeid-generated names, but these are not very readable on all platforms, so it
+can help to know how the ids are generated. <o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The ids are generated using the
+transition table, from the &#8220;Start&#8221; column up to down, then from the
+&#8220;Next&#8221; column, up to down, as shown in the next image:<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Grafik_x0020_9"
+ o:spid="_x0000_i1025" type="#_x0000_t75" alt="AnnexA.jpg" style='width:598.2pt;
+ height:384.6pt;visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="index-Dateien/image025.jpg" o:title="AnnexA"/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=798 height=513
+src="index-Dateien/image039.jpg" alt=AnnexA.jpg v:shapes="Grafik_x0020_9"><![endif]></span><span
+lang=EN-US style='mso-ansi-language:EN-US'><br clear=left style='mso-special-character:
+line-break'>
+<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Stopped</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> will get id 0, </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>Open</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> id 1, </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>ErrorMode</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> id 6 and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>SleepMode</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> (seen only in the &#8220;Next&#8221;
+column) id 7.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>If you have some implicitly created
+states, like transition-less initial states or states created using the </span><span
+lang=EN-US style='font-family:"Courier New";mso-ansi-language:EN-US'>explicit_creation</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> typedef, these will be added as a
+source at the end of the transition table.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>If you have composite states, a row will
+be added for them at the end of the table, after the automatically or
+explicitly created states, which can change their id.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>The next help you will need for
+debugging would be to call the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>current_state</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> method of the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>state_machine</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> class, then the </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>display_type</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> helper to generate a readable name from the id.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>If you do not want to go through the
+transition table to fill an array of names, the library provides another
+helper, </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>fill_state_names</span><span lang=EN-US style='mso-ansi-language:EN-US'>,
+which, given an array of sufficient size (please see Annex B to know how many
+states are defined in the state machine), will fill it with typeid-generated
+names.<o:p></o:p></span></p>
+
+<h1 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><a
+name="_Annex_B_Metaprogramming"></a><span lang=EN-US style='font-size:16.0pt;
+font-family:"Arial","sans-serif";mso-fareast-font-family:"Times New Roman";
+mso-ansi-language:EN-US'>Annex B Metaprogramming tools<o:p></o:p></span></h1>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>We can find for the transition table
+even more uses than what we have seen so far. Let's suppose you need to write a
+coverage tool. A state machine would be perfect for such a job, if only it
+could provide some information about its structure. As a matter of fact, thanks
+to the transition table and Boost.Mpl, it does.<o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>What would you need for a coverage
+tool? You'd probably need to know how many states are defined in the state
+machine, and how many events can be fired. This way you could log the fired
+events and the states visited in the life of a concrete machine and be able to
+perform some coverage analysis, like &#8220;fired 65% of all possible events
+and visited 80% of the states defined in the state machine&#8221;.<o:p></o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>To achieve this, Msm provides a few
+useful tools:<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l2 level1 lfo47;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>generate_state_set&lt;transition table&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: returns a mpl::set of all the
+states defined in the table.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l2 level1 lfo47;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>generate_event_set&lt;transition table&gt;</span><span
+lang=EN-US style='mso-ansi-language:EN-US'>: returns a mpl::set of all the
+events defined in the table.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l2 level1 lfo47;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Using
+</span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>mpl::size&lt;&gt;::value</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> you can get the number of elements in the set.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l2 level1 lfo47;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>display_type </span><span lang=EN-US style='mso-ansi-language:
+EN-US'>defines an </span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>operator()</span><span lang=EN-US style='mso-ansi-language:
+EN-US'> sending t</span><span lang=EN-US style='font-family:"Courier New";
+mso-ansi-language:EN-US'>ypeid(Type).name() </span><span lang=EN-US
+style='mso-ansi-language:EN-US'>to </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>cout</span><span lang=EN-US
+style='mso-ansi-language:EN-US'>.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l2 level1 lfo47;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Using
+a mpl::for_each on the result of </span><span lang=EN-US style='font-family:
+"Courier New";mso-ansi-language:EN-US'>generate_state_set </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>and </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>generate_event_set </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>passing </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>display_type</span><span
+lang=EN-US style='mso-ansi-language:EN-US'> as argument will display all the
+states of the state machine.<o:p></o:p></span></p>
+
+<p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l2 level1 lfo47;
+tab-stops:list 36.0pt'><![if !supportLists]><span lang=EN-US style='font-size:
+10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
+Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:EN-US'><span
+style='mso-list:Ignore'>&middot;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</span></span></span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'>Let's
+suppose you need even more and recursively find the states and events defined in
+the composite states and thus also having a transition table. No problem!
+Calling </span><span lang=EN-US style='font-family:"Courier New";mso-ansi-language:
+EN-US'>recursive_get_transition_table&lt;Composite&gt;</span><span lang=EN-US
+style='mso-ansi-language:EN-US'> will return you the transition table of the
+composite state, recursively adding the transition tables of all sub-state
+machines and sub-sub...-sub-state machines. Then call </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>generate_state_set </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>or </span><span lang=EN-US
+style='font-family:"Courier New";mso-ansi-language:EN-US'>generate_event_set </span><span
+lang=EN-US style='mso-ansi-language:EN-US'>on the result to get the full list
+of states and events. <o:p></o:p></span></p>
+
+<p style='margin-bottom:12.0pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
+
+<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
+lang=EN-US style='mso-ansi-language:EN-US'>Again, please have a look at the end
+of this example to see the tools in action.<o:p></o:p></span></p>
+
+</div>
+
+</body>
+
+</html>

Deleted: sandbox/msm/libs/msm/doc/index.html
==============================================================================
--- sandbox/msm/libs/msm/doc/index.html 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
+++ (empty file)
@@ -1,2547 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
- <TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
- <META NAME="CREATED" CONTENT="20080922;21044300">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGED" CONTENT="20090326;22005200">
- <META NAME="Info 1" CONTENT="">
- <META NAME="Info 2" CONTENT="">
- <META NAME="Info 3" CONTENT="">
- <META NAME="Info 4" CONTENT="">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGEDBY" CONTENT="xtoff">
- <META NAME="CHANGEDBY" CONTENT="xtoff">
- <META NAME="CHANGEDBY" CONTENT="xtoff">
- <STYLE TYPE="text/css">
- <!--
- @page { margin-left: 2.2cm; margin-right: 1.99cm; margin-top: 2cm; margin-bottom: 2cm }
- P { margin-bottom: 0.21cm }
- TD P { margin-bottom: 0cm }
- H1 { margin-bottom: 0.21cm }
- H1.western { font-family: "Arial", sans-serif; font-size: 16pt }
- H1.cjk { font-family: "MS Mincho"; font-size: 16pt }
- H1.ctl { font-family: "Tahoma"; font-size: 16pt }
- H2.western { font-family: "Albany", sans-serif; font-size: 14pt; font-style: italic }
- H2.cjk { font-family: "HG Mincho Light J"; font-size: 14pt; font-style: italic }
- H2.ctl { font-family: "Arial Unicode MS"; font-size: 14pt; font-style: italic }
- H3.western { font-family: "Albany", sans-serif }
- H3.cjk { font-family: "HG Mincho Light J" }
- H3.ctl { font-family: "Arial Unicode MS" }
- -->
- </STYLE>
-</HEAD>
-<BODY LANG="en-US" DIR="LTR">
-<P STYLE="margin-top: 0.42cm; margin-bottom: 0.5cm; page-break-after: avoid">
-<FONT FACE="Albany, sans-serif"><FONT SIZE=4>The Msm (Meta State
-Machine) library v1.20</FONT></FONT></P>
-<P>Christophe Henry,
-</P>
-<P>henry UNDERSCORE christophe AT hotmail DOT com</P>
-<P STYLE="margin-top: 0.42cm; margin-bottom: 0.5cm; page-break-after: avoid">
-<FONT FACE="Albany, sans-serif"><FONT SIZE=4>Contents</FONT></FONT></P>
-<P><BR><BR>
-</P>
-<P>Introduction</P>
-<P><A HREF="#2.Changes compared to previous version|outline"><U>Changes
-compared to previous version</U></A></P>
-<P>Design Goals</P>
-<P>Framework Interface</P>
-<P>Workarounds</P>
-<P>Tutorials</P>
-<UL>
- <LI><P><A HREF="#0.1.Your first finite state machine|outline">Your
- first finite state machine</A></P>
- <LI><P><A HREF="#5.2.A more advanced example|outline">A more
- advanced example</A></P>
- <LI><P><A HREF="#4.3.Orthogonal States (+Defer and Terminate State)|outline">Orthogonal
- States (+Defer and Terminate states)</A></P>
- <LI><P>Adding an history</P>
- <LI><P><A HREF="#5.5.Using &ldquo;flags&rdquo;|outline">Using
- &ldquo;flags&rdquo;</A></P>
- <LI><P><A HREF="#The many ways to enter a composite state|outline">The
- many ways to enter a composite state</A></P>
-</UL>
-<P>Advanced</P>
-<UL>
- <LI><P><A HREF="#Conflicting Transitions|outline">Conflicting
- Transitions</A></P>
- <LI><P><A HREF="#5.1.Containing state machine|outline">Containing
- state machine</A></P>
- <LI><P><A HREF="#5.2.Getting a pointer to a state|outline">Getting a
- pointer to a state</A></P>
- <LI><P>Copying</P>
- <LI><P>Exceptions</P>
- <LI><P>Helpers methods</P>
- <LI><P>Getting more speed</P>
-</UL>
-<P>Customizing states</P>
-<UL>
- <LI><P><A HREF="#User-defined base state / Polymorphic states|outline">User-defined
- base state / Polymorphic states</A></P>
- <LI><P><A HREF="#Visiting active states|outline">Visiting active
- states</A></P>
-</UL>
-<P>Performance</P>
-<P>Compilers</P>
-<P>Limitations</P>
-<P>Acknowledgments</P>
-<P><A HREF="#9.Questions &amp; Answers|outline"><U>Questions &amp;
-Answers</U></A></P>
-<P>Case Studies</P>
-<P>Annex A Debugging</P>
-<P><A HREF="#12.Annex B Metaprogramming tools|outline">Annex B
-Metaprogramming tools</A></P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="1.Introduction|outline"></A>
-Introduction</H1>
-<P>Msm is a framework which enables you to build a Finite State
-Machine in a straightforward, descriptive and easy-to-use manner . It
-requires minimal effort to generate a working program from an UML
-state machine diagram. This work was inspired by the state machine
-described in the book of David Abrahams and Aleksey Gurtovoy &ldquo;C++
-Template Metaprogramming&rdquo; and adds most of what UML Designers
-are expecting from an UML State Machine framework:</P>
-<UL>
- <LI><P>Entry and Exit Methods</P>
- <LI><P>Guard Conditions</P>
- <LI><P>Sub state machines (also called composite states in UML)</P>
- <LI><P>History</P>
- <LI><P>Terminate Pseudo-State</P>
- <LI><P>Deferred Events</P>
- <LI><P>Orthogonal zones</P>
- <LI><P>Explicit entry into sub state machine states</P>
- <LI><P>Fork</P>
- <LI><P>Entry / Exit pseudo states</P>
- <LI><P>Conflicting transitions</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Additional features, absent from the UML specification but
-nevertheless relevant were also implemented :</P>
-<UL>
- <LI><P>Event Queue</P>
- <LI><P>A new concept named &ldquo;flags&rdquo;. This can be seen as
- an alternative to Boost.Statechart state_downcast</P>
- <LI><P>Interrupted Pseudo-State. A kind of Terminate pseudo-state
- which can still be left.</P>
- <LI><P>Visitors, polymorphic states when needed.</P>
-</UL>
-<P><BR><BR>
-</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="2.Changes compared to previous version|outline"></A>
-Changes compared to previous version</H1>
-<P>Changes from 1.10 to 1.20 (RC1)</P>
-<UL>
- <LI><P>Added visitor implementation</P>
- <LI><P>Added by state&lt;&gt;, terminate_state&lt;&gt;... a BASE
- template parameter in first position defaulting to
- default_base_state. No breaking change if no SMPtr policy chosen.</P>
- <LI><P>Renamed SMPtr/NoSMPtr to sm_ptr / no_sm_ptr. Old names
- deprecated by still supported.</P>
- <LI><P>Added possibility to manually deactivate queuing of messages
- and exception handling for more speed.</P>
- <LI><P>Added automatic deactivation of terminate/interrupt state
- checking and deferred events if not used.</P>
-</UL>
-<P>Changes from 1.0 to 1.10</P>
-<UL>
- <LI><P>Corrected bugs that events were not forwarded to the sub-
- state machine if this sub- state machine appeared only as target in
- the transition table.</P>
- <LI><P>Added explicit entry states into a sub-state machine.</P>
- <LI><P>Added fork entry: activation of several explicit entry states
- from different orthogonal zones.</P>
- <LI><P>Added entry pseudo states.</P>
- <LI><P>Added exit pseudo states.</P>
- <LI><P>Added support for transition conflicts: different transitions
- triggered by the same event and starting from the same source state,
- differentiated simply by guard conditions or depth.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Two minor breaking changes had to be done:</P>
-<UL>
- <LI><P><FONT FACE="Courier New, monospace">terminate_state</FONT> is
- now a template type in order to give him, like for normal states,
- the <FONT FACE="Courier New, monospace">SMPtrPolicy</FONT> which
- allows the state to get a pointer to its containing state machine.</P>
- <LI><P>The <FONT FACE="Courier New, monospace">no_transition</FONT>
- method is not called any more in case of an impossible transition if
- the state machine is used as a composite state in another state
- machine to better respect the UML specification.</P>
-</UL>
-<P><BR><BR>
-</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="3.Design Goals|outline"></A>
-Design Goals</H1>
-<P>While Boost.Statechart already offers many of the aforementioned
-features, one may question the very existence of this framework. The
-following advantages are offered:</P>
-<UL>
- <LI><P>Efficiency: The heavily-used metaprogramming techniques
- described in the book allow a O(1) double dispatch and the non-use
- of virtual calls. The result is a very efficient code, at the cost
- of a longer compilation time and bigger executable size.</P>
- <LI><P>Declarativeness: At the heart of the framework is a
- transition table. Boost.Statechart is a very good tool, but to
- deduce the original state machine diagram from its source code can
- sometimes be quite a challenge.
- </P>
- <LI><P>Expressiveness: The Domain-Specific-Language represents well
- the abstraction domain and displays a high ratio of information to
- syntactic noise.
- </P>
- <LI><P>Metaprogramming tools (see <A HREF="#12.Annex B Metaprogramming tools|outline">Annex
- B</A>) can be easily written and add much value to your state
- machine.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>For people working on embedded systems, selling Boost.Statechart
-has got the handicap O(n) double-dispatch, the virtual calls and the
-fact that many of them are coming from the C world and thus no fans
-of big template argument lists or forward-declarations.</P>
-<P>The declarative interface of Msm is transparent, and a developer
-not needing the more complex features is not required to learn them,
-reducing the &quot;entry cost&quot;. As needed, the user may choose
-to delve further in the more advanced policies and underlying
-concepts of the library.</P>
-<P>What the framework does not yet offer:</P>
-<UL>
- <LI><P>built-in multithreading. For the time being, it is not fully
- decided whether this should be implemented directly in the library
- or if this should remain at the user's discretion.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>If you are looking for an efficient and straightforward UML-based
-finite state machine framework, we sincerely hope you will enjoy this
-work!</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="4.Framework Interface|outline"></A>
-Framework Interface</H1>
-<P>Let's start with an example taken from C++ Template
-Metaprogramming:</P>
-<P><CODE>int main()</CODE></P>
-<P><CODE>{</CODE></P>
-<P><CODE>player p; // an instance of the concrete state Machine</CODE></P>
-<P><CODE>p.start(); // activates the init state (calls on_entry)</CODE></P>
-<P><CODE>p.process_event(open_close()); // user opens CD player</CODE></P>
-<P><CODE>p.process_event(open_close()); // inserts CD and closes</CODE></P>
-<P><CODE>p.process_event(cd_detected(&ldquo;louie&rdquo;,&rdquo;louie&rdquo;));</CODE></P>
-<P><CODE>p.process_event(play());</CODE></P>
-<P><CODE>...</CODE></P>
-<P><CODE>return 0;</CODE></P>
-<P><CODE>}</CODE></P>
-<P>The transition table is at the heart of the framework, and is
-implemented using the following DSL (Domain-Specific-Language):</P>
-<P><BR><BR>
-</P>
-<P><CODE>struct transition_table: mpl::vector&lt;</CODE></P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=28*>
- <COL WIDTH=34*>
- <COL WIDTH=37*>
- <COL WIDTH=31*>
- <COL WIDTH=59*>
- <COL WIDTH=54*>
- <COL WIDTH=14*>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Start</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Event</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Next</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Action</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Guard</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=5%>
- <P><BR>
- </P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">play,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Playing,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::start_playback</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">open_close,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Open,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::open_drawer</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">stop,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Stopped</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Open,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">open_close,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Empty,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::close_drawer</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Empty,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">open_close,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Open,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::open_drawer</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Empty,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">cd_detected,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::store_cd_info</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::good_disk_format</FONT></CODE></P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Playing,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">stop,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::stop_playback</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Playing,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">pause,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Paused,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::pause_playback</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Playing,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">open_close,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Open,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::stop_and_open</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Paused,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">end_pause,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Playing,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::resume_playback</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Paused,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">stop,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::stop_playback</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Paused,</FONT></CODE></P>
- </TD>
- <TD WIDTH=15%>
- <P><CODE><FONT COLOR="#0000ff">open_close,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Open,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::stop_and_open</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>&gt; {};</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=15%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=12%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=23%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><BR>
- </P>
- </TD>
- </TR>
-</TABLE>
-<P><BR><BR>
-</P>
-<P><BR><BR>
-</P>
-<P>Not very imaginative are we? As you can suspect, this is also
-taken from the book.
-</P>
-<P>You get one row for every transition. A transition is made of:</P>
-<UL>
- <LI><P>a current state</P>
- <LI><P>an event provoking the current state to be left and moving
- to:</P>
- <LI><P>a next state, which becomes the next current state</P>
- <LI><P>an action method which gets called during the transition, if
- and only if</P>
- <LI><P>a guard condition gives its ok by returning true</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>For every <U>concrete</U> event, the action method has the
-following signature:</P>
-<P><CODE><FONT COLOR="#0000ff">void</FONT></CODE><CODE>
-action_method(</CODE><CODE><FONT COLOR="#0000ff">SomeEvent const&amp;</FONT></CODE><CODE>)
-//SomeEvent can be play,stop, etc.</CODE></P>
-<P>And for the guard method:</P>
-<P><CODE><FONT COLOR="#0000ff">bool</FONT></CODE><CODE> guard_method(
-</CODE><CODE><FONT COLOR="#0000ff">SomeEvent const&amp;</FONT></CODE><CODE>)
-//SomeEvent can be play,stop, etc.</CODE></P>
-<P>The event being passed the action/guard methods may contain data,
-while evident for action methods, is also very useful for guards
-methods offering a nice alternative to Boost.Statechart's explicit
-branching requirements.</P>
-<P><BR><BR>
-</P>
-<P>To define a state, simply derive it from:</P>
-<UL>
- <LI><P><CODE>terminate_state&lt;&gt;</CODE>: if the state is a
- terminal pseudo-state</P>
- <LI><P><FONT FACE="Courier New, monospace">interrupt_state&lt;EndInterruptEvent&gt;</FONT>:
- if the state is only interrupting the state machine until the event
- <FONT FACE="Courier New, monospace">EndInterruptEvent </FONT>is
- fired.</P>
- <LI><P><CODE>state_machine&lt;State&gt;</CODE> if State must itself
- be a sub- state machine (composite in UML)</P>
- <LI><P><CODE>state&lt;&gt; </CODE>if it is a normal state</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>You just need to define the initial state:</P>
-<P><CODE>typedef Empty initial_state;</CODE></P>
-<P><BR><BR>
-</P>
-<P><CODE><FONT FACE="Times New Roman, serif"><FONT SIZE=3>As shown in
-the above code, you need to start the state machine by calling
-start(). This is to avoid calling on_entry immediately at object
-creation time and allows you to delay starting the state machine.</FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P><FONT FACE="Times New Roman, serif">And you're ready for the
-minimal state machine! </FONT>
-</P>
-<P><FONT FACE="Times New Roman, serif">Unfortunately, on some
-compilers, you will need a small workaround:</FONT></P>
-<P><BR><BR>
-</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="5.Workarounds|outline"></A>
-Workarounds</H1>
-<P>While VC9 seems perfectly happy with the row syntax, other
-compilers would not accept it, no matter how much sweet talking is
-used.</P>
-<P>This means that it is not portable to omit the action and guard
-methods and a transition (row) must be defined by a start state, an
-event, a next state, an action method and a guard method.</P>
-<P>As only the Start, Event and Next are absolutely necessary, and to
-still allow the nice syntax, Msm provides a few extra row classes:</P>
-<UL>
- <LI><P><FONT FACE="Courier New, monospace">row</FONT> takes 5
- arguments and only VC9 accepts the last 2 as default</P>
- <LI><P><FONT FACE="Courier New, monospace">a_row</FONT> (&ldquo;a&rdquo;
- for action) allows defining only the action and omit the guard
- condition</P>
- <LI><P><FONT FACE="Courier New, monospace">g_row</FONT> (&ldquo;g&rdquo;
- for guard) allows omitting the action method and defining only the
- guard</P>
- <LI><P><FONT FACE="Courier New, monospace">_row</FONT> allows
- omitting action and guard methods.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>For example:</P>
-<P><BR><BR>
-</P>
-<P><BR><BR>
-</P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=28*>
- <COL WIDTH=34*>
- <COL WIDTH=37*>
- <COL WIDTH=31*>
- <COL WIDTH=59*>
- <COL WIDTH=54*>
- <COL WIDTH=14*>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Start</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=14%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Event</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Next</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Action</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Guard</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=5%>
- <P><BR>
- </P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>a_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=14%>
- <P><CODE><FONT COLOR="#0000ff">play,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Playing,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::start_playback</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>g_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=14%>
- <P><CODE><FONT COLOR="#0000ff">open_close,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Open,</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#c5000b">&amp;p::some_guard</FONT></CODE></P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=11%>
- <P><CODE>_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Stopped,</FONT></CODE></P>
- </TD>
- <TD WIDTH=14%>
- <P><CODE><FONT COLOR="#0000ff">stop,</FONT></CODE></P>
- </TD>
- <TD WIDTH=12%>
- <P><CODE><FONT COLOR="#0000ff">Stopped</FONT></CODE></P>
- </TD>
- <TD WIDTH=23%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;</CODE></P>
- </TD>
- </TR>
-</TABLE>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">For greater compatibility, these will
-be used instead of <FONT FACE="Courier New, monospace">row</FONT> <FONT FACE="Times New Roman, serif">in
-the tutorials.</FONT></P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="6.Tutorials|outline"></A>
-Tutorials</H1>
-<H2 CLASS="western"><A NAME="0.1.Your first finite state machine|outline"></A>
-Your first finite state machine</H2>
-<P>SimpleTutorial.cpp</P>
-<P>The previously described transition table is an easily-generated
-view of the following UML State Machine Diagram:</P>
-<P><IMG SRC="index_html_64d3c88c.jpg" NAME="graphics1" ALIGN=LEFT WIDTH=750 HEIGHT=726 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P>Now, all we still have to do is to define events, state machine
-and states, for example:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>play</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>{};</FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state_machine</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;{...}</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Empty</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;&gt;
-</FONT></FONT></CODE>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT SIZE=2>{</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#008000"><FONT SIZE=2>//
-every (optional) entry/exit methods get the event as parameter.</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>template
-&lt;class Event&gt; </FONT></FONT></CODE>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>void</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#c5000b"><FONT SIZE=2>on_entry</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>Event
-const</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&amp;
-) {</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>std</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>cout</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;&lt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#a31515"><FONT SIZE=2>&quot;entering:
-Empty&quot;</FONT></FONT></CODE><CODE><FONT COLOR="#000000"> </FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;&lt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>std</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>endl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;}</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>template
-&lt;class Event&gt;</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>void</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#c5000b"><FONT SIZE=2>on_exit</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>Event
-const</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&amp;
-) {</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>std</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>cout</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;&lt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#a31515"><FONT SIZE=2>&quot;leaving:
-Empty&quot;</FONT></FONT></CODE><CODE><FONT COLOR="#000000"> </FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;&lt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>std</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>endl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;}</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT SIZE=2>};</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P>The <FONT FACE="Courier New, monospace">on_entry</FONT> and
-<FONT FACE="Courier New, monospace">on_exit</FONT> methods are
-optional. The argument is the event which triggered the state
-switching.</P>
-<P>An initial state must still be defined:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>typedef</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Empty</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>initial_state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;</FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P>The action methods for every transition get the event as argument:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>void</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>start_playback</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>play</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>const</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&amp;)</FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Guard
-conditions simply inhibit a transition from occurring, even if an
-acceptable event arrives. The event is passed as parameter, thus
-allowing event-data-dependent decisions on whether to take the
-transition.</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>bool</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#c5000b"><FONT SIZE=2>good_disk_format</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>cd_detected
-const&amp;</FONT></FONT></CODE><CODE><FONT COLOR="#000000"> </FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>evt)
-{...}</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>By
-default, a </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>no_transition</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>method
-is called when an unexpected event is fired. This method simply
-asserts when called.</FONT></FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>It
-is possible to overwrite the </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>no_transition</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>method
-to define a different error handling:</FONT></FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#008000"><FONT SIZE=2>//
-Replaces the default no-transition response.</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>template</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>class</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Event</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>int</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>no_transition</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>int</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>,
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Event</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>const</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&amp;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>e</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>){</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=3>...}</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>That's
-it! People familiar to the player state machines of the boost::mpl
-example will notice just a few changes:</FONT></FONT></FONT></CODE></P>
-<UL>
- <LI><P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3><U>states
- are now classes/structs</U></FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>so
- they can have data. The states get default-constructed at
- initialization time.</FONT></FONT></FONT></CODE></P>
- <LI><P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3><U>No
- id as an int has to be defined</U></FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>,
- which allows reuse of states in other state machines. The ids get
- generated at compile-time. The disadvantage is that it makes
- debugging harder. See <A HREF="#12.Annex A Debugging|outline">Annex
- A</A> for an explanation of how to find the generated id. A small
- helper to get a state array as typeid-generated names is explained
- in Annex A
- and an example is shown at the end of this example.</FONT></FONT></FONT></CODE></P>
- <LI><P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3><U>A
- Guard condition</U></FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>was
- added.</FONT></FONT></FONT></CODE></P>
- <LI><P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3><U>A
- message queue</U></FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>was
- added so that new events can be generated during a transition.</FONT></FONT></FONT></CODE></P>
-</UL>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Quite
-easy, isn't it? You may however think the added value is not as great
-as promised, which leads us to the next example...</FONT></FONT></FONT></CODE></P>
-<H2 CLASS="western" STYLE="page-break-before: always"><A NAME="5.2.A more advanced example|outline"></A>
-A more advanced example</H2>
-<P>CompositeTutorial.cpp</P>
-<P><BR><BR>
-</P>
-<P>The framework would not be a very big subset of an UML state
-machine if it didn't support composite states. Now, the UML
-specification isn't too clear about the difference between composite
-states and sub-state machines, so let us ignore it for simplicity and
-define a composite state as a state machine.</P>
-<P>A small example is better as a long explanation, so, we had player
-defined as:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state_machine</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;{...}</FONT></FONT></CODE></P>
-<P>And playing was a sub-state of it:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Playing</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;&gt;</FONT></FONT></CODE>
-</P>
-<P>But now we want Playing to be a nested state machine, like the
-following diagram shows:</P>
-<P><IMG SRC="index_html_m26c048b0.jpg" NAME="graphics2" ALIGN=LEFT WIDTH=770 HEIGHT=1034 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P><BR><BR>
-</P>
-<P>We just need to change its declaration to:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Playing</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state_machine</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Playing</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;{...}</FONT></FONT></CODE></P>
-<P>And that's it! You can even define the Playing state machine in
-another file and compile separately. Inside, you just need to define
-a (public defined) transition table (the heart of the whole system)
-and the same action / guard, exactly like you did for player.</P>
-<P><BR><BR>
-</P>
-<P>And keep in mind: <U>no change to </U><CODE><U>player</U></CODE>
-is required!</P>
-<P><BR><BR>
-</P>
-<P>For example, as a transition table I defined:</P>
-<P><CODE>struct transition_table: mpl::vector&lt;</CODE></P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=26*>
- <COL WIDTH=34*>
- <COL WIDTH=50*>
- <COL WIDTH=32*>
- <COL WIDTH=54*>
- <COL WIDTH=45*>
- <COL WIDTH=13*>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Start</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=20%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Event</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Next</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Action</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=18%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Guard</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=5%>
- <P><BR>
- </P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><CODE>a_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song1,</FONT></CODE></P>
- </TD>
- <TD WIDTH=20%>
- <P><CODE><FONT COLOR="#0000ff">NextSong,</FONT></CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song2,</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#c5000b">&amp;pl::start_next_song</FONT></CODE></P>
- </TD>
- <TD WIDTH=18%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><CODE>a_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song2,</FONT></CODE></P>
- </TD>
- <TD WIDTH=20%>
- <P><CODE><FONT COLOR="#0000ff">PreviousSong,</FONT></CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song1,</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#c5000b">&amp;pl::start_prev_song</FONT></CODE></P>
- </TD>
- <TD WIDTH=18%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><CODE>a_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song2,</FONT></CODE></P>
- </TD>
- <TD WIDTH=20%>
- <P><CODE><FONT COLOR="#0000ff">NextSong,</FONT></CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song3,</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#c5000b">&amp;pl::start_next_song</FONT></CODE></P>
- </TD>
- <TD WIDTH=18%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;,</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><CODE>a_row&lt;</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song3,</FONT></CODE></P>
- </TD>
- <TD WIDTH=20%>
- <P><CODE><FONT COLOR="#0000ff">PreviousSong,</FONT></CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><CODE><FONT COLOR="#0000ff">Song2,</FONT></CODE></P>
- </TD>
- <TD WIDTH=21%>
- <P><CODE><FONT COLOR="#c5000b">&amp;pl::start_prev_song</FONT></CODE></P>
- </TD>
- <TD WIDTH=18%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><CODE>&gt;</CODE></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><CODE>&gt; {};</CODE></P>
- </TD>
- <TD WIDTH=13%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=20%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=13%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=21%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=18%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=5%>
- <P><BR>
- </P>
- </TD>
- </TR>
-</TABLE>
-<P><BR><BR>
-</P>
-<H2 CLASS="western" STYLE="page-break-before: always"><A NAME="4.3.Orthogonal States (+Defer and Terminate State)|outline"></A>
-Orthogonal States (+Defer and Terminate State)</H2>
-<P>Orthogonal-deferred.cpp</P>
-<P>This tutorial will demonstrate three more features that UML
-defines: Othogonal zones, deferring of events and Terminal States.</P>
-<P>It is a very common problem in many state machines to have to
-handle errors. It usually involves defining a transition from all the
-states to a special error state. Translation : not fun. Luckily, UML
-provides some helpful concepts here. The first one is orthogonal
-zones. See them as state machines running at the same time in a same
-state machine. The effect is that you have several active states at
-any time. Actually, you have always the same number of active states
-as the number of zones is fixed.</P>
-<P>We can therefore keep our state machine from the previous example
-and just define a new zone made of two states, <CODE>AllOk</CODE> and
-<CODE>ErrorMode</CODE>.</P>
-<P><CODE>AllOk</CODE> is most of the time active. But the <CODE>error_found</CODE>
-error event makes the second zone move to the new active state
-<CODE>ErrorMode</CODE>. This event does not interest the main zone so
-it will simply be ignored. Only if no zone at all handles it will
-<CODE>no</CODE>_<CODE>transition</CODE> get called.</P>
-<P>Usually, when you get an error, you do not want other events to be
-handled. To achieve this, we use another UML feature, terminate
-states. When any zone moves to a terminate state, the state machine
-terminates and all further events are ignored.</P>
-<P>This is not mandatory, one can use orthogonal zones without
-terminate states.</P>
-<P>We also added a small extension to UML here, interrupt states. If
-you declare <CODE>ErrorMode</CODE> as interrupt state instead, the
-state machine will not handle any event other than the one which ends
-the interrupt. So it's like a terminate state, with the difference
-that you are allowed to resume the state machine when a condition
-(like handling of the original error) is met.</P>
-<P><BR><BR>
-</P>
-<P>Last but not least, this example also shows here the handling of
-event deferring. Let's say someone puts a disc and immediately
-presses play. The event cannot be handled, yet you'd want it to be
-handled and not force the user to press play again. The solution is
-to define it as deferred in the <FONT FACE="Courier New, monospace">Empty</FONT>
-and <FONT FACE="Courier New, monospace">Open</FONT> states and get it
-handled in the first state where the event is not to be deferred. It
-can then be handled or rejected. In this example, only when <FONT FACE="Courier New, monospace">Stopped</FONT>
-becomes active will the event be handled.</P>
-<P><IMG SRC="index_html_m23e6b7d5.jpg" NAME="graphics3" ALIGN=LEFT WIDTH=803 HEIGHT=997 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P><BR><BR>
-</P>
-<P>Although it may sound arcane, it is rather mundane. You only need
-to add these two new states and change the definition of
-<FONT FACE="Courier New, monospace">initial_state</FONT> to reflect
-the second zone:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>typedef</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>mpl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>vector</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>Empty</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>,</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>AllOk</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>initial_state;</FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Now
-for the terminate state, simply define ErrorMode as a terminate
-state:</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>ErrorMode</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>terminate_state&lt;&gt;</FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Or
-as an interrupt state, which can be ended with the event </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>end_error</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>:</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>ErrorMode</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>interrupt_state&lt;end_error&gt;</FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>And
-you're done with the orthogonal zones! You don't have to give the
-zones an id. Please be advised that there is currently no compile
-time enforcement of the zone consistency (Msm does not yet check that
-the zones are truly orthogonal)</FONT></FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>As
-for our deferred event, the following typedef in </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>Empty</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>and
-</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>Open</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>will
-do:</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>typedef</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>mpl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>vector</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>play</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>deferred_events</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;</FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>With
-this, the event will be put in the deferred queue until a state
-without this typedef handles or rejects it (with a call to
-</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>no_transition</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>).</FONT></FONT></FONT></CODE></P>
-<H2 CLASS="western" STYLE="page-break-before: always"><A NAME="0.4.Adding an history|outline"></A>
-Adding an history</H2>
-<P>History.cpp</P>
-<P>UML defines two types of histories, Shallow History and Deep
-History.
-</P>
-<P>What is it and when do you need it? In the previous examples, if
-the player was playing the second song and the user pressed pause, at
-the next press on the play button, the <FONT FACE="Courier New, monospace">Playing</FONT>
-state would become active and the first song would play again. Soon
-would the first client complains follow. They'd of course demand,
-that if the player was paused, then it should remember which song was
-playing. But it the player was stopped, then it should restart from
-the first song.
-</P>
-<P>Now, how can it be done? Of course, you could add a bit of
-programming logic and generate extra events to make the second song
-start if coming from Pause. Something like:</P>
-<P><CODE>if (Event == end_pause) </CODE>
-</P>
-<P><CODE>{</CODE></P>
-<P><CODE>for (int i=0;i&lt; song number;++i)</CODE></P>
-<P><CODE>{</CODE></P>
-<P><CODE>player.process_event(NextSong());</CODE></P>
-<P><CODE>}</CODE></P>
-<P><CODE>}</CODE></P>
-<P>Not much to like in this example, isn't it? To solve this problem,
-you define what is called a shallow or a deep history, the difference
-being that the deep history goes recursively into a sub state machine
-and reactivates any previously active State.</P>
-<P>This is described in the following UML diagram:</P>
-<P><IMG SRC="index_html_m6fc8a34.jpg" NAME="graphics4" ALIGN=LEFT WIDTH=712 HEIGHT=1029 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P>You define this in state machine very simply using a policy:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Playing</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state_machine</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Playing</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>,</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>ShallowHistory</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>mpl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>vector</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>end_pause</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;
-&gt; &gt;</FONT></FONT></CODE></P>
-<P>This states that a shallow history must be activated if the
-<FONT FACE="Courier New, monospace">Playing</FONT> state machine gets
-activated by the <FONT FACE="Courier New, monospace">end_pause</FONT>
-event and only this one. If the state machine was in the <FONT FACE="Courier New, monospace">Stopped</FONT>
-state and the event <FONT FACE="Courier New, monospace">play</FONT>
-was generated, the history would not be activated and the normal
-initial state would become active.</P>
-<P>By default, history is disabled. For your convenience the library
-also provides a non-UML standard AlwaysHistory policy which always
-activates history.</P>
-<P>Deep history is not directly available. The reason is that it
-would conflict with policies which sub- state machines could define.
-Of course, if say Song1 were a state machine itself, it could use the
-ShallowHistory policy itself thus creating Deep History.</P>
-<P>An example defining Song1 as a state machine
-is also provided for your entertainment.</P>
-<H2 CLASS="western" STYLE="page-break-before: always"><A NAME="5.5.Using &ldquo;flags&rdquo;|outline"></A>
-Using &ldquo;flags&rdquo;</H2>
-<P>Flags.cpp</P>
-<P>The last tutorial is devoted to a concept not defined in UML :
-flags. It has been added after proving itself useful on many
-occasions. Please, do not be frightened as we are not talking about
-ugly shortcuts made of an improbable collusion of booleans.</P>
-<P>So what is it and what is its use?</P>
-<P>If you look into the Boost.Statechart documentation you'll find
-some code like:</P>
-<PRE>if ( ( state_downcast&lt; const <FONT COLOR="#0000ff">NumLockOff</FONT> * &gt;() != 0 ) &amp;&amp;
- ( state_downcast&lt; const <FONT COLOR="#0000ff">CapsLockOff</FONT> * &gt;() != 0 ) &amp;&amp;
- ( state_downcast&lt; const <FONT COLOR="#0000ff">ScrollLockOff</FONT> * &gt;() != 0 ) )</PRE><P>
-While correct, this can be error-prone and a potential time-bomb when
-you add new states or orthogonal zones.</P>
-<P>And most of all, it hides the real question, which would be &ldquo;Does
-my state machine's current state define a special property?&rdquo;.
-In this special case &ldquo;are my keys in a lock state?&rdquo;. So
-let's apply the Fundamental Theorem of Software Engineering and move
-one level of abstraction higher.</P>
-<P>In our player example, let's say we need to know if the player has
-a loaded CD. We could do the same:</P>
-<PRE>if ( ( state_downcast&lt; const <FONT COLOR="#0000ff">Stopped</FONT> * &gt;() != 0 ) &amp;&amp;
- ( state_downcast&lt; const <FONT COLOR="#0000ff">Open</FONT> * &gt;() != 0 ) &amp;&amp;
- ( state_downcast&lt; const <FONT COLOR="#0000ff">Paused</FONT> * &gt;() != 0 ) &amp;&amp;
- ( state_downcast&lt; const <FONT COLOR="#0000ff">Playing</FONT> * &gt;() != 0 ) )</PRE><P>
-Or flag these 4 states as CDLoaded-able. You can do it like this:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>typedef</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>mpl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>vector1</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>CDLoaded</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>flag_list</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;</FONT></FONT></CODE></P>
-<P>Inside each of them. Or make a list of flags, like in playing:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>typedef</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>mpl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>::</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>vector2</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>PlayingPaused</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>,</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>CDLoaded</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>flag_list</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;</FONT></FONT></CODE></P>
-<P>Now all you need to do, is to check if your flag is active in the
-current state:</P>
-<P><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>p</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;</FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#000000"><FONT SIZE=2>if
-(</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>p</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>.</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>is_flag_active</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>CDLoaded</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;())
-...</FONT></FONT></CODE></P>
-<P>And what if you have orthogonal zones? How to decide if a state
-machine is in a flagged state? By default, you keep the same code and
-the current states will be OR'ed, meaning if one of the active states
-has the flag, then <FONT FACE="Courier New, monospace">is_flag_active</FONT>
-returns true. Now in some cases, you might want that all of the
-active states are flagged for the state to be active, then you need
-to replace the previous line by:</P>
-<P><CODE><FONT COLOR="#000000"><FONT SIZE=2>if
-(</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>p</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>.</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>is_flag_active</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>CDLoaded</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>,</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>player::Flag_AND</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;())
-...</FONT></FONT></CODE></P>
-<P>The following diagram displays the flag situation in the tutorial.</P>
-<P><IMG SRC="index_html_2cb96cb.jpg" NAME="graphics5" ALIGN=LEFT WIDTH=770 HEIGHT=1092 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P STYLE="page-break-before: always"><BR><BR>
-</P>
-<H2 CLASS="western" STYLE="page-break-before: always"><A NAME="The many ways to enter a composite state|outline"></A><A NAME="The many ways to enter a composite state|outline"></A><A NAME="The many ways to enter a composite state|outline"></A>
-The many ways to enter a composite state</H2>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>Please have a look at the
-DirectEntryTutorial.</FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P>Let me count you the ways to enter a composite state, as specified
-by UML:</P>
-<UL>
- <LI><P>Default entry: A transition leads to the edge of a composite
- state. This is the default entry as seen in the previous tutorials.
- The initial state in each orthogonal zone becomes active.</P>
- <LI><P>Shallow/Deep History entry. See History tutorial.</P>
- <LI><P>Explicit entry: if a transition goes to a sub-state of a
- composite state, this state becomes active and like in the previous
- examples, its entry action is executed after the entry action form
- the composite state.</P>
- <LI><P>Fork: an explicit entry into more than one region.</P>
- <LI><P>Entry point entry: Entering a composite state through an
- entry point pseudo state. A pseudo state is defined as connecting
- exactly one transition ending on the pseudo state to one transition
- inside the composite state having the pseudo state as source. There
- are two differences with explicit entries. First you have two
- transitions, meaning two actions (but just one guard as UML forbids
- guard conditions on the inside transition), second you have only one
- transition inside the composite. It is defined as a kind of
- encapsulation.</P>
- <LI><P>If the entered composite has more than one region, the
- regions not directly entered are starting at the initial state.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Exiting is somehow easier:</P>
-<UL>
- <LI><P>&ldquo;Standard&rdquo; exit: a transition originating from
- the edge of a composite state to another state</P>
- <LI><P>Exit point pseudo state: connects one transition inside a
- composite state to a transition outside the composite and leading to
- another (outside) state.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Msm (almost) fully supports these features. Almost because there
-is currently one limitation, that it is only possible to explicitly
-enter a sub- composite and not exit it &ldquo;upwards&rdquo; this
-way. To exit, Msm just supports the two previously described methods.</P>
-<P>Sounds a bit complicated? Let's explain using an example were all
-of the previously named methods are used:</P>
-<P><BR><BR>
-</P>
-<P STYLE="page-break-before: always"><IMG SRC="index_html_55a3569b.jpg" NAME="graphics7" ALIGN=LEFT WIDTH=793 HEIGHT=958 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P>We find in this diagram:</P>
-<UL>
- <LI><P>a &ldquo;normal&rdquo; entering into SubFsm2 triggered by
- event1 and back to State1 using the same event. In each zone is the
- initial state activated, so SubState1 and SubState1b.</P>
- <LI><P>An explicit entry into SubFsm2::SubState2 for zone a with
- event2 as trigger, meaning zone b gets the initial state activated,
- SubState1b.</P>
- <LI><P>A fork into zones a and b to the explicit entries SubState2
- and SubState2b, triggered by event 3. Both states become active so
- no zone is default activated (if we had a third zone, it would be).</P>
- <LI><P>A connection of two transitions through an entry pseudo
- state, SubFsm2::PseudoEntry1, triggered by event4 and triggering
- also the second transition on the same event (both transitions must
- be triggered by the same event). Zone b gets default-activated and
- SubState1b becomes active. The event is forwarded from one
- transition to the other.</P>
- <LI><P>An exiting from SubFsm2 using an exit pseudo-state,
- PseudoExit1, triggered by event5 and again connecting two
- transitions using the same event. Again, the event is forwarded to
- the second transition and both zones are left, as SubFsm2 becomes
- inactive. Note that if event5 is triggered and PseudoExit1 is
- inactive, a wrong transition will be detected and <FONT FACE="Courier New, monospace">no_transition</FONT>
- called.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Sounds like an awful lot of code to write? Not at all, as Msm
-offers an easy syntax.
-</P>
-<H3 CLASS="western">Explicit entry</H3>
-<P>First to define that a state is an explicit entry, you have to
-make it a state and mark it as explicit, giving as template
-parameters the owning composite and the zone id (the zone id starts
-with 0 and corresponds to the first initial state of the
-initial_state type sequence).</P>
-<P><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">SubState2</FONT><FONT COLOR="#000000"> :
-</FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">state</FONT><FONT COLOR="#000000">&lt;&gt;
-, </FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">explicit_entry</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#030003">SubFsm2</FONT><FONT COLOR="#000000">,0&gt;</FONT></FONT></FONT></P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>You can then simply use it in a
-transition from State1:</FONT></FONT></P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=25*>
- <COL WIDTH=36*>
- <COL WIDTH=41*>
- <COL WIDTH=76*>
- <COL WIDTH=77*>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=14%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>State1,</FONT></FONT></P>
- </TD>
- <TD WIDTH=16%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Event2,</FONT></FONT></P>
- </TD>
- <TD WIDTH=30%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>SubFsm2::SubState2</FONT></FONT></P>
- </TD>
- <TD WIDTH=30%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
-</TABLE>
-<P><BR><BR>
-</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>We here use a _row but it can
-be any of the available rows.</FONT></FONT></P>
-<P><U>Note (also valid for forks)</U>: in order to make compile time
-more bearable for the more standard cases, and unlike initial states,
-explicit entry states which are not found in the transition table do
-NOT get automatically created. To explicitly create such states, you
-need to add in the state machine containing the explicit states a
-simple typedef giving a sequence of states to be created like:</P>
-<P><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">typedef</FONT><FONT COLOR="#000000">
-mpl::vector&lt;SubState2,SubState2b&gt; explicit_creation;</FONT></FONT></FONT></P>
-<P>Of course, if these states are found in the transition table,
-which is the common case, this is not necessary. The tutorial makes
-use of this typedef for teaching purposes.</P>
-<H3 CLASS="western">Fork</H3>
-<P><FONT COLOR="#000000"><FONT SIZE=3>Need a fork instead of an
-explicit entry?</FONT></FONT></P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=25*>
- <COL WIDTH=36*>
- <COL WIDTH=41*>
- <COL WIDTH=127*>
- <COL WIDTH=27*>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=14%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>State1,</FONT></FONT></P>
- </TD>
- <TD WIDTH=16%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Event3,</FONT></FONT></P>
- </TD>
- <TD WIDTH=50%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>mpl::vector&lt;SubFsm2::SubState2,SubFsm2::SubState2b&gt;</FONT></FONT></P>
- </TD>
- <TD WIDTH=11%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
-</TABLE>
-<P><BR><BR>
-</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>With SubState2 defined as
-before and SubState2b defined as being in the second zone (Caution:
-Msm does not check yet that the zone is correct):</FONT></FONT></P>
-<P><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">SubState2b</FONT><FONT COLOR="#000000">
-: </FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">state</FONT><FONT COLOR="#000000">&lt;&gt;
-, </FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">explicit_entry</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#030003">SubFsm2</FONT><FONT COLOR="#000000">,1&gt;</FONT></FONT></FONT></P>
-<P><BR><BR>
-</P>
-<H3 CLASS="western">Entry pseudo states</H3>
-<P><FONT COLOR="#000000"><FONT SIZE=3>To define an entry pseudo
-state, you need derive from the corresponding class and give the zone
-id:</FONT></FONT></P>
-<P><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">PseudoEntry1</FONT><FONT COLOR="#000000">
-: </FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">entry_pseudo_state</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#030003">SubFsm2</FONT><FONT COLOR="#000000">,0&gt;</FONT></FONT></FONT></P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>And add the corresponding
-transition in Fsm's transition table:</FONT></FONT></P>
-<P><BR><BR>
-</P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=25*>
- <COL WIDTH=36*>
- <COL WIDTH=41*>
- <COL WIDTH=127*>
- <COL WIDTH=27*>
- <TR VALIGN=TOP>
- <TD WIDTH=10%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=14%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>State1,</FONT></FONT></P>
- </TD>
- <TD WIDTH=16%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Event4,</FONT></FONT></P>
- </TD>
- <TD WIDTH=50%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>SubFsm2::PseudoEntry1</FONT></FONT></P>
- </TD>
- <TD WIDTH=11%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
-</TABLE>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>And another in SubFsm2 (yes,
-UML does want it that way), for example this time with an action
-method:</FONT></FONT></P>
-<P><BR><BR>
-</P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=24*>
- <COL WIDTH=52*>
- <COL WIDTH=23*>
- <COL WIDTH=29*>
- <COL WIDTH=109*>
- <COL WIDTH=19*>
- <TR VALIGN=TOP>
- <TD WIDTH=9%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=20%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>PseudoEntry1,</FONT></FONT></P>
- </TD>
- <TD WIDTH=9%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Event4,</FONT></FONT></P>
- </TD>
- <TD WIDTH=11%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>SubState3,</FONT></FONT></P>
- </TD>
- <TD WIDTH=42%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&amp;SubFsm2::entry_action</FONT></FONT></P>
- </TD>
- <TD WIDTH=8%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
-</TABLE>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<H3 CLASS="western">Exit pseudo states</H3>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>And
-finally, exit pseudo states are to be used almost the same way, but
-defined differently, with the first template argument being the
-owning Composite state and the second argument the event to be
-forwarded (no zone is necessary as the composite is exited anyway):</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">PseudoExit1</FONT><FONT COLOR="#000000">
-: </FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">exit_pseudo_state</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#030003">SubFsm2</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#030003">event5</FONT><FONT COLOR="#000000">&gt;
-</FONT></FONT></FONT>
-</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>And
-you need, as for entry pseudo states, two transitions, one in
-SubFsm2:</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=24*>
- <COL WIDTH=44*>
- <COL WIDTH=32*>
- <COL WIDTH=50*>
- <COL WIDTH=107*>
- <TR VALIGN=TOP>
- <TD WIDTH=9%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=17%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>SubState3,</FONT></FONT></P>
- </TD>
- <TD WIDTH=12%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Event5,</FONT></FONT></P>
- </TD>
- <TD WIDTH=20%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>PseudoExit1</FONT></FONT></P>
- </TD>
- <TD WIDTH=42%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
-</TABLE>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>And one in the containing
-state machine:</FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=24*>
- <COL WIDTH=44*>
- <COL WIDTH=32*>
- <COL WIDTH=50*>
- <COL WIDTH=107*>
- <TR VALIGN=TOP>
- <TD WIDTH=9%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=17%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>SubFsm2::PseudoExit1,</FONT></FONT></P>
- </TD>
- <TD WIDTH=12%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Event5,</FONT></FONT></P>
- </TD>
- <TD WIDTH=20%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>State2</FONT></FONT></P>
- </TD>
- <TD WIDTH=42%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
-</TABLE>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><U>Important note 1:</U>
-UML defines transiting to an entry pseudo state and having either no
-second transition or one with a guard as an error but defines no
-error handling. Msm will tolerate this behavior, the entry pseudo
-state will simply be the newly active state.</FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><U>Important note 2:</U>
-UML defines transiting to an exit pseudo state and having no second
-transition as an error, and also defines no error handling.
-Therefore, it was decided to implement exit pseudo state as terminate
-states and the containing composite not properly exited will stay
-terminated as it was technically &ldquo;exited&rdquo;.</FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><U>Important note 3:</U>
-For both pseudo state types are the event to be the same in both
-transitions.</FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="7.Advanced|outline"></A>
-Advanced</H1>
-<H2 CLASS="western"><A NAME="Conflicting Transitions|outline"></A>Conflicting
-Transitions</H2>
-<P>Two transitions are said to be in conflict if they both exit the
-same states, according to the UML standard, meaning if for a given
-event, these two transitions can be triggered.</P>
-<P>There are two kinds of conflicts, both supported by Msm:</P>
-<UL>
- <LI><P>for a given source state, several transitions have been
- defined, triggered by the same event but <U>different guards</U>.</P>
- <LI><P>An internal transition of a composite state can conflict with
- a transition causing an exit from the state.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Unfortunately, UML does not fully specify the correct behavior.
-Msm supports what UML specifies, that the most nested transition has
-the higher priority.</P>
-<P>If two transitions at the same depth are possible, there is no
-specification, so Msm gives higher priority to the last defined in
-the transition table.</P>
-<P>So, for example you can define (see in SimpleTutorial):</P>
-<P><BR><BR>
-</P>
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0>
- <COL WIDTH=21*>
- <COL WIDTH=17*>
- <COL WIDTH=26*>
- <COL WIDTH=48*>
- <COL WIDTH=48*>
- <COL WIDTH=48*>
- <COL WIDTH=49*>
- <TR VALIGN=TOP>
- <TD WIDTH=8%>
- <P><BR>
- </P>
- </TD>
- <TD WIDTH=7%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Start</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=10%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Event</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=19%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Next</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=19%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Action</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=19%>
- <P><CODE><FONT COLOR="#008000"><FONT SIZE=2>Guard</FONT></FONT></CODE></P>
- </TD>
- <TD WIDTH=19%>
- <P><BR>
- </P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=8%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=7%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Empty,</FONT></FONT></P>
- </TD>
- <TD WIDTH=10%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>cd_detected,</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Stopped</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&amp;fsm::store_cd_info</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&amp;fsm::good_disk_format</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;,</FONT></FONT></P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=8%>
- <P><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=2>_row
- &lt;</FONT></FONT></FONT></P>
- </TD>
- <TD WIDTH=7%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Empty,</FONT></FONT></P>
- </TD>
- <TD WIDTH=10%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>cd_detected,</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>Playing</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&amp;fsm::store_cd_info</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><FONT FACE="Courier New, monospace"><FONT SIZE=3>&amp;fsm::auto_start</FONT></FONT></P>
- </TD>
- <TD WIDTH=19%>
- <P><BR>
- </P>
- </TD>
- </TR>
-</TABLE>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">The last transition has the highest
-priority so only if <FONT FACE="Courier New, monospace">auto_start</FONT>
-returns false will the other transition be tested.</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">To see why the deeper transition has
-higher priority, check the<A HREF="#The many ways to enter a composite state|outline">
-exit pseudo state tutorial</A>. As you see, there is a transition on
-event5 inside SubFsm2 leading to the exit pseudo state and another
-one going from SubFsm2 to State2. So while SubFsm2 is active, we have
-a conflict. If the deepest-level transition would not have priority,
-exit pseudo states would not be possible to realize.</P>
-<H2 CLASS="western"><A NAME="5.1.Containing state machine|outline"></A>
-Containing state machine</H2>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P>All of the states defined in the state machine are created upon
-program initialization. This has the huge advantage of a reduced
-syntactic noise. The cost is a small loss of control of the user on
-the state creation and access. Quite fast came from the beta testers
-the request of a way for a state to get access to its containing
-state machine. This is implemented via another policy. An example of
-this can be found <A HREF="SM.cpp">in a bigger player
-example</A>(defining a state machine with a sub-sub-state machine and
-several sub-state machines). Basically, a state needs to change its
-declaration to:</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>Stopped</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>sm_ptr</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">And to provide a set_sm_ptr function:</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>void</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>set_sm_ptr</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>*
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>pl</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>)</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">to get a pointer to the containing
-state machine. The same applies to terminate_state / interrupt_state
-and entry_pseudo_state / exit_pseudo_state.</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<H2 CLASS="western"><A NAME="5.2.Getting a pointer to a state|outline"></A>
-Getting a pointer to a state</H2>
-<P>It is a very valid request to have the client code get access to
-the states' data. After all, the states are created once for good and
-hang around as long as the state machine does so why not use it? You
-simply just need sometimes to get information about any state, even
-inactive ones. An example is if you want to write a coverage tool and
-know how many times a state is visited. How to do it? Again, quite
-simply:</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>player::Stopped</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>*
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>tempstate</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>=
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>p</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>.</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>get_state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>player::Stopped*</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;();</FONT></FONT></CODE></P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>or</FONT></FONT></P>
-<P><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>player::Stopped&amp;</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>tempstate2</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>=
-</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>p</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>.</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>get_state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>player::Stopped&amp;</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;();</FONT></FONT></CODE></P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>Depending on your personal
-taste.</FONT></FONT></P>
-<H2 CLASS="western"><A NAME="5.3.Copying|outline"></A>Copying</H2>
-<P STYLE="margin-bottom: 0cm">As the framework creates automatically
-all the states, it has to manage copying a state machine. Once again,
-a policy enables this.
-</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">First you need to know that all the
-states are created and given to a boost::shared_ptr following the
-RAII principle. Copying would therefore mean by default shallow
-copying and if states have data, or worse self-managed pointers, Bad
-Things happen.</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm">To avoid accidents, assignment and copy
-constructors are deactivated by default. Too many accidents happened
-because of accidental copies.</P>
-<P STYLE="margin-bottom: 0cm">Now, it is possible to copy, but you
-must state it explicitly. But which copy? Shallow? Deep? Why to pay
-for a deep copy if you don't want it? The choice is yours. The
-default policy is NoCopy, but ShallowCopy and DeepCopy policies are
-also provided. You can use it like:</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff">struct</FONT></CODE><CODE>
-player: </CODE><CODE><FONT COLOR="#0000ff">public</FONT></CODE><CODE>
-state_machine&lt;player,NoHistory,DeepCopy&gt;</CODE></P>
-<H2 CLASS="western"><A NAME="7.4.Exceptions|outline"></A><CODE><FONT FACE="Albany, sans-serif">Exceptions</FONT></CODE></H2>
-<P><CODE><FONT FACE="Times New Roman, serif">Normally, you should not
-need exceptions. UML also says little about exceptions. To handle
-error, the best UML-safe method is to add an orthogonal zone, like
-previously shown.</FONT></CODE></P>
-<P><CODE><FONT FACE="Times New Roman, serif">Now, errors happen. In
-this case, the state machine is said to be unstable, because some
-exit, actions or entries may have executed. The framework offers a
-chance to set it straight by catching </FONT></CODE><CODE><FONT FACE="Courier New, monospace">std::exception</FONT></CODE><CODE>
-</CODE><CODE><FONT FACE="Times New Roman, serif">and calling: </FONT></CODE>
-</P>
-<P><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>void</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>exception_caught
-(std::exception&amp; e)</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Thus
-giving you a chance to handle the exception.</FONT></FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<H2 CLASS="western"><A NAME="Helpers methods|outline"></A><CODE><FONT COLOR="#000000"><FONT FACE="Albany, sans-serif"><FONT SIZE=4>Helpers
-methods</FONT></FONT></FONT></CODE></H2>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>msm::state_machine
-also provides a few helper methods which you might need but will
-probably not:</FONT></FONT></FONT></CODE></P>
-<UL>
- <LI><P><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>const</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>std</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>::</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>vector</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>&lt;</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>int</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;&amp;
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>current_state</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>()
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>const</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>:
- the ids of currently active states</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>const</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>BaseState</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>*
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>get_state_by_id</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>(</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>int</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>id</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>)
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>const</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>:
- returns the state with the given id as a pointer to a (user- or
- default-) base state.</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>bool</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>is_contained</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>()
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>const</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>:
- returns true if the state machine is used as a composite in another
- state machine, false otherwise.</FONT></FONT></FONT></CODE></P>
-</UL>
-<P><BR><BR>
-</P>
-<H2 CLASS="western"><A NAME="Getting more speed|outline"></A><CODE><FONT COLOR="#000000"><FONT FACE="Albany, sans-serif"><FONT SIZE=4>Getting
-more speed</FONT></FONT></FONT></CODE></H2>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Msm
-is offering many features at a high-speed, but sometimes, for example
-in embedded systems, you need more speed and are ready to give up
-some features in exchange.</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>A
-</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>process_event</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>is
-doing 5 different jobs:</FONT></FONT></FONT></CODE></P>
-<UL>
- <LI><P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>checking
- for terminate/interrupt states</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>handling
- the message queue (for entry/exit/transition actions generating
- themselves events)</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>handling
- deferred events</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>catching
- exceptions</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>handling
- the state switching and action calls</FONT></FONT></FONT></CODE></P>
-</UL>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Of
-these jobs, only the last is absolutely necessary to a state machine
-(its core job), the other ones are nice-to-haves which cost CPU time.
-In many cases, it is not so important, but in embedded systems, this
-can lead to ad-hoc state machine implementations.</FONT></FONT></FONT></CODE></P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Msm
-detects itself if a concrete state machine makes use of
-terminate/interrupt states and deferred events and deactivates them
-if not used. For the other two, if you want them out, you need to
-help by indicating in your implementation that you want them out.
-This is done with two simple typedefs, for example:</FONT></FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#008000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>//
-Concrete FSM implementation </FONT></FONT></FONT></CODE>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">player</FONT><FONT COLOR="#000000"> :
-</FONT><FONT COLOR="#0000ff">public</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">state_machine</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#030003">player</FONT><FONT COLOR="#000000">&gt;</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>{</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=3>//
-no need for exception handling or message queue</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><FONT COLOR="#0000ff">typedef</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#0000ff">int</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">no_exception_thrown</FONT><FONT COLOR="#000000">;</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><FONT COLOR="#0000ff">typedef</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#0000ff">int</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">no_message_queue</FONT><FONT COLOR="#000000">;</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT SIZE=3>...</FONT></FONT></CODE><CODE><FONT COLOR="#008000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>//
-rest of implementation</FONT></FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>What
-is the gain? It will depend on your compiler and target system, so
-please refer to the performance page
-(where an example is also provided). If you use none of these
-nice-to-haves, a </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>process_event</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>can
-execute up to 4 times faster. On my Q6600, an average transition
-execution lasts 45ns with a full state machine, 10ns in the minimal
-case.</FONT></FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<H1 CLASS="western"><A NAME="8.Customizing states|outline"></A><CODE><FONT COLOR="#000000"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><SPAN STYLE="font-style: normal">Customizing
-states</SPAN></FONT></FONT></FONT></CODE></H1>
-<P>By default, all states derive from msm::default_base_state, which
-is neither polymorphic nor has other useful purpose than to define a
-base for all states. The following part will describe the
-customization possibilities offered by Msm.</P>
-<H2 CLASS="western"><A NAME="User-defined base state / Polymorphic states|outline"></A>
-<CODE><FONT COLOR="#000000"><FONT FACE="Albany, sans-serif"><FONT SIZE=3>User-defined
-base state / Polymorphic states</FONT></FONT></FONT></CODE></H2>
-<P>Sometimes you will need states to be polymorphic. You might want
-to use <FONT FACE="Times New Roman, serif">typeid</FONT> on them,
-like the tutorials do for logging.</P>
-<P>You might also need some added functionality in form of a virtual
-function.</P>
-<P>Msm offers these possibilities by allowing the base state to be
-user-defined. To do this, you need two simple changes:</P>
-<UL>
- <LI><P>add the non-default base state in your <FONT FACE="Courier New, monospace">msm::state&lt;&gt;
- </FONT>definition, as first template argument (except for
- <FONT FACE="Courier New, monospace">interrupt_states</FONT> for
- which it is the second argument, the first one being the event
- ending the interrupt), for example, <FONT FACE="Courier New, monospace">my_base_state</FONT>
- being your new base state for <U>all states</U> in a given state
- machine: <BR><CODE><FONT COLOR="#0000ff"><FONT SIZE=3>struct</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=3>Empty</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=3>: </FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=3>public</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=3>state</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=3>&lt;my_base_state&gt;</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2><BR></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Now,
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>my_base_state</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>is
- your new base state. If it has a virtual function, your states
- become polymorphic. Msm also provides a default polymorphic base
- type for your convenience, </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>msm::polymorphic_</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>state</FONT></FONT></FONT></CODE></P>
- <LI><P><CODE><FONT COLOR="#030003"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Add
- the user-defined base state in the state machine definition, as a
- third template argument (after History), for example:<BR></FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>struct</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>player
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>:
- </FONT></FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace"><FONT SIZE=3>public</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000">
- </FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>state_machine</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>&lt;</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>player</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>,</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>NoHistory</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>,</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT FACE="Courier New, monospace"><FONT SIZE=3>my_base_state</FONT></FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>&gt;</FONT></FONT></FONT></CODE></P>
-</UL>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>You
-now have polymorphic states. Please have a look at <A HREF="SM-0arg.cpp">an
-example using polymorphic states</A> and the concept presented in the
-next paragraph, visitors.</FONT></FONT></FONT></CODE></P>
-<H2 CLASS="western"><A NAME="Visiting active states|outline"></A><FONT SIZE=3>Visiting
-active states</FONT></H2>
-<P><FONT SIZE=3>In some cases, having only the id or a
-pointer-to-base of the currently active states is not enough. You
-might want to call non-virtually a method of the currently active
-states. It will not be said that Msm forces the <FONT FACE="Courier New, monospace">virtual</FONT>
-keyword down your throat! </FONT>
-</P>
-<P><FONT SIZE=3>To achieve this goal, Msm provides its own variation
-of a visitor pattern using the previously described user-defined
-state technique. If you add to your user-defined base state an
-<FONT FACE="Courier New, monospace">accept_sig</FONT> typedef giving
-the return value (unused for the moment) and signature and provide an
-<FONT FACE="Courier New, monospace">accept</FONT> method with the
-same signature, calling <FONT FACE="Courier New, monospace">state_machine::visit_current_states</FONT>
-will cause <FONT FACE="Courier New, monospace">accept</FONT> to be
-called on the currently active states. Typically, you will also want
-to provide an empty default <FONT FACE="Courier New, monospace">accept</FONT>
-in your base state in order to not force all your states to implement
-<FONT FACE="Courier New, monospace">accept</FONT>. For example your
-base state could be:</FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><FONT COLOR="#0000ff"><FONT FACE="Courier New, monospace">struct</FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003"><FONT FACE="Courier New, monospace">my_visitable_state</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>{</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-signature of the accept function</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">typedef</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">args</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000">&gt;
-</FONT><FONT COLOR="#030003">accept_sig</FONT><FONT COLOR="#000000">;</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-we also want polymorphic states</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">virtual</FONT><FONT COLOR="#000000">
-~</FONT><FONT COLOR="#030003">my_visitable_state</FONT><FONT COLOR="#000000">()
-{}</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-default implementation for states who do not need to be visited</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">accept</FONT><FONT COLOR="#000000">()
-</FONT><FONT COLOR="#0000ff">const</FONT><FONT COLOR="#000000"> {}</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>};</FONT></FONT></FONT></P>
-<P><BR><BR>
-</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>This makes your states
-polymorphic and visitable. In this case, </FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>accept</FONT></FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#000000"><FONT SIZE=3>is made const and takes no
-argument. It could also be:</FONT></FONT></P>
-<P><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">SomeVisitor</FONT><FONT COLOR="#000000">
-{&hellip;};</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">my_visitable_state</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>{</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-signature of the accept function</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">typedef</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">args</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#030003">SomeVisitor</FONT><FONT COLOR="#000000">&amp;&gt;
-</FONT><FONT COLOR="#030003">accept_sig</FONT><FONT COLOR="#000000">;</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-we also want polymorphic states</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">virtual</FONT><FONT COLOR="#000000">
-~</FONT><FONT COLOR="#030003">my_visitable_state</FONT><FONT COLOR="#000000">()
-{}</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-default implementation for states who do not need to be visited</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">accept</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#030003">SomeVisitor</FONT><FONT COLOR="#000000">&amp;)
-</FONT><FONT COLOR="#0000ff">const</FONT><FONT COLOR="#000000"> {}</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>};</FONT></FONT></FONT></P>
-<P><BR><BR>
-</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>And now, </FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>accept</FONT></FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#000000"><FONT SIZE=3>will take one argument. It
-could also be non-const. </FONT></FONT>
-</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>By default, </FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>accept</FONT></FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#000000"><FONT SIZE=3>takes up to 2 arguments. To
-get more, simply #define </FONT></FONT><FONT COLOR="#030003"><FONT SIZE=2>BOOST_MSM_VISITOR_ARG_SIZE</FONT></FONT><FONT COLOR="#030003">
-</FONT><FONT COLOR="#030003"><FONT SIZE=3>to another value before
-including state_machine.hpp. For example:</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">#define</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">BOOST_MSM_VISITOR_ARG_SIZE</FONT><FONT COLOR="#000000">
-3</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">#include</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#a31515">&lt;boost/msm/state_machine.hpp&gt;</FONT></FONT></FONT></P>
-<P><FONT COLOR="#030003"><FONT SIZE=3>...</FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">struct</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">my_visitable_state</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>{</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-signature of the accept function</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">typedef</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">args</FONT><FONT COLOR="#000000">&lt;</FONT><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#030003">SomeVisitor</FONT><FONT COLOR="#000000">&amp;,</FONT><FONT COLOR="#0000ff">int</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">const</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#0000ff">char</FONT><FONT COLOR="#000000">*&gt;
-</FONT><FONT COLOR="#030003">accept_sig</FONT><FONT COLOR="#000000">;</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-we also want polymorphic states</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">virtual</FONT><FONT COLOR="#000000">
-~</FONT><FONT COLOR="#030003">my_visitable_state</FONT><FONT COLOR="#000000">()
-{}</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>//
-default implementation for states who do not need to be visited. Not
-const</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#030003">accept</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#030003">SomeVisitor</FONT><FONT COLOR="#000000">&amp;,</FONT><FONT COLOR="#0000ff">int</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">const</FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#0000ff">char</FONT><FONT COLOR="#000000">*) {}</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>};</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><FONT SIZE=3><FONT COLOR="#000000">You
-now only need implement </FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace">accept</FONT></FONT><FONT COLOR="#000000">
-in states needing it. Note that </FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace">accept</FONT></FONT><FONT COLOR="#000000">
-will be called on ALL active states but not automatically on
-substates of a composite. You can however choose to have it called by
-calling </FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace">visit_current_states</FONT></FONT><FONT COLOR="#000000">
-in the </FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace">accept</FONT></FONT><FONT COLOR="#000000">
-of the composite.</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><FONT SIZE=3><FONT COLOR="#000000"><U>Important
-warning:</U></FONT><FONT COLOR="#000000"> The method
-</FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace">visit_current_states</FONT></FONT><FONT COLOR="#000000">
-takes its parameter by value, so if the signature of the accept
-function is to contain a parameter passed by reference, pass this
-parameter with a boost:ref/cref to avoid undesired copies or slicing.
-So, for example, in the above case, call:</FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT SIZE=3><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">SomeVisitor</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">
-</SPAN></FONT></FONT><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">vis</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">;</SPAN></FONT></FONT></FONT></FONT></P>
-<P STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">sm</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">.</SPAN></FONT></FONT><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">visit_current_states</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">(</SPAN></FONT></FONT><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">boost</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">::</SPAN></FONT></FONT><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">ref</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">(</SPAN></FONT></FONT><FONT COLOR="#030003"><FONT SIZE=2><SPAN LANG="">vis</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">));</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=3>
-</FONT></FONT></FONT>
-</P>
-<P STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>Please
-have a look at the example using accept <A HREF="SM-0arg.cpp">with 0
-argument</A>, with 1, and <A HREF="SM-3arg.cpp">with
-3</A>.</FONT></FONT></FONT></P>
-<H1 CLASS="western"><A NAME="9.Performance|outline"></A><A NAME="8.Performance|outline"></A>
-Performance</H1>
-<P>Tests were made on different PCs running either Windows XP and
-Vista and compiled with VC9 SP1 or Ubuntu and compiled with g++
-4.2.3.</P>
-<P>For these tests, the same player state machine was written using
-Boost.Statechart and Msm, as a <A HREF="SC%20Simple.cpp">state
-machine with only simple states</A> and as a <A HREF="SC%20Composite.cpp">state
-machine with a composite state</A>. As these simple machines need no
-terminate/interrupt states, no message queue and have no-throw
-guarantee on their actions, the tests are made in full- and minimum-
-functionalities.</P>
-<P>Minimum (no exception handling, no message queue):</P>
-<P>VC9:</P>
-<UL>
- <LI><P>the simple test completes 38 times faster with Msm than with
- Boost.Statechart</P>
- <LI><P>the composite test completes 4 times faster with Msm</P>
-</UL>
-<P>gcc 4.2.3:</P>
-<UL>
- <LI><P>the simple test completes 16 times faster with Msm</P>
- <LI><P>the composite test completes 9 times faster with Msm</P>
-</UL>
-<P>gcc 3.3:</P>
-<UL>
- <LI><P>the simple test completes 9-12 times faster with Msm</P>
- <LI><P>the composite compile but does not work (events of composites
- lead to no_transition)</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Full:</P>
-<P>VC9:</P>
-<UL>
- <LI><P>the simple test completes 12 times faster with Msm than with
- Boost.Statechart</P>
- <LI><P>the composite test completes 3 times faster with Msm</P>
-</UL>
-<P>gcc 4.2.3:</P>
-<UL>
- <LI><P>the simple test completes 10 times faster with Msm</P>
- <LI><P>the composite test completes 9-10 times faster with Msm</P>
-</UL>
-<P>gcc 3.3:</P>
-<UL>
- <LI><P>the simple test completes 9 times faster with Msm</P>
- <LI><P>the composite compile but does not work (events of composites
- lead to no_transition)</P>
-</UL>
-<H1 CLASS="western" STYLE="margin-left: 0.66cm; text-indent: -0.83cm"><A NAME="8.Compilers|outline"></A>
-Compilers</H1>
-<P>Msm was successfully tested with:</P>
-<UL>
- <LI><P>VC8,VC9, VC9SP1</P>
- <LI><P>g++ 4.1 and g++ 4.2.3</P>
- <LI><P>partially g++ 3.3-3.4 (only <A HREF="SC%20Simple.cpp">simple
- state machines</A>). Composite state machines will compile but not
- work properly.</P>
-</UL>
-<H1 CLASS="western" STYLE="margin-left: 0.68cm; text-indent: -0.76cm"><A NAME="8.Limitations|outline"></A>
-Limitations</H1>
-<UL>
- <LI><P>Compilation times that are going to make you storm the CFO's
- office and make sure you get a shiny octocore with 8GB RAM by next
- week, unless he's interested in paying you watch the compiler
- agonize for hours... (Make sure you ask for dual 24&quot; as well,
- it doesn't hurt).</P>
- <LI><P>Quick need to overwrite the mpl::vector/list
- default-size-limit of 20.</P>
-</UL>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="8.Acknowledgments|outline"></A>
-Acknowledgments</H1>
-<UL>
- <LI><P>This framework is based on the brilliant work of David
- Abrahams and Aleksey Gurtovoy who laid down the base and the
- principles of the framework in their excellent book, &ldquo;C++
- template Metaprogramming&rdquo;. The implementation also makes heavy
- use of the boost::mpl.</P>
- <LI><P>Other libraries from Boost also helped me much, like
- Boost.Bind, Boost.Function, Boost.Shared_ptr.</P>
- <LI><P>Special thanks to my beta testers, <A HREF="mailto:woch%20AT%20hrz%20DOT%20tu%20MINUS%20chemnitz%20DOT%20de">Christoph
- Woskowski</A> and <A HREF="mailto:f%20DOT%20alt%20AT%20gmx%20DOT%20net">Franz
- Alt</A> for using the framework with little documentation and to my
- private reviewer, <A HREF="mailto:%20edouard%20DOT%20alligand%20AT%20bureau14%20DOT%20fr">Edouard
- Alligand</A>.</P>
- <LI><P>Thanks to Jeff Flinn for his idea of the user-defined base
- state.</P>
-</UL>
-<P><BR><BR>
-</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="9.Questions &amp; Answers|outline"></A>
-Questions &amp; Answers</H1>
-<P><U>Question</U>: on_entry gets an argument, the sent event. What
-event do I get when the state becomes default-activated (because it
-is an initial state)?</P>
-<P><U>Answer</U>: To allow you to know that the state was
-default-activated, Msm generates a boost::msm::InitEvent default
-event.</P>
-<P><BR><BR>
-</P>
-<P><U>Question</U>: Why do I see no call to <FONT FACE="Courier New, monospace">no_transition</FONT>
-in my composite state?</P>
-<P><U>Answer</U>: Because of the priority rule defined by UML. It
-says that in case of transition conflict, the most inner state has a
-higher priority. So after asking the inner state, the containing
-composite has to be also asked to handled the transition. So it makes
-more sense to call his <FONT FACE="Courier New, monospace">no_transition</FONT>.</P>
-<P><BR><BR>
-</P>
-<P><U>Question</U>: Why do I get a compile error saying the compiler
-cannot convert to a function ...<FONT FACE="Courier New, monospace">Fsm::*(some_event)</FONT>?</P>
-<P><U>Answer</U>: Probably you defined a transition triggered by the
-event <FONT FACE="Courier New, monospace">some_event</FONT>, but used
-a guard/action method taking another event.</P>
-<P><BR><BR>
-</P>
-<P><U>Question</U>: Why do I get a compile error saying something
-like &ldquo;too few&rdquo; or &ldquo;too many&rdquo; template
-arguments?</P>
-<P><U>Answer</U>: Probably you defined a transition in form of a
-a_row where you wanted just a _row or the other way around.</P>
-<P><BR><BR>
-</P>
-<P><U>Question</U>: Why do I get a very long compile error when I
-define more than 20 rows in the transition table?</P>
-<P><U>Answer</U>: Msm uses Boost.MPL under the hood and this is the
-default maximum size. Please define the following 2 macros before
-including headers:</P>
-<DIV ID="limit-vector-size" DIR="LTR">
- <P><BR><BR>
- </P>
- <DIV ID="configuration-limit-example" DIR="LTR">
- <PRE>#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
-#define BOOST_MPL_LIMIT_VECTOR_SIZE 30 // or whatever you need</PRE>
- </DIV>
-</DIV>
-<P><BR><BR>
-</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="10.Case Studies|outline"></A>
-Case Studies</H1>
-<H2 CLASS="western">Explicit Entry vs Orthogonal zones</H2>
-<P>Let us try to implement the state machine defined in a paper from
-David Harel (Figure 8 in
-http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf).</P>
-<P>We will discuss here two possible implementations. The first one,
-shown in the figure 8, is using the UML equivalent of what Harel uses
-in this chart, explicit entries, described in a <A HREF="#The many ways to enter a composite state|outline">previous
-tutorial.</A></P>
-<P>Please have a look at the <A HREF="HarelWithEntry.cpp">source code
-implementation with Msm</A>.</P>
-<P>The biggest advantage of using this method is that the code is
-very simple and easy to understand.</P>
-<P><BR><BR>
-</P>
-<P>Now, this method has quite a few disadvantages.
-</P>
-<P>First, we notice that &ldquo;alarm-beeps&rdquo; has an
-implementation visible to the outside world. This particularity is
-being used and this leads to three states with close names, &ldquo;alarm1
-beeps&rdquo;, &ldquo;alarm2 beeps&rdquo;, &ldquo;both beep&rdquo;. If
-you think that this starts sounding like duplication of information,
-you are not the only one. The second point is about design and reuse.
-Let us imagine what could happen if Harel really was working for a
-company producing watches.</P>
-<UL>
- <LI><P>Harel would implement this state machine.</P>
- <LI><P>Some time later, he would be asked to do the same for a new
- model of watch. But this model would have 3 alarms.</P>
- <LI><P>Or maybe 4 alarms?</P>
- <LI><P>The alarm could be triggered with only a few seconds
- interval.</P>
-</UL>
-<P><BR><BR>
-</P>
-<P>Please keep in mind that these companies produce hundreds of
-slightly different products, which makes this quite a realistic
-scenario.</P>
-<P>What would be the result? New states like &ldquo;alarm3 beeps&rdquo;
-or &ldquo;three beep&rdquo; + &ldquo;both beep&rdquo; (backward
-compatibility). Maintenance would quickly become a nightmare. The
-reason? A breach of encapsulation caused by &ldquo;alarm beeps&rdquo;
-letting other state machines use its internals.</P>
-<P>Luckily, UML provides not only the dangerous explicit entry
-weapons but also some much more powerful ones, which Msm also
-supports, for example orthogonal zones and instances of a same state
-machine.</P>
-<P>Let us redesign Alarm-Beeps by:</P>
-<UL>
- <LI><P>encapsulating the alarm functionality in its own state
- (machine).</P>
- <LI><P>defining orthogonal zones, one for each sub alarm instance.
- This way it can easily be extended to support new alarms. This leads
- to the following diagram:</P>
-</UL>
-<P><IMG SRC="index_html_m743a147d.jpg" NAME="graphics8" ALIGN=LEFT WIDTH=693 HEIGHT=648 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P><BR><BR>
-</P>
-<P>As you see, it is quite simple. You only need define an instance
-of Alarm in each zone. To add a new alarm is as simple as adding a
-new instance. The Alarm submachine is simply defined as:</P>
-<P><IMG SRC="index_html_m312ff8f2.jpg" NAME="graphics9" ALIGN=LEFT WIDTH=584 HEIGHT=382 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P><BR><BR>
-</P>
-<P>All what still has to be done is to forward the event in the entry
-method of alarmBeeps to give each alarm instance a chance to handle
-or reject the event in its <FONT FACE="Courier New, monospace">check_beep</FONT>
-guard condition.</P>
-<P>To make implementation easier, each alarm is identified by a bit
-and <FONT FACE="Courier New, monospace">check_beep </FONT>is simply
-calling operator&amp; to decide if it wants to accept the event.</P>
-<P>How are instances defined with Msm? Msm knows only types, not
-instances, so you need to define Alarms as:
-</P>
-<P><FONT COLOR="#0000ff"><FONT SIZE=3>template</FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#000000"><FONT SIZE=3>&lt;</FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=3>int</FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#000000"><FONT SIZE=3>Index&gt; </FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=3>struct</FONT></FONT><FONT COLOR="#000000">
-</FONT><FONT COLOR="#000000"><FONT SIZE=3>Alarm...</FONT></FONT></P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>And identify each instance in
-alarmBeeps as Alarm&lt;1&gt;, Alarm&lt;2&gt;, etc. in the
-<FONT FACE="Courier New, monospace">initial_state</FONT> typedef of
-alarmBeeps, which can therefore do without a single row in its
-transition table:</FONT></FONT></P>
-<P><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>typedef
-mpl::vector&lt;Alarm&lt;1&gt;,Alarm&lt;2&gt; &gt; initial_state;</FONT></FONT></FONT></P>
-<P>This way, if Harel ever needs to support a third alarm, he simply
-needs a third entry in this typedef.</P>
-<P><FONT COLOR="#000000"><FONT SIZE=3>Please have a look at the
-example not using any explicit entry.</FONT></FONT></P>
-<P>As g++ refuses to accept template state machines, you might need a
-small workaround: define alarms as a non-template type, then derive
-each instance from this base type, like:</P>
-<P><FONT FACE="Courier New, monospace">struct AlarmImpl : public
-state_machine&lt;AlarmImpl &gt;...</FONT></P>
-<P><FONT FACE="Courier New, monospace">struct Alarm1 : public
-AlarmImpl...</FONT></P>
-<P><FONT FACE="Courier New, monospace">struct Alarm2 : public
-AlarmImpl...</FONT></P>
-<P>An example is also
-provided.</P>
-<P><BR><BR>
-</P>
-<P>Which of both methods should you use? It is a matter of taste and
-you will hear different opinions from different designers. If you
-need something fast and with a short life cycle, then you could
-consider the method with explicit entries. If you are more interested
-in reusable design, then the method using instances is for you.</P>
-<H1 CLASS="western" STYLE="page-break-before: always"><A NAME="12.Annex A Debugging|outline"></A><A NAME="10.Annex A Debugging|outline"></A>
-Annex A Debugging</H1>
-<P>Normally, one does not need to know the ids generated for all the
-states of a state machine, unless for debugging purposes, like the
-<FONT FACE="Courier New, monospace">pstate</FONT> function does in
-the tutorials in order to display the name of the current state. The
-next annex will show how to automatically display typeid-generated
-names, but these are not very readable on all platforms, so it can
-help to know how the ids are generated.
-</P>
-<P>The ids are generated using the transition table, from the &ldquo;Start&rdquo;
-column up to down, then from the &ldquo;Next&rdquo; column, up to
-down,like shown in the next image:</P>
-<P><BR><BR>
-</P>
-<P><IMG SRC="index_html_m2ed87c03.jpg" NAME="graphics6" ALIGN=LEFT WIDTH=759 HEIGHT=516 BORDER=0><BR CLEAR=LEFT><BR><BR>
-</P>
-<P><FONT FACE="Courier New, monospace">Stopped</FONT> will get id 0,
-<FONT FACE="Courier New, monospace">Open</FONT> id 1, <FONT FACE="Courier New, monospace">ErrorMode</FONT>
-id 6 and <FONT FACE="Courier New, monospace">SleepMode</FONT> (seen
-only in the &ldquo;Next&rdquo; column) id 7.</P>
-<P>If you have some implicitly created states, like transition-less
-initial states or states created using the <FONT FACE="Courier New, monospace"><FONT SIZE=3>explicit_creation</FONT></FONT>
-typedef, these will be added as a source at the end of the transition
-table.</P>
-<P>If you have composite states, a row will be added for them at the
-end of the table, after the automatically or explicitly created
-states, which can change their id.</P>
-<P><BR><BR>
-</P>
-<P>The next help you will need for debugging would be to call the
-<FONT FACE="Courier New, monospace">current_state</FONT> method of
-the <FONT FACE="Courier New, monospace">state_machine</FONT> class,
-then the <FONT FACE="Courier New, monospace">display_type</FONT>
-helper to generate a readable name from the id.</P>
-<P>If you do not want to go through the transition table to fill an
-array of names, the library provides another helper,
-<FONT FACE="Courier New, monospace">fill_state_names</FONT>, which,
-given an array of sufficient size (please see Annex B to know how
-many states are defined in the state machine), will fill it with
-typeid-generated names.</P>
-<H1 CLASS="western"><A NAME="13.Annex B Metaprogramming tools|outline"></A><A NAME="12.Annex B Metaprogramming tools|outline"></A><A NAME="12.Annex B Metaprogramming tools|outline"></A>
-Annex B Metaprogramming tools</H1>
-<P>We can find for the transition table even more uses than what we
-have seen so far. Let's suppose you need to write a coverage tool. A
-state machine would be perfect for such a job, if only it could
-provide some information about its structure. As a matter of fact,
-thanks to the transition table and Boost.Mpl, it does.</P>
-<P><BR><BR>
-</P>
-<P>What would you need for a coverage tool? You'd probably need to
-know how many states are defined in the state machine, and how many
-events can be fired. This way you could log the fired events and the
-states visited in the life of a concrete machine and be able to
-perform some coverage analysis, like &ldquo;fired 65% of all possible
-events and visited 80% of the states defined in the state machine&rdquo;.</P>
-<P>To achieve this, Msm provides a few useful tools:</P>
-<UL>
- <LI><P><FONT FACE="Courier New, monospace">generate_state_set&lt;transition
- table&gt;</FONT>: returns a mpl::set of all the states defined in
- the table.</P>
- <LI><P><FONT FACE="Courier New, monospace">generate_event_set&lt;transition
- table&gt;</FONT><FONT FACE="Times New Roman, serif">: returns a
- mpl::set of all the events defined in the table.</FONT></P>
- <LI><P><FONT FACE="Times New Roman, serif">Using </FONT><FONT FACE="Courier New, monospace">mpl::size&lt;&gt;::value</FONT>
- <FONT FACE="Times New Roman, serif">you can get the number of
- elements in the set.</FONT></P>
- <LI><P><FONT FACE="Courier New, monospace">display_type </FONT><FONT FACE="Times New Roman, serif">defines
- an </FONT><FONT FACE="Courier New, monospace">operator()</FONT>
- <FONT FACE="Times New Roman, serif">sending t</FONT><FONT FACE="Courier New, monospace">ypeid(Type).name()
- </FONT><FONT FACE="Times New Roman, serif">to </FONT><FONT FACE="Courier New, monospace">cout</FONT><FONT FACE="Times New Roman, serif">.</FONT></P>
- <LI><P><FONT FACE="Times New Roman, serif">Using a mpl::for_each on
- the result of </FONT><FONT FACE="Courier New, monospace">generate_state_set
- </FONT><FONT FACE="Times New Roman, serif">and</FONT>
- <FONT FACE="Courier New, monospace">generate_event_set </FONT><FONT FACE="Times New Roman, serif">passing
- </FONT><FONT FACE="Courier New, monospace">display_type</FONT> <FONT FACE="Times New Roman, serif">as
- argument will display all the states of the state machine.</FONT></P>
- <LI><P><FONT FACE="Times New Roman, serif">Let's suppose you need
- even more and recursively find the states and events defined in the
- composite states and thus also having a transition table. No
- problem! Calling </FONT><FONT FACE="Courier New, monospace">recursive_get_transition_table&lt;Composite&gt;</FONT>
- <FONT FACE="Times New Roman, serif">will return you the transition
- table of the composite state, recursively adding the transition
- tables of all sub-state machines and sub-sub...-sub-state machines.
- Then call </FONT><FONT FACE="Courier New, monospace">generate_state_set
- </FONT><FONT FACE="Times New Roman, serif">or</FONT>
- <FONT FACE="Courier New, monospace">generate_event_set </FONT><FONT FACE="Times New Roman, serif">on
- the result to get the full list of states and events. </FONT>
- </P>
-</UL>
-<P><BR><BR>
-</P>
-<P><FONT FACE="Times New Roman, serif">Again, please have a look at
-the end of this example to see the tools in
-action.</FONT></P>
-</BODY>
-</HTML>
\ No newline at end of file

Deleted: sandbox/msm/libs/msm/doc/index_html_166e0165.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_2cb96cb.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_2cffc008.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_55a3569b.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_573c91b1.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_583f47ba.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_632a9e9a.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_64d3c88c.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_757a2a53.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m15cfca99.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m23e6b7d5.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m26c048b0.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m2ed87c03.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m312ff8f2.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m6fc8a34.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m73d8a201.jpg
==============================================================================
Binary file. No diff available.

Deleted: sandbox/msm/libs/msm/doc/index_html_m743a147d.jpg
==============================================================================
Binary file. No diff available.

Added: sandbox/msm/libs/msm/doc/logging_functors.h
==============================================================================
--- (empty file)
+++ sandbox/msm/libs/msm/doc/logging_functors.h 2009-11-09 17:25:04 EST (Mon, 09 Nov 2009)
@@ -0,0 +1,303 @@
+#ifndef LOGGING_FUNCTORS
+#define LOGGING_FUNCTORS
+
+struct Empty_Entry : euml_action<Empty_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Empty" << std::endl;
+ }
+};
+struct Empty_Exit : euml_action<Empty_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: Empty" << std::endl;
+ }
+};
+
+struct Open_Entry : euml_action<Open_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Open" << std::endl;
+ }
+};
+struct Open_Exit : euml_action<Open_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: Open" << std::endl;
+ }
+};
+
+struct Stopped_Entry : euml_action<Stopped_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Stopped" << std::endl;
+ }
+};
+struct Stopped_Exit : euml_action<Stopped_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: Stopped" << std::endl;
+ }
+};
+
+struct AllOk_Entry : euml_action<AllOk_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "starting: AllOk" << std::endl;
+ }
+};
+struct AllOk_Exit : euml_action<AllOk_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "finishing: AllOk" << std::endl;
+ }
+};
+
+struct ErrorMode_Entry : euml_action<ErrorMode_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "starting: ErrorMode" << std::endl;
+ }
+};
+struct ErrorMode_Exit : euml_action<ErrorMode_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "finishing: ErrorMode" << std::endl;
+ }
+};
+
+struct Playing_Entry : euml_action<Playing_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: Playing" << std::endl;
+ }
+};
+struct Playing_Exit : euml_action<Playing_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: Playing" << std::endl;
+ }
+};
+
+struct Song1_Entry : euml_action<Song1_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "starting: First song" << std::endl;
+ }
+};
+struct Song1_Exit : euml_action<Song1_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "finishing: First Song" << std::endl;
+ }
+};
+
+struct Song2_Entry : euml_action<Song2_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "starting: Second song" << std::endl;
+ }
+};
+struct Song2_Exit : euml_action<Song2_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "finishing: Second Song" << std::endl;
+ }
+};
+
+struct Song3_Entry : euml_action<Song3_Entry>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "starting: Third song" << std::endl;
+ }
+};
+struct Song3_Exit : euml_action<Song3_Exit>
+{
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "finishing: Third Song" << std::endl;
+ }
+};
+
+// transition actions for Playing
+struct start_next_song : euml_action<start_next_song>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ std::cout << "Playing::start_next_song" << endl;
+ }
+};
+struct start_prev_song : euml_action<start_prev_song>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ std::cout << "Playing::start_prev_song" << endl;
+ }
+};
+
+// transition actions
+struct start_playback : euml_action<start_playback>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::start_playback" << endl;
+ }
+};
+struct open_drawer : euml_action<open_drawer>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::open_drawer" << endl;
+ }
+};
+struct close_drawer : euml_action<close_drawer>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::close_drawer" << endl;
+ }
+};
+struct store_cd_info : euml_action<store_cd_info>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const&, FSM& ,SourceState& ,TargetState& )
+ {
+ cout << "player::store_cd_info" << endl;
+ // it is now easy to use the message queue.
+ // alternatively to the proces_ in the transition table, we could write:
+ // fsm.process_event(play());
+ }
+};
+struct stop_playback : euml_action<stop_playback>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::stop_playback" << endl;
+ }
+};
+struct pause_playback : euml_action<pause_playback>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::pause_playback" << endl;
+ }
+};
+struct resume_playback : euml_action<resume_playback>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::resume_playback" << endl;
+ }
+};
+struct stop_and_open : euml_action<stop_and_open>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::stop_and_open" << endl;
+ }
+};
+struct stopped_again : euml_action<stopped_again>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::stopped_again" << endl;
+ }
+};
+
+struct report_error : euml_action<report_error>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::report_error" << endl;
+ }
+};
+
+struct report_end_error : euml_action<report_end_error>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM&,SourceState& ,TargetState& )
+ {
+ cout << "player::report_end_error" << endl;
+ }
+};
+enum DiskTypeEnum
+ {
+ DISK_CD=0,
+ DISK_DVD=1
+ };
+// guard conditions
+struct good_disk_format : euml_action<good_disk_format>
+{
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ bool operator()(EVT const& evt,FSM&,SourceState& ,TargetState& )
+ {
+ // to test a guard condition, let's say we understand only CDs, not DVD
+ if (evt.template get_attribute<1>()!=DISK_CD)
+ {
+ std::cout << "wrong disk, sorry" << std::endl;
+ // just for logging, does not block any transition
+ return true;
+ }
+ std::cout << "good disk" << std::endl;
+ return true;
+ }
+};
+
+// Handler called when no_transition detected
+struct Log_No_Transition : euml_action<Log_No_Transition>
+{
+ template <class FSM,class Event>
+ void operator()(Event const& e,FSM&,int state)
+ {
+ std::cout << "no transition from state " << state
+ << " on event " << typeid(e).name() << std::endl;
+ }
+};
+
+#endif // LOGGING_FUNCTORS


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