mirror of
https://github.com/boostorg/msm.git
synced 2026-02-19 02:22:17 +00:00
added missing example + doc item (phoenix)
[SVN r72035]
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Front-end</title><link rel="stylesheet" href="boostbook.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.2"><link rel="home" href="index.html" title="Meta State Machine (MSM) V2.20"><link rel="up" href="pt02.html" title="Part II. Reference"><link rel="prev" href="re02.html" title="Back-end"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Front-end</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re02.html">Prev</a> </td><th width="60%" align="center">Part II. Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="Front-end"><a name="d0e5311"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Front-end — The front-end headers</p></div><div class="refsect1" title="msm/front/common_states.hpp"><a name="d0e5317"></a><h2>msm/front/common_states.hpp</h2><p>This header contains the predefined types to serve as base for states or state machines:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>default_base_state: non-polymorphic empty type.</p></li><li class="listitem"><p>polymorphic_state: type with a virtual destructor, which makes all
|
||||
states polymorphic.</p></li></ul></div></div><div class="refsect1" title="msm/front/completion_event.hpp"><a name="d0e5329"></a><h2>msm/front/completion_event.hpp</h2><p>This header contains one type, <code class="code">none</code>. This type has several
|
||||
<title>Front-end</title><link rel="stylesheet" href="boostbook.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.2"><link rel="home" href="index.html" title="Meta State Machine (MSM)"><link rel="up" href="pt02.html" title="Part II. Reference"><link rel="prev" href="re02.html" title="Back-end"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Front-end</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re02.html">Prev</a> </td><th width="60%" align="center">Part II. Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="Front-end"><a name="d0e5318"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Front-end — The front-end headers</p></div><div class="refsect1" title="msm/front/common_states.hpp"><a name="d0e5324"></a><h2>msm/front/common_states.hpp</h2><p>This header contains the predefined types to serve as base for states or state machines:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>default_base_state: non-polymorphic empty type.</p></li><li class="listitem"><p>polymorphic_state: type with a virtual destructor, which makes all
|
||||
states polymorphic.</p></li></ul></div></div><div class="refsect1" title="msm/front/completion_event.hpp"><a name="d0e5336"></a><h2>msm/front/completion_event.hpp</h2><p>This header contains one type, <code class="code">none</code>. This type has several
|
||||
meanings inside a transition table:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as action or guard: that there is no action or guard</p></li><li class="listitem"><p>as target state: that the transition is an internal
|
||||
transition</p></li><li class="listitem"><p>as event: the transition is an anonymous (completion)
|
||||
transition</p></li></ul></div></div><div class="refsect1" title="msm/front/functor_row.hpp"><a name="d0e5347"></a><h2>msm/front/functor_row.hpp</h2><p>This header implements the functor front-end's transitions and helpers.</p><div class="refsect2" title="Row"><a name="d0e5352"></a><h3>Row</h3><div class="refsect3" title="definition"><a name="d0e5355"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Source,class Event,class Target,class
|
||||
Action,class Guard> Row</span></span> {<br>}</pre></div><div class="refsect3" title="tags"><a name="d0e5362"></a><h4>tags</h4><p>row_type_tag is defined differently for every specialization:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>all 5 template parameters means a normal transition with
|
||||
transition</p></li></ul></div></div><div class="refsect1" title="msm/front/functor_row.hpp"><a name="d0e5354"></a><h2>msm/front/functor_row.hpp</h2><p>This header implements the functor front-end's transitions and helpers.</p><div class="refsect2" title="Row"><a name="d0e5359"></a><h3>Row</h3><div class="refsect3" title="definition"><a name="d0e5362"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Source,class Event,class Target,class
|
||||
Action,class Guard> Row</span></span> {<br>}</pre></div><div class="refsect3" title="tags"><a name="d0e5369"></a><h4>tags</h4><p>row_type_tag is defined differently for every specialization:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>all 5 template parameters means a normal transition with
|
||||
action and guard: <code class="code">typedef row_tag
|
||||
row_type_tag;</code></p></li><li class="listitem"><p>Row<Source,Event,Target,none,none> a normal transition
|
||||
without action or guard: <code class="code">typedef _row_tag
|
||||
@@ -21,7 +21,7 @@
|
||||
transition with action and guard: <code class="code">typedef irow_tag
|
||||
row_type_tag;</code></p></li><li class="listitem"><p>Row<Source,Event,none,none,none> an internal transition
|
||||
without action or guard: <code class="code">typedef _irow_tag
|
||||
row_type_tag;</code></p></li></ul></div></div><div class="refsect3" title="methods"><a name="d0e5408"></a><h4>methods</h4><p>Like any other front-end, Row implements the two necessary static
|
||||
row_type_tag;</code></p></li></ul></div></div><div class="refsect3" title="methods"><a name="d0e5415"></a><h4>methods</h4><p>Like any other front-end, Row implements the two necessary static
|
||||
functions for action and guard call. Each function receives as parameter
|
||||
the (deepest-level) state machine processsing the event, the event
|
||||
itself, the source and target states and all the states contained in a
|
||||
@@ -33,8 +33,8 @@
|
||||
class AllStates> static bool guard_call(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>
|
||||
<code>(</code>Fsm& fsm,Event const&
|
||||
evt,SourceState&,TargetState,AllStates&<code>)</code>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div></div><div class="refsect2" title="Internal"><a name="d0e5431"></a><h3>Internal</h3><div class="refsect3" title="definition"><a name="d0e5434"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Event,class Action,class Guard>
|
||||
Internal</span></span> {<br>}</pre></div><div class="refsect3" title="tags"><a name="d0e5441"></a><h4>tags</h4><p>row_type_tag is defined differently for every specialization:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>all 3 template parameters means an internal transition
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div></div><div class="refsect2" title="Internal"><a name="d0e5438"></a><h3>Internal</h3><div class="refsect3" title="definition"><a name="d0e5441"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Event,class Action,class Guard>
|
||||
Internal</span></span> {<br>}</pre></div><div class="refsect3" title="tags"><a name="d0e5448"></a><h4>tags</h4><p>row_type_tag is defined differently for every specialization:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>all 3 template parameters means an internal transition
|
||||
with action and guard: <code class="code">typedef sm_i_row_tag
|
||||
row_type_tag;</code></p></li><li class="listitem"><p>Internal<Event,none,none> an internal transition
|
||||
without action or guard: <code class="code">typedef sm__i_row_tag
|
||||
@@ -42,7 +42,7 @@
|
||||
without guard: <code class="code">typedef sm_a_i_row_tag
|
||||
row_type_tag;</code></p></li><li class="listitem"><p>Internal<Event,none,Guard> an internal transition
|
||||
without action: <code class="code">typedef sm_g_i_row_tag
|
||||
row_type_tag;</code></p></li></ul></div></div><div class="refsect3" title="methods"><a name="d0e5467"></a><h4>methods</h4><p>Like any other front-end, Internal implements the two necessary static
|
||||
row_type_tag;</code></p></li></ul></div></div><div class="refsect3" title="methods"><a name="d0e5474"></a><h4>methods</h4><p>Like any other front-end, Internal implements the two necessary static
|
||||
functions for action and guard call. Each function receives as parameter
|
||||
the (deepest-level) state machine processsing the event, the event
|
||||
itself, the source and target states and all the states contained in a
|
||||
@@ -54,9 +54,9 @@
|
||||
class AllStates> static bool guard_call(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>
|
||||
<code>(</code>Fsm& fsm,Event const&
|
||||
evt,SourceState&,TargetState,AllStates&<code>)</code>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div></div><div class="refsect2" title="ActionSequence_"><a name="d0e5490"></a><h3>ActionSequence_</h3><p>This functor calls every element of the template Sequence (which are also
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div></div><div class="refsect2" title="ActionSequence_"><a name="d0e5497"></a><h3>ActionSequence_</h3><p>This functor calls every element of the template Sequence (which are also
|
||||
callable functors) in turn. It is also the underlying implementation of the
|
||||
eUML sequence grammar (action1,action2,...).</p><div class="refsect3" title="definition"><a name="d0e5495"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Sequence> ActionSequence_</span></span> {<br>}</pre></div><div class="refsect3" title="methods"><a name="d0e5502"></a><h4>methods</h4><p>This helper functor is made for use in a transition table and in a
|
||||
eUML sequence grammar (action1,action2,...).</p><div class="refsect3" title="definition"><a name="d0e5502"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Sequence> ActionSequence_</span></span> {<br>}</pre></div><div class="refsect3" title="methods"><a name="d0e5509"></a><h4>methods</h4><p>This helper functor is made for use in a transition table and in a
|
||||
state behavior and therefore implements an operator() with 3 and with 4
|
||||
arguments:</p><p>
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class Evt,class Fsm,class
|
||||
@@ -65,13 +65,13 @@
|
||||
</p><p>
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class Evt,class Fsm,class State>
|
||||
operator()(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Evt const&, Fsm&, State&</code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
||||
</p></div></div><div class="refsect2" title="Defer"><a name="d0e5525"></a><h3>Defer</h3><div class="refsect3" title="definition"><a name="d0e5528"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">Defer</span></span> {<br>}</pre></div><div class="refsect3" title="methods"><a name="d0e5535"></a><h4>methods</h4><p>This helper functor is made for use in a transition table and
|
||||
</p></div></div><div class="refsect2" title="Defer"><a name="d0e5532"></a><h3>Defer</h3><div class="refsect3" title="definition"><a name="d0e5535"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">Defer</span></span> {<br>}</pre></div><div class="refsect3" title="methods"><a name="d0e5542"></a><h4>methods</h4><p>This helper functor is made for use in a transition table and
|
||||
therefore implements an operator() with 4 arguments:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class Evt,class Fsm,class SourceState,class
|
||||
TargetState> operator()(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Evt const&, Fsm& , SourceState&,
|
||||
TargetState&</code>;</div><div class="funcprototype-spacer"> </div></div></div></div></div><div class="refsect1" title="msm/front/internal_row.hpp"><a name="d0e5546"></a><h2>msm/front/internal_row.hpp</h2><p>This header implements the internal transition rows for use inside an
|
||||
TargetState&</code>;</div><div class="funcprototype-spacer"> </div></div></div></div></div><div class="refsect1" title="msm/front/internal_row.hpp"><a name="d0e5553"></a><h2>msm/front/internal_row.hpp</h2><p>This header implements the internal transition rows for use inside an
|
||||
internal_transition_table. All these row types have no source or target state,
|
||||
as the backend will recognize internal transitions from this
|
||||
internal_transition_table.</p><div class="refsect2" title="methods"><a name="d0e5551"></a><h3>methods</h3><p>Like any other front-end, the following transition row types implements
|
||||
internal_transition_table.</p><div class="refsect2" title="methods"><a name="d0e5558"></a><h3>methods</h3><p>Like any other front-end, the following transition row types implements
|
||||
the two necessary static functions for action and guard call. Each function
|
||||
receives as parameter the (deepest-level) state machine processsing the
|
||||
event, the event itself, the source and target states and all the states
|
||||
@@ -83,30 +83,30 @@
|
||||
class AllStates> static bool guard_call(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>
|
||||
<code>(</code>Fsm& fsm,Event const&
|
||||
evt,SourceState&,TargetState,AllStates&<code>)</code>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect2" title="a_internal"><a name="d0e5574"></a><h3>a_internal</h3><div class="refsect3" title="definition"><a name="d0e5577"></a><h4>definition</h4><p>This is an internal transition with an action called during the
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect2" title="a_internal"><a name="d0e5581"></a><h3>a_internal</h3><div class="refsect3" title="definition"><a name="d0e5584"></a><h4>definition</h4><p>This is an internal transition with an action called during the
|
||||
transition.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event, class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&)>
|
||||
a_internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5586"></a><h4>template parameters</h4><p>
|
||||
a_internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5593"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the internal
|
||||
transition.</p></li><li class="listitem"><p>CalledForAction: the type on which the action method will
|
||||
be called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>action: a pointer to the method which CalledForAction
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="g_internal"><a name="d0e5602"></a><h3>g_internal</h3><p>This is an internal transition with a guard called before the transition
|
||||
and allowing the transition if returning true.</p><div class="refsect3" title="definition"><a name="d0e5607"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event, class CalledForGuard, bool
|
||||
</p></div></div><div class="refsect2" title="g_internal"><a name="d0e5609"></a><h3>g_internal</h3><p>This is an internal transition with a guard called before the transition
|
||||
and allowing the transition if returning true.</p><div class="refsect3" title="definition"><a name="d0e5614"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event, class CalledForGuard, bool
|
||||
(CalledForGuard::*guard)(Event const&)>
|
||||
g_internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5614"></a><h4>template parameters</h4><p>
|
||||
g_internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5621"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the internal
|
||||
transition.</p></li><li class="listitem"><p>CalledForGuard: the type on which the guard method will be
|
||||
called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>guard: a pointer to the method which CalledForGuard
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="internal"><a name="d0e5630"></a><h3>internal</h3><p>This is an internal transition with a guard called before the transition
|
||||
</p></div></div><div class="refsect2" title="internal"><a name="d0e5637"></a><h3>internal</h3><p>This is an internal transition with a guard called before the transition
|
||||
and allowing the transition if returning true. It also calls an action
|
||||
called during the transition.</p><div class="refsect3" title="definition"><a name="d0e5635"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event, class CalledForAction, void
|
||||
called during the transition.</p><div class="refsect3" title="definition"><a name="d0e5642"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event, class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&), class
|
||||
CalledForGuard, bool (CalledForGuard::*guard)(Event const&)>
|
||||
internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5642"></a><h4>template parameters</h4><p>
|
||||
internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5649"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the internal transition</p></li><li class="listitem"><p>CalledForAction: the type on which the action method will
|
||||
be called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>action: a pointer to the method which CalledForAction
|
||||
@@ -114,15 +114,15 @@
|
||||
called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>guard: a pointer to the method which CalledForGuard
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="_internal"><a name="d0e5664"></a><h3>_internal</h3><p>This is an internal transition without action or guard. This is equivalent
|
||||
to an explicit "ignore event".</p><div class="refsect3" title="definition"><a name="d0e5669"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event > _internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5676"></a><h4>template parameters</h4><p>
|
||||
</p></div></div><div class="refsect2" title="_internal"><a name="d0e5671"></a><h3>_internal</h3><p>This is an internal transition without action or guard. This is equivalent
|
||||
to an explicit "ignore event".</p><div class="refsect3" title="definition"><a name="d0e5676"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Event > _internal</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5683"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the internal
|
||||
transition.</p></li></ul></div><p>
|
||||
</p></div></div></div><div class="refsect1" title="msm/front/row2.hpp"><a name="d0e5686"></a><h2>msm/front/row2.hpp</h2><p>This header contains the variants of row2, which are an extension of the
|
||||
</p></div></div></div><div class="refsect1" title="msm/front/row2.hpp"><a name="d0e5693"></a><h2>msm/front/row2.hpp</h2><p>This header contains the variants of row2, which are an extension of the
|
||||
standard row transitions for use in the transition table. They offer the
|
||||
possibility to define action and guard not only in the state machine, but in any
|
||||
state of the state machine. They can also be used in internal transition tables
|
||||
through their irow2 variants.</p><div class="refsect2" title="methods"><a name="d0e5691"></a><h3>methods</h3><p>Like any other front-end, the following transition row types implements
|
||||
through their irow2 variants.</p><div class="refsect2" title="methods"><a name="d0e5698"></a><h3>methods</h3><p>Like any other front-end, the following transition row types implements
|
||||
the two necessary static functions for action and guard call. Each function
|
||||
receives as parameter the (deepest-level) state machine processsing the
|
||||
event, the event itself, the source and target states and all the states
|
||||
@@ -134,28 +134,28 @@
|
||||
class AllStates> static bool guard_call(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>
|
||||
<code>(</code>Fsm& fsm,Event const&
|
||||
evt,SourceState&,TargetState,AllStates&<code>)</code>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect2" title="_row2"><a name="d0e5714"></a><h3>_row2</h3><p>This is a transition without action or guard. The state machine only
|
||||
changes active state.</p><div class="refsect3" title="definition"><a name="d0e5719"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target >
|
||||
_row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5726"></a><h4>template parameters</h4><p>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect2" title="_row2"><a name="d0e5721"></a><h3>_row2</h3><p>This is a transition without action or guard. The state machine only
|
||||
changes active state.</p><div class="refsect3" title="definition"><a name="d0e5726"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target >
|
||||
_row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5733"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="a_row2"><a name="d0e5742"></a><h3>a_row2</h3><p>This is a transition with action and without guard.</p><div class="refsect3" title="definition"><a name="d0e5747"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target,
|
||||
</p></div></div><div class="refsect2" title="a_row2"><a name="d0e5749"></a><h3>a_row2</h3><p>This is a transition with action and without guard.</p><div class="refsect3" title="definition"><a name="d0e5754"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target,
|
||||
</span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5758"></a><h4>template parameters</h4><p>
|
||||
(CalledForAction::*action)(Event const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5765"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li><li class="listitem"><p>CalledForAction: the type on which the action method will
|
||||
be called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>action: a pointer to the method which CalledForAction
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="g_row2"><a name="d0e5780"></a><h3>g_row2</h3><p>This is a transition with guard and without action.</p><div class="refsect3" title="definition"><a name="d0e5785"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target,
|
||||
</p></div></div><div class="refsect2" title="g_row2"><a name="d0e5787"></a><h3>g_row2</h3><p>This is a transition with guard and without action.</p><div class="refsect3" title="definition"><a name="d0e5792"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target,
|
||||
</span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForGuard, bool (CalledForGuard::*guard)(Event
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5796"></a><h4>template parameters</h4><p>
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5803"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li><li class="listitem"><p>CalledForGuard: the type on which the guard method will be
|
||||
called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>guard: a pointer to the method which CalledForGuard
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="row2"><a name="d0e5818"></a><h3>row2</h3><p>This is a transition with guard and action.</p><div class="refsect3" title="definition"><a name="d0e5823"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target,
|
||||
</p></div></div><div class="refsect2" title="row2"><a name="d0e5825"></a><h3>row2</h3><p>This is a transition with guard and action.</p><div class="refsect3" title="definition"><a name="d0e5830"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, class Target,
|
||||
</span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&), </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForGuard, bool (CalledForGuard::*guard)(Event
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5838"></a><h4>template parameters</h4><p>
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5845"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li><li class="listitem"><p>CalledForAction: the type on which the action method will
|
||||
be called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>action: a pointer to the method which CalledForAction
|
||||
@@ -163,24 +163,24 @@
|
||||
called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>guard: a pointer to the method which CalledForGuard
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="a_irow2"><a name="d0e5866"></a><h3>a_irow2</h3><p>This is an internal transition for use inside a transition table, with
|
||||
action and without guard.</p><div class="refsect3" title="definition"><a name="d0e5871"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5882"></a><h4>template parameters</h4><p>
|
||||
</p></div></div><div class="refsect2" title="a_irow2"><a name="d0e5873"></a><h3>a_irow2</h3><p>This is an internal transition for use inside a transition table, with
|
||||
action and without guard.</p><div class="refsect3" title="definition"><a name="d0e5878"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5889"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>CalledForAction: the type on which the action method will
|
||||
be called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>action: a pointer to the method which CalledForAction
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="g_irow2"><a name="d0e5901"></a><h3>g_irow2</h3><p>This is an internal transition for use inside a transition table, with
|
||||
guard and without action.</p><div class="refsect3" title="definition"><a name="d0e5906"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForGuard, bool (CalledForGuard::*guard)(Event
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5917"></a><h4>template parameters</h4><p>
|
||||
</p></div></div><div class="refsect2" title="g_irow2"><a name="d0e5908"></a><h3>g_irow2</h3><p>This is an internal transition for use inside a transition table, with
|
||||
guard and without action.</p><div class="refsect3" title="definition"><a name="d0e5913"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForGuard, bool (CalledForGuard::*guard)(Event
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5924"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>CalledForGuard: the type on which the guard method will be
|
||||
called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>guard: a pointer to the method which CalledForGuard
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div><div class="refsect2" title="irow2"><a name="d0e5936"></a><h3>irow2</h3><p>This is an internal transition for use inside a transition table, with
|
||||
guard and action.</p><div class="refsect3" title="definition"><a name="d0e5941"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForAction, void
|
||||
</p></div></div><div class="refsect2" title="irow2"><a name="d0e5943"></a><h3>irow2</h3><p>This is an internal transition for use inside a transition table, with
|
||||
guard and action.</p><div class="refsect3" title="definition"><a name="d0e5948"></a><h4>definition</h4><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template< class Source, class Event, </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForAction, void
|
||||
(CalledForAction::*action)(Event const&), </span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class CalledForGuard, bool (CalledForGuard::*guard)(Event
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5956"></a><h4>template parameters</h4><p>
|
||||
const&) > _row2</span></span> {<br>}</pre></div><div class="refsect3" title="template parameters"><a name="d0e5963"></a><h4>template parameters</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>CalledForAction: the type on which the action method will
|
||||
be called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>action: a pointer to the method which CalledForAction
|
||||
@@ -188,16 +188,16 @@
|
||||
called. It can be either a state of the containing state
|
||||
machine or the state machine itself.</p></li><li class="listitem"><p>guard: a pointer to the method which CalledForGuard
|
||||
provides.</p></li></ul></div><p>
|
||||
</p></div></div></div><div class="refsect1" title="msm/front/state_machine_def.hpp"><a name="d0e5981"></a><h2>msm/front/state_machine_def.hpp</h2><p>This header provides the implementation of the <span class="command"><strong><a class="command" href="ch03s02.html#basic-front-end">basic front-end</a></strong></span>. It contains one
|
||||
type, <code class="code">state_machine_def</code></p><div class="refsect2" title="state_machine_def definition"><a name="d0e5991"></a><h3>state_machine_def definition</h3><p>This type is the basic class for a basic (or possibly any other)
|
||||
</p></div></div></div><div class="refsect1" title="msm/front/state_machine_def.hpp"><a name="d0e5988"></a><h2>msm/front/state_machine_def.hpp</h2><p>This header provides the implementation of the <span class="command"><strong><a class="command" href="ch03s02.html#basic-front-end">basic front-end</a></strong></span>. It contains one
|
||||
type, <code class="code">state_machine_def</code></p><div class="refsect2" title="state_machine_def definition"><a name="d0e5998"></a><h3>state_machine_def definition</h3><p>This type is the basic class for a basic (or possibly any other)
|
||||
front-end. It provides the standard row types (which includes internal
|
||||
transitions) and a default implementation of the required methods and
|
||||
typedefs.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class Derived,class BaseState =
|
||||
default_base_state> state_machine_def</span></span> {<br>}</pre><div class="refsect3" title="typedefs"><a name="d0e6000"></a><h4>typedefs</h4><p>
|
||||
default_base_state> state_machine_def</span></span> {<br>}</pre><div class="refsect3" title="typedefs"><a name="d0e6007"></a><h4>typedefs</h4><p>
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>flag_list: by default, no flag is set in the state
|
||||
machine</p></li><li class="listitem"><p>deferred_events: by default, no event is deferred.</p></li><li class="listitem"><p>configuration: by default, no configuration customization
|
||||
is done.</p></li></ul></div><p>
|
||||
</p></div><div class="refsect3" title="row methods"><a name="d0e6016"></a><h4>row methods</h4><p>Like any other front-end, the following transition row types
|
||||
</p></div><div class="refsect3" title="row methods"><a name="d0e6023"></a><h4>row methods</h4><p>Like any other front-end, the following transition row types
|
||||
implements the two necessary static functions for action and guard call.
|
||||
Each function receives as parameter the (deepest-level) state machine
|
||||
processsing the event, the event itself, the source and target states
|
||||
@@ -209,30 +209,30 @@
|
||||
class AllStates> static bool guard_call(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>
|
||||
<code>(</code>Fsm& fsm,Event const&
|
||||
evt,SourceState&,TargetState,AllStates&<code>)</code>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect3" title="a_row"><a name="d0e6039"></a><h4>a_row</h4><p>This is a transition with action and without guard.</p><p><code class="classname">template< class Source, class Event, class Target,
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect3" title="a_row"><a name="d0e6046"></a><h4>a_row</h4><p>This is a transition with action and without guard.</p><p><code class="classname">template< class Source, class Event, class Target,
|
||||
void (Derived::*action)(Event const&) > a_row</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li><li class="listitem"><p>action: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="g_row"><a name="d0e6064"></a><h4>g_row</h4><p>This is a transition with guard and without action.</p><p><code class="classname">template< class Source, class Event, class Target,
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="g_row"><a name="d0e6071"></a><h4>g_row</h4><p>This is a transition with guard and without action.</p><p><code class="classname">template< class Source, class Event, class Target,
|
||||
bool (Derived::*guard)(Event const&) > g_row</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li><li class="listitem"><p>guard: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="row"><a name="d0e6089"></a><h4>row</h4><p>This is a transition with guard and action.</p><p><code class="classname">template< class Source, class Event, class Target,
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="row"><a name="d0e6096"></a><h4>row</h4><p>This is a transition with guard and action.</p><p><code class="classname">template< class Source, class Event, class Target,
|
||||
void (Derived::*action)(Event const&), bool
|
||||
(Derived::*guard)(Event const&) > row</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li><li class="listitem"><p>action: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li><li class="listitem"><p>guard: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="_row"><a name="d0e6120"></a><h4>_row</h4><p>This is a transition without action or guard. The state machine only
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="_row"><a name="d0e6127"></a><h4>_row</h4><p>This is a transition without action or guard. The state machine only
|
||||
changes active state.</p><p><code class="classname">template< class Source, class Event, class Target >
|
||||
_row</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li></ul></div></div><div class="refsect3" title="a_irow"><a name="d0e6139"></a><h4>a_irow</h4><p>This is an internal transition for use inside a transition table, with
|
||||
_row</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>Target: the target state of the transition.</p></li></ul></div></div><div class="refsect3" title="a_irow"><a name="d0e6146"></a><h4>a_irow</h4><p>This is an internal transition for use inside a transition table, with
|
||||
action and without guard.</p><p><code class="classname">template< class Source, class Event, void
|
||||
(Derived::*action)(Event const&) > a_irow</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>action: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="g_irow"><a name="d0e6161"></a><h4>g_irow</h4><p>This is an internal transition for use inside a transition table, with
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="g_irow"><a name="d0e6168"></a><h4>g_irow</h4><p>This is an internal transition for use inside a transition table, with
|
||||
guard and without action.</p><p><code class="classname">template< class Source, class Event, bool
|
||||
(Derived::*guard)(Event const&) > g_irow</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>guard: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="irow"><a name="d0e6183"></a><h4>irow</h4><p>This is an internal transition for use inside a transition table, with
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="irow"><a name="d0e6190"></a><h4>irow</h4><p>This is an internal transition for use inside a transition table, with
|
||||
guard and action.</p><p><code class="classname">template< class Source, class Event, void
|
||||
(Derived::*action)(Event const&), bool
|
||||
(Derived::*guard)(Event const&) > irow</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li><li class="listitem"><p>action: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li><li class="listitem"><p>guard: a pointer to the method provided by the concrete
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="_irow"><a name="d0e6211"></a><h4>_irow</h4><p>This is an internal transition without action or guard. As it does
|
||||
front-end (represented by <code class="code">Derived</code>).</p></li></ul></div></div><div class="refsect3" title="_irow"><a name="d0e6218"></a><h4>_irow</h4><p>This is an internal transition without action or guard. As it does
|
||||
nothing, it means "ignore event".</p><p><code class="classname">template< class Source, class Event >
|
||||
_irow</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li></ul></div></div><div class="refsect3" title="methods"><a name="d0e6227"></a><h4>methods</h4><p><code class="code">state_machine_def</code> provides a default implementation in
|
||||
_irow</code></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Event: the event triggering the transition.</p></li><li class="listitem"><p>Source: the source state of the transition.</p></li></ul></div></div><div class="refsect3" title="methods"><a name="d0e6234"></a><h4>methods</h4><p><code class="code">state_machine_def</code> provides a default implementation in
|
||||
case of an event which cannot be processed by a state machine (no
|
||||
transition found). The implementation is using a
|
||||
<code class="code">BOOST_ASSERT</code> so that the error will only be noticed in
|
||||
@@ -256,30 +256,30 @@
|
||||
<code>(</code>Event const& ,Fsm&,
|
||||
std::exception&<code>)</code>
|
||||
</code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
||||
</p></div></div></div><div class="refsect1" title="msm/front/states.hpp"><a name="d0e6271"></a><h2>msm/front/states.hpp </h2><p>This header provides the different states (except state machines) for the
|
||||
basic front-end (or mixed with other front-ends).</p><div class="refsect2" title="types"><a name="d0e6276"></a><h3>types</h3><p>This header provides the following types:</p><div class="refsect3" title="no_sm_ptr"><a name="d0e6281"></a><h4>no_sm_ptr</h4><p>deprecated: default policy for states. It means that states do not
|
||||
need to save a pointer to their containing state machine.</p></div><div class="refsect3" title="sm_ptr"><a name="d0e6286"></a><h4>sm_ptr</h4><p>deprecated: state policy. It means that states need to save a pointer
|
||||
</p></div></div></div><div class="refsect1" title="msm/front/states.hpp"><a name="d0e6278"></a><h2>msm/front/states.hpp </h2><p>This header provides the different states (except state machines) for the
|
||||
basic front-end (or mixed with other front-ends).</p><div class="refsect2" title="types"><a name="d0e6283"></a><h3>types</h3><p>This header provides the following types:</p><div class="refsect3" title="no_sm_ptr"><a name="d0e6288"></a><h4>no_sm_ptr</h4><p>deprecated: default policy for states. It means that states do not
|
||||
need to save a pointer to their containing state machine.</p></div><div class="refsect3" title="sm_ptr"><a name="d0e6293"></a><h4>sm_ptr</h4><p>deprecated: state policy. It means that states need to save a pointer
|
||||
to their containing state machine. When seeing this flag, the back-end
|
||||
will call set_sm_ptr(fsm*) and give itself as argument.</p></div><div class="refsect3" title="state"><a name="d0e6291"></a><h4>state</h4><p>Basic type for simple states. Inherit from this type to define a
|
||||
will call set_sm_ptr(fsm*) and give itself as argument.</p></div><div class="refsect3" title="state"><a name="d0e6298"></a><h4>state</h4><p>Basic type for simple states. Inherit from this type to define a
|
||||
simple state. The first argument is needed if you want your state (and
|
||||
all others used in a concrete state machine) to inherit a basic type for
|
||||
logging or providing a common behavior.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template<class Base = default_base_state,class
|
||||
SMPtrPolicy = no_sm_ptr> state</span></span> {<br>}</pre></div><div class="refsect3" title="terminate_state"><a name="d0e6300"></a><h4>terminate_state</h4><p>Basic type for terminate states. Inherit from this type to define a
|
||||
SMPtrPolicy = no_sm_ptr> state</span></span> {<br>}</pre></div><div class="refsect3" title="terminate_state"><a name="d0e6307"></a><h4>terminate_state</h4><p>Basic type for terminate states. Inherit from this type to define a
|
||||
terminate state. The first argument is needed if you want your state
|
||||
(and all others used in a concrete state machine) to inherit a basic
|
||||
type for logging or providing a common behavior.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template<class Base = default_base_state,class
|
||||
SMPtrPolicy = no_sm_ptr> terminate_state</span></span> {<br>}</pre></div><div class="refsect3" title="interrupt_state"><a name="d0e6309"></a><h4>interrupt_state</h4><p>Basic type for interrupt states. Interrupt states prevent any further
|
||||
SMPtrPolicy = no_sm_ptr> terminate_state</span></span> {<br>}</pre></div><div class="refsect3" title="interrupt_state"><a name="d0e6316"></a><h4>interrupt_state</h4><p>Basic type for interrupt states. Interrupt states prevent any further
|
||||
event handling until EndInterruptEvent is sent. Inherit from this type
|
||||
to define a terminate state. The first argument is the name of the event
|
||||
ending the interrupt. The second argument is needed if you want your
|
||||
state (and all others used in a concrete state machine) to inherit a
|
||||
basic type for logging or providing a common behavior.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template<class EndInterruptEvent,class Base =
|
||||
default_base_state,</span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class SMPtrPolicy = no_sm_ptr>
|
||||
interrupt_state</span></span> {<br>}</pre></div><div class="refsect3" title="explicit_entry"><a name="d0e6322"></a><h4>explicit_entry</h4><p>Inherit from this type <span class="underline">in
|
||||
interrupt_state</span></span> {<br>}</pre></div><div class="refsect3" title="explicit_entry"><a name="d0e6329"></a><h4>explicit_entry</h4><p>Inherit from this type <span class="underline">in
|
||||
addition</span> to the desired state type to enable this state
|
||||
for direct entering. The template parameter gives the region id of the
|
||||
state (regions are numbered in the order of the
|
||||
<code class="code">initial_state</code> typedef).</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <int ZoneIndex=-1> explicit_entry</span></span> {<br>}</pre></div><div class="refsect3" title="entry_pseudo_state"><a name="d0e6337"></a><h4>entry_pseudo_state</h4><p>Basic type for entry pseudo states. Entry pseudo states are an
|
||||
<code class="code">initial_state</code> typedef).</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <int ZoneIndex=-1> explicit_entry</span></span> {<br>}</pre></div><div class="refsect3" title="entry_pseudo_state"><a name="d0e6344"></a><h4>entry_pseudo_state</h4><p>Basic type for entry pseudo states. Entry pseudo states are an
|
||||
predefined entry into a submachine and connect two transitions. The
|
||||
first argument is the id of the region entered by this state (regions
|
||||
are numbered in the order of the <code class="code">initial_state</code> typedef).
|
||||
@@ -287,7 +287,7 @@
|
||||
used in a concrete state machine) to inherit a basic type for logging or
|
||||
providing a common behavior.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template<int RegionIndex=-1,class Base =
|
||||
default_base_state,</span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class SMPtrPolicy = no_sm_ptr>
|
||||
entry_pseudo_state</span></span> {<br>}</pre></div><div class="refsect3" title="exit_pseudo_state"><a name="d0e6353"></a><h4>exit_pseudo_state</h4><p>Basic type for exit pseudo states. Exit pseudo states are an
|
||||
entry_pseudo_state</span></span> {<br>}</pre></div><div class="refsect3" title="exit_pseudo_state"><a name="d0e6360"></a><h4>exit_pseudo_state</h4><p>Basic type for exit pseudo states. Exit pseudo states are an
|
||||
predefined exit from a submachine and connect two transitions. The first
|
||||
argument is the name of the event which will be "thrown" out of the exit
|
||||
point. This event does not need to be the same as the one sent by the
|
||||
@@ -296,32 +296,32 @@
|
||||
machine) to inherit a basic type for logging or providing a common
|
||||
behavior.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template<class Event,class Base =
|
||||
default_base_state,</span></span> {<br>}</pre><pre class="classsynopsis"> <span class="ooclass"><span class="classname">class SMPtrPolicy = no_sm_ptr>
|
||||
exit_pseudo_state</span></span> {<br>}</pre></div></div></div><div class="refsect1" title="msm/front/euml/euml.hpp"><a name="d0e6366"></a><h2>msm/front/euml/euml.hpp</h2><p>This header includes all of eUML except the STL functors.</p></div><div class="refsect1" title="msm/front/euml/stl.hpp"><a name="d0e6371"></a><h2>msm/front/euml/stl.hpp</h2><p>This header includes all the functors for STL support in eUML. These <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-all">tables</a></strong></span> show a full description.</p></div><div class="refsect1" title="msm/front/euml/algorithm.hpp"><a name="d0e6379"></a><h2>msm/front/euml/algorithm.hpp</h2><p>This header includes all the functors for STL algorithms support in eUML.
|
||||
exit_pseudo_state</span></span> {<br>}</pre></div></div></div><div class="refsect1" title="msm/front/euml/euml.hpp"><a name="d0e6373"></a><h2>msm/front/euml/euml.hpp</h2><p>This header includes all of eUML except the STL functors.</p></div><div class="refsect1" title="msm/front/euml/stl.hpp"><a name="d0e6378"></a><h2>msm/front/euml/stl.hpp</h2><p>This header includes all the functors for STL support in eUML. These <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-all">tables</a></strong></span> show a full description.</p></div><div class="refsect1" title="msm/front/euml/algorithm.hpp"><a name="d0e6386"></a><h2>msm/front/euml/algorithm.hpp</h2><p>This header includes all the functors for STL algorithms support in eUML.
|
||||
These <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-all">tables</a></strong></span> show a full
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/iteration.hpp"><a name="d0e6387"></a><h2>msm/front/euml/iteration.hpp</h2><p>This header includes iteration functors for STL support in eUML. This <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-iteration">tables</a></strong></span> shows a full
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/querying.hpp"><a name="d0e6395"></a><h2>msm/front/euml/querying.hpp</h2><p>This header includes querying functors for STL support in eUML. This <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-querying">tables</a></strong></span> shows a full
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/transformation.hpp"><a name="d0e6403"></a><h2>msm/front/euml/transformation.hpp</h2><p>This header includes transformation functors for STL support in eUML. This
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/iteration.hpp"><a name="d0e6394"></a><h2>msm/front/euml/iteration.hpp</h2><p>This header includes iteration functors for STL support in eUML. This <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-iteration">tables</a></strong></span> shows a full
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/querying.hpp"><a name="d0e6402"></a><h2>msm/front/euml/querying.hpp</h2><p>This header includes querying functors for STL support in eUML. This <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-querying">tables</a></strong></span> shows a full
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/transformation.hpp"><a name="d0e6410"></a><h2>msm/front/euml/transformation.hpp</h2><p>This header includes transformation functors for STL support in eUML. This
|
||||
<span class="command"><strong><a class="command" href="ch10.html#eUML-STL-transformation">tables</a></strong></span> shows a full
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/container.hpp"><a name="d0e6411"></a><h2>msm/front/euml/container.hpp</h2><p>This header includes container functors for STL support in eUML (functors
|
||||
description.</p></div><div class="refsect1" title="msm/front/euml/container.hpp"><a name="d0e6418"></a><h2>msm/front/euml/container.hpp</h2><p>This header includes container functors for STL support in eUML (functors
|
||||
calling container methods). This <span class="command"><strong><a class="command" href="ch10.html#eUML-STL-container">tables</a></strong></span> shows a full description. It also provides npos for
|
||||
strings.</p><div class="refsect2" title="Npos_<container type>"><a name="d0e6419"></a><h3>Npos_<container type></h3><p>Functor returning npos for transition or state behaviors. Like all
|
||||
strings.</p><div class="refsect2" title="Npos_<container type>"><a name="d0e6426"></a><h3>Npos_<container type></h3><p>Functor returning npos for transition or state behaviors. Like all
|
||||
constants, only the functor form exists, so parenthesis are necessary.
|
||||
Example:</p><p><code class="code">string_find_(event_(m_song),Char_<'S'>(),Size_t_<0>()) !=
|
||||
Npos_<string>() // compare result of string::find with
|
||||
npos</code></p></div></div><div class="refsect1" title="msm/front/euml/stt_grammar.hpp"><a name="d0e6427"></a><h2>msm/front/euml/stt_grammar.hpp</h2><p>This header provides the transition table grammars. This includes internal
|
||||
transition tables.</p><div class="refsect2" title="functions"><a name="d0e6432"></a><h3>functions</h3><div class="refsect3" title="build_stt"><a name="d0e6435"></a><h4>build_stt</h4><p>The function build_stt evaluates the grammar-conform expression as
|
||||
npos</code></p></div></div><div class="refsect1" title="msm/front/euml/stt_grammar.hpp"><a name="d0e6434"></a><h2>msm/front/euml/stt_grammar.hpp</h2><p>This header provides the transition table grammars. This includes internal
|
||||
transition tables.</p><div class="refsect2" title="functions"><a name="d0e6439"></a><h3>functions</h3><div class="refsect3" title="build_stt"><a name="d0e6442"></a><h4>build_stt</h4><p>The function build_stt evaluates the grammar-conform expression as
|
||||
parameter. It returns a transition table, which is a mpl::vector of
|
||||
transitions (rows) or, if the expression is ill-formed (does not match
|
||||
the grammar), the type <code class="code">invalid_type</code>, which will lead to a
|
||||
compile-time static assertion when this transition table is passed to a
|
||||
state machine. </p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template<class Expr> [mpl::vector<...> /
|
||||
msm::front::euml::invalid_type] build_stt(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr const& expr</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect3" title="build_internal_stt"><a name="d0e6449"></a><h4>build_internal_stt</h4><p>The function build_internal_stt evaluates the grammar-conform
|
||||
msm::front::euml::invalid_type] build_stt(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr const& expr</code>;</div><div class="funcprototype-spacer"> </div></div></div><div class="refsect3" title="build_internal_stt"><a name="d0e6456"></a><h4>build_internal_stt</h4><p>The function build_internal_stt evaluates the grammar-conform
|
||||
expression as parameter. It returns a transition table, which is a
|
||||
mpl::vector of transitions (rows) or, if the expression is ill-formed
|
||||
(does not match the grammar), the type <code class="code">invalid_type</code>, which
|
||||
will lead to a compile-time static assertion when this transition table
|
||||
is passed to a state machine. </p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template<class Expr> [mpl::vector<...> /
|
||||
msm::front::euml::invalid_type] build_internal_stt(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr const& expr</code>;</div><div class="funcprototype-spacer"> </div></div></div></div><div class="refsect2" title="grammars"><a name="d0e6463"></a><h3>grammars</h3><div class="refsect3" title="transition table"><a name="d0e6466"></a><h4><span class="command"><strong><a name="reference-stt-grammar"></a>transition
|
||||
msm::front::euml::invalid_type] build_internal_stt(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr const& expr</code>;</div><div class="funcprototype-spacer"> </div></div></div></div><div class="refsect2" title="grammars"><a name="d0e6470"></a><h3>grammars</h3><div class="refsect3" title="transition table"><a name="d0e6473"></a><h4><span class="command"><strong><a name="reference-stt-grammar"></a>transition
|
||||
table</strong></span></h4><p>The transition table accepts the following grammar:</p><pre class="programlisting">Stt := Row | (Stt ',' Stt)
|
||||
Row := (Target '==' (SourcePlusEvent)) /* first syntax*/
|
||||
| ( (SourcePlusEvent) '==' Target ) /* second syntax*/
|
||||
@@ -346,15 +346,15 @@ target == source + event / action,
|
||||
source + event /action == target,
|
||||
source / action == target, /*anonymous transition*/
|
||||
target == source / action, /*anonymous transition*/
|
||||
source + event /action, /* internal transition*/</pre></div><div class="refsect3" title="internal transition table"><a name="d0e6478"></a><h4>internal transition table</h4><p>The internal transition table accepts the following grammar:</p><pre class="programlisting">IStt := BuildEvent | (IStt ',' IStt)</pre><p>BuildEvent being defined for both internal and standard transition
|
||||
tables.</p></div></div></div><div class="refsect1" title="msm/front/euml/guard_grammar.hpp"><a name="d0e6487"></a><h2>msm/front/euml/guard_grammar.hpp</h2><p>This header contains the <code class="code">Guard</code> grammar used in the previous
|
||||
source + event /action, /* internal transition*/</pre></div><div class="refsect3" title="internal transition table"><a name="d0e6485"></a><h4>internal transition table</h4><p>The internal transition table accepts the following grammar:</p><pre class="programlisting">IStt := BuildEvent | (IStt ',' IStt)</pre><p>BuildEvent being defined for both internal and standard transition
|
||||
tables.</p></div></div></div><div class="refsect1" title="msm/front/euml/guard_grammar.hpp"><a name="d0e6494"></a><h2>msm/front/euml/guard_grammar.hpp</h2><p>This header contains the <code class="code">Guard</code> grammar used in the previous
|
||||
section. This grammar is long but pretty simple:</p><pre class="programlisting">Guard := action_tag | (Guard '&&' Guard)
|
||||
| (Guard '||' Guard) | ... /* operators*/
|
||||
| (if_then_else_(Guard,Guard,Guard)) | (function (Action,...Action))</pre><p>Most C++ operators are supported (address-of is not). With
|
||||
<code class="code">function</code> is meant any eUML predefined function or any self-made
|
||||
(using <code class="code">MSM_EUML_METHOD</code> or <code class="code">MSM_EUML_FUNCTION</code>). Action
|
||||
is a grammar defined in state_grammar.hpp.</p></div><div class="refsect1" title="msm/front/euml/state_grammar.hpp"><a name="d0e6508"></a><h2>msm/front/euml/state_grammar.hpp</h2><p>This header provides the grammar for actions and the different grammars and
|
||||
functions to build states using eUML.</p><div class="refsect2" title="action grammar"><a name="d0e6513"></a><h3>action grammar</h3><p>Like the guard grammar, this grammar supports relevant C++ operators and
|
||||
is a grammar defined in state_grammar.hpp.</p></div><div class="refsect1" title="msm/front/euml/state_grammar.hpp"><a name="d0e6515"></a><h2>msm/front/euml/state_grammar.hpp</h2><p>This header provides the grammar for actions and the different grammars and
|
||||
functions to build states using eUML.</p><div class="refsect2" title="action grammar"><a name="d0e6520"></a><h3>action grammar</h3><p>Like the guard grammar, this grammar supports relevant C++ operators and
|
||||
eUML functions:</p><pre class="programlisting">Action := action_tag | (Action '+' Action)
|
||||
| ('--' Action) | ... /* operators*/
|
||||
| if_then_else_(Guard,Action,Action) | if_then_(Action)
|
||||
@@ -363,10 +363,10 @@ source + event /action, /* internal transition*/</pre></div><div class="refsect3
|
||||
| (function(Action,...Action))
|
||||
ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: ++ (post/pre), -- (post/pre), dereferencing, +
|
||||
(unary/binary), - (unary/binary), *, /, %, &(bitwise), | (bitwise),
|
||||
^(bitwise), +=, -=, *=, /=, %=, <<=, >>=, <<, >>, =, [].</p></div><div class="refsect2" title="attributes"><a name="d0e6522"></a><h3>attributes</h3><p>This grammar is used to add attributes to states (or state machines) or
|
||||
^(bitwise), +=, -=, *=, /=, %=, <<=, >>=, <<, >>, =, [].</p></div><div class="refsect2" title="attributes"><a name="d0e6529"></a><h3>attributes</h3><p>This grammar is used to add attributes to states (or state machines) or
|
||||
events: It evaluates to a fusion::map. You can use two forms:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">attributes_ << no_attributes_</code></p></li><li class="listitem"><p><code class="code">attributes_ << attribute_1 << ... <<
|
||||
attribute_n</code></p></li></ul></div><p>Attributes can be of any default-constructible type (fusion
|
||||
requirement).</p></div><div class="refsect2" title="configure"><a name="d0e6538"></a><h3>configure</h3><p>This grammar also has two forms:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">configure_ << no_configure_</code></p></li><li class="listitem"><p><code class="code">configure_ << type_1 << ... <<
|
||||
requirement).</p></div><div class="refsect2" title="configure"><a name="d0e6545"></a><h3>configure</h3><p>This grammar also has two forms:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">configure_ << no_configure_</code></p></li><li class="listitem"><p><code class="code">configure_ << type_1 << ... <<
|
||||
type_n</code></p></li></ul></div><p>This grammar is used to create inside one syntax:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>flags: <code class="code">configure_ << some_flag</code> where
|
||||
some_flag inherits from <code class="code">euml_flag<some_flag></code> or
|
||||
is defined using BOOST_MSM_EUML_FLAG.</p></li><li class="listitem"><p>deferred events: <code class="code">configure_ << some_event</code>
|
||||
@@ -378,12 +378,12 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
some_config inherits from
|
||||
<code class="code">euml_config<some_config></code>. At the moment,
|
||||
three predefined objects exist (in msm//front/euml/common.hpp):</p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>no_exception: disable catching exceptions</p></li><li class="listitem"><p>no_msg_queue: disable message queue</p></li><li class="listitem"><p>deferred_events: manually enable handling of
|
||||
deferred events</p></li></ul></div></li></ul></div></div><div class="refsect2" title="initial states"><a name="d0e6592"></a><h3>initial states</h3><p>The grammar to define initial states for a state machine is: <code class="code">init_
|
||||
deferred events</p></li></ul></div></li></ul></div></div><div class="refsect2" title="initial states"><a name="d0e6599"></a><h3>initial states</h3><p>The grammar to define initial states for a state machine is: <code class="code">init_
|
||||
<< state_1 << ... << state_n</code> where
|
||||
state_1...state_n inherit from euml_state or is defined using
|
||||
BOOST_MSM_EUML_STATE, BOOST_MSM_EUML_INTERRUPT_STATE,
|
||||
BOOST_MSM_EUML_TERMINATE_STATE, BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE,
|
||||
BOOST_MSM_EUML_ENTRY_STATE or BOOST_MSM_EUML_EXIT_STATE.</p></div><div class="refsect2" title="functions"><a name="d0e6600"></a><h3>functions</h3><div class="refsect3" title="build_sm"><a name="d0e6603"></a><h4>build_sm</h4><p>This function has several overloads. The return type is not relevant
|
||||
BOOST_MSM_EUML_ENTRY_STATE or BOOST_MSM_EUML_EXIT_STATE.</p></div><div class="refsect2" title="functions"><a name="d0e6607"></a><h3>functions</h3><div class="refsect3" title="build_sm"><a name="d0e6610"></a><h4>build_sm</h4><p>This function has several overloads. The return type is not relevant
|
||||
to you as only decltype (return type) is what one needs.</p><p>Defines a state machine without entry or exit:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Stt,class Init>
|
||||
func_state_machine<...> build_sm(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Stt ,Init</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines a state machine with entry behavior:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Stt,class Init,class
|
||||
Expr1> func_state_machine<...> build_sm(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Stt ,Init,Expr1 const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines a state machine with entry and exit behaviors:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Stt,class Init,class
|
||||
@@ -402,7 +402,7 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
Base> func_state_machine<...> build_sm(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Stt ,Init,Expr1 const&, Expr2 const&, Attributes
|
||||
const&, Configure const&, Base</code>;</div><div class="funcprototype-spacer"> </div></div><p>Notice that this function requires the extra parameter class
|
||||
StateNameTag to disambiguate state machines having the same parameters
|
||||
but still being different.</p></div><div class="refsect3" title="build_state"><a name="d0e6658"></a><h4>build_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
but still being different.</p></div><div class="refsect3" title="build_state"><a name="d0e6665"></a><h4>build_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
to you as only decltype (return type) is what one needs.</p><p>Defines a simple state without entry or exit:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">func_state<class StateNameTag,...> build_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code></code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines a simple state with entry behavior:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Expr1>
|
||||
func_state<...> build_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr1 const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines a simple state with entry and exit behaviors:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Expr1, class Expr2>
|
||||
func_state<...> build_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr1 const&,Expr2 const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines a simple state with entry, exit behaviors and
|
||||
@@ -418,7 +418,7 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
func_state<...> build_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr1 const&, Expr2 const&, Attributes const&,
|
||||
Configure const&, Base</code>;</div><div class="funcprototype-spacer"> </div></div><p>Notice that this function requires the extra parameter class
|
||||
StateNameTag to disambiguate states having the same parameters but still
|
||||
being different.</p></div><div class="refsect3" title="build_terminate_state"><a name="d0e6712"></a><h4>build_terminate_state</h4><p>This function has the same overloads as build_state.</p></div><div class="refsect3" title="build_interrupt_state"><a name="d0e6717"></a><h4>build_interrupt_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
being different.</p></div><div class="refsect3" title="build_terminate_state"><a name="d0e6719"></a><h4>build_terminate_state</h4><p>This function has the same overloads as build_state.</p></div><div class="refsect3" title="build_interrupt_state"><a name="d0e6724"></a><h4>build_interrupt_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
to you as only decltype (return type) is what one needs.</p><p>Defines an interrupt state without entry or exit:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class EndInterruptEvent>
|
||||
func_state<...> build_interrupt_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>EndInterruptEvent const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines an interrupt state with entry behavior:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class
|
||||
EndInterruptEvent,class Expr1> func_state<...>
|
||||
@@ -443,7 +443,7 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
const&, Attributes const&, Configure const&,
|
||||
Base</code>;</div><div class="funcprototype-spacer"> </div></div><p>Notice that this function requires the extra parameter class
|
||||
StateNameTag to disambiguate states having the same parameters but still
|
||||
being different.</p></div><div class="refsect3" title="build_entry_state"><a name="d0e6772"></a><h4>build_entry_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
being different.</p></div><div class="refsect3" title="build_entry_state"><a name="d0e6779"></a><h4>build_entry_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
to you as only decltype (return type) is what one needs.</p><p>Defines an entry pseudo state without entry or exit:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,int RegionIndex>
|
||||
entry_func_state<...> build_entry_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code></code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines an entry pseudo state with entry behavior:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,int RegionIndex,class
|
||||
Expr1> entry_func_state<...> build_entry_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr1 const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines an entry pseudo state with entry and exit behaviors:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,int RegionIndex,class
|
||||
@@ -462,7 +462,7 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
Base> entry_func_state<...> build_entry_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Expr1 const&, Expr2 const&, Attributes const&,
|
||||
Configure const&, Base</code>;</div><div class="funcprototype-spacer"> </div></div><p>Notice that this function requires the extra parameter class
|
||||
StateNameTag to disambiguate states having the same parameters but still
|
||||
being different.</p></div><div class="refsect3" title="build_exit_state"><a name="d0e6826"></a><h4>build_exit_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
being different.</p></div><div class="refsect3" title="build_exit_state"><a name="d0e6833"></a><h4>build_exit_state</h4><p>This function has several overloads. The return type is not relevant
|
||||
to you as only decltype (return type) is what one needs.</p><p>Defines an exit pseudo state without entry or exit:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Event>
|
||||
exit_func_state<...> build_exit_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Event const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines an exit pseudo state with entry behavior:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Event,class Expr1>
|
||||
exit_func_state<...> build_exit_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Event const&,Expr1 const&</code>;</div><div class="funcprototype-spacer"> </div></div><p>Defines an exit pseudo state with entry and exit behaviors:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">template <class StateNameTag,class Event,class Expr1,
|
||||
@@ -481,8 +481,8 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
exit_func_state<...> build_exit_state(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>Event const&,Expr1 const&, Expr2 const&,
|
||||
Attributes const&, Configure const&, Base</code>;</div><div class="funcprototype-spacer"> </div></div><p>Notice that this function requires the extra parameter class
|
||||
StateNameTag to disambiguate states having the same parameters but still
|
||||
being different.</p></div><div class="refsect3" title="build_explicit_entry_state"><a name="d0e6881"></a><h4>build_explicit_entry_state</h4><p>This function has the same overloads as build_entry_state and
|
||||
explicit_entry_func_state as return type.</p></div></div></div><div class="refsect1" title="msm/front/euml/common.hpp"><a name="d0e6886"></a><h2>msm/front/euml/common.hpp</h2><div class="refsect2" title="types"><a name="d0e6889"></a><h3>types</h3><div class="refsect3" title="euml_event"><a name="d0e6892"></a><h4>euml_event</h4><p>The basic type for events with eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class EventName> euml_event;</span></span> {<br>}</pre><pre class="programlisting">struct play : euml_event<play>{};</pre></div><div class="refsect3" title="euml_state"><a name="d0e6903"></a><h4>euml_state</h4><p>The basic type for states with eUML. You will usually not use this
|
||||
being different.</p></div><div class="refsect3" title="build_explicit_entry_state"><a name="d0e6888"></a><h4>build_explicit_entry_state</h4><p>This function has the same overloads as build_entry_state and
|
||||
explicit_entry_func_state as return type.</p></div></div></div><div class="refsect1" title="msm/front/euml/common.hpp"><a name="d0e6893"></a><h2>msm/front/euml/common.hpp</h2><div class="refsect2" title="types"><a name="d0e6896"></a><h3>types</h3><div class="refsect3" title="euml_event"><a name="d0e6899"></a><h4>euml_event</h4><p>The basic type for events with eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class EventName> euml_event;</span></span> {<br>}</pre><pre class="programlisting">struct play : euml_event<play>{};</pre></div><div class="refsect3" title="euml_state"><a name="d0e6910"></a><h4>euml_state</h4><p>The basic type for states with eUML. You will usually not use this
|
||||
type directly as it is easier to use BOOST_MSM_EUML_STATE,
|
||||
BOOST_MSM_EUML_INTERRUPT_STATE, BOOST_MSM_EUML_TERMINATE_STATE,
|
||||
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE, BOOST_MSM_EUML_ENTRY_STATE or
|
||||
@@ -493,7 +493,7 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
void foo() {...}
|
||||
template <class Event,class Fsm>
|
||||
void on_entry(Event const& evt,Fsm& fsm){...}
|
||||
};</pre></div><div class="refsect3" title="euml_flag"><a name="d0e6916"></a><h4>euml_flag</h4><p>The basic type for flags with eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class FlagName> euml_flag;</span></span> {<br>}</pre><pre class="programlisting">struct PlayingPaused: euml_flag<PlayingPaused>{};</pre></div><div class="refsect3" title="euml_action"><a name="d0e6927"></a><h4>euml_action</h4><p>The basic type for state or transition behaviors and guards with
|
||||
};</pre></div><div class="refsect3" title="euml_flag"><a name="d0e6923"></a><h4>euml_flag</h4><p>The basic type for flags with eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class FlagName> euml_flag;</span></span> {<br>}</pre><pre class="programlisting">struct PlayingPaused: euml_flag<PlayingPaused>{};</pre></div><div class="refsect3" title="euml_action"><a name="d0e6934"></a><h4>euml_action</h4><p>The basic type for state or transition behaviors and guards with
|
||||
eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class AcionName> euml_action;</span></span> {<br>}</pre><pre class="programlisting">struct close_drawer : euml_action<close_drawer>
|
||||
{
|
||||
template <class Fsm,class Evt,class SourceState,class TargetState>
|
||||
@@ -502,41 +502,41 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
{
|
||||
template <class Event,class Fsm,class State>
|
||||
void operator()(Event const&,Fsm& fsm,State& ){...}
|
||||
};</pre></div><div class="refsect3" title="euml_config"><a name="d0e6942"></a><h4>euml_config</h4><p>The basic type for configuration possibilities with eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class ConfigName> euml_config;</span></span> {<br>}</pre><p>You normally do not use this type directly but instead the instances
|
||||
};</pre></div><div class="refsect3" title="euml_config"><a name="d0e6949"></a><h4>euml_config</h4><p>The basic type for configuration possibilities with eUML.</p><pre class="classsynopsis"> <span class="ooclass"><span class="classname">template <class ConfigName> euml_config;</span></span> {<br>}</pre><p>You normally do not use this type directly but instead the instances
|
||||
of predefined configuration:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>no_exception: disable catching exceptions</p></li><li class="listitem"><p>no_msg_queue: disable message queue. The message queue
|
||||
allows you to send an event for procesing while in an event
|
||||
processing.</p></li><li class="listitem"><p>deferred_events: manually enable handling of deferred
|
||||
events</p></li></ul></div></div><div class="refsect3" title="invalid_type"><a name="d0e6963"></a><h4>invalid_type</h4><p>Type returned by grammar parsers if the grammar is invalid. Seeing
|
||||
this type will result in a static assertion.</p></div><div class="refsect3" title="no_action"><a name="d0e6968"></a><h4>no_action</h4><p>Placeholder type for use in entry/exit or transition behaviors, which
|
||||
does absolutely nothing.</p></div><div class="refsect3" title="source_"><a name="d0e6973"></a><h4>source_</h4><p>Generic object or function for the source state of a given transition:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the source state of a
|
||||
events</p></li></ul></div></div><div class="refsect3" title="invalid_type"><a name="d0e6970"></a><h4>invalid_type</h4><p>Type returned by grammar parsers if the grammar is invalid. Seeing
|
||||
this type will result in a static assertion.</p></div><div class="refsect3" title="no_action"><a name="d0e6975"></a><h4>no_action</h4><p>Placeholder type for use in entry/exit or transition behaviors, which
|
||||
does absolutely nothing.</p></div><div class="refsect3" title="source_"><a name="d0e6980"></a><h4>source_</h4><p>Generic object or function for the source state of a given transition:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the source state of a
|
||||
transition, usually to be used by another function (usually
|
||||
one created by MSM_EUML_METHOD or MSM_EUML_FUNCTION).</p><p>Example:
|
||||
</p><pre class="programlisting">some_user_function_(source_)</pre></li><li class="listitem"><p>as function: returns by reference the attribute passed as
|
||||
parameter.</p><p>Example:
|
||||
</p><pre class="programlisting">source_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="target_"><a name="d0e6993"></a><h4>target_</h4><p>Generic object or function for the target state of a given transition:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the target state of a
|
||||
</p><pre class="programlisting">source_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="target_"><a name="d0e7000"></a><h4>target_</h4><p>Generic object or function for the target state of a given transition:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the target state of a
|
||||
transition, usually to be used by another function (usually
|
||||
one created by MSM_EUML_METHOD or MSM_EUML_FUNCTION).</p><p>Example:
|
||||
</p><pre class="programlisting">some_user_function_(target_)</pre></li><li class="listitem"><p>as function: returns by reference the attribute passed as
|
||||
parameter.</p><p>Example:
|
||||
</p><pre class="programlisting">target_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="state_"><a name="d0e7013"></a><h4>state_</h4><p>Generic object or function for the state of a given entry / exit
|
||||
</p><pre class="programlisting">target_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="state_"><a name="d0e7020"></a><h4>state_</h4><p>Generic object or function for the state of a given entry / exit
|
||||
behavior. state_ means source_ while in the context of an exit behavior
|
||||
and target_ in the context of an entry behavior:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the current state, usually
|
||||
to be used by another function (usually one created by
|
||||
MSM_EUML_METHOD or MSM_EUML_FUNCTION).</p><p>Example:
|
||||
</p><pre class="programlisting">some_user_function_(state_) // calls some_user_function on the current state</pre></li><li class="listitem"><p>as function: returns by reference the attribute passed as
|
||||
parameter.</p><p>Example:
|
||||
</p><pre class="programlisting">state_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="event_"><a name="d0e7033"></a><h4>event_</h4><p>Generic object or function for the event triggering a given transition
|
||||
</p><pre class="programlisting">state_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="event_"><a name="d0e7040"></a><h4>event_</h4><p>Generic object or function for the event triggering a given transition
|
||||
(valid in a transition behavior, as well as in state entry/exit behaviors):</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the event of a transition,
|
||||
usually to be used by another function (usually one created
|
||||
by MSM_EUML_METHOD or MSM_EUML_FUNCTION).</p><p>Example:
|
||||
</p><pre class="programlisting">some_user_function_(event_)</pre></li><li class="listitem"><p>as function: returns by reference the attribute passed as
|
||||
parameter.</p><p>Example:
|
||||
</p><pre class="programlisting">event_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="fsm_"><a name="d0e7053"></a><h4>fsm_</h4><p>Generic object or function for the state machine containing a given transition:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the event of a transition,
|
||||
</p><pre class="programlisting">event_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="fsm_"><a name="d0e7060"></a><h4>fsm_</h4><p>Generic object or function for the state machine containing a given transition:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>as object: returns by reference the event of a transition,
|
||||
usually to be used by another function (usually one created
|
||||
by MSM_EUML_METHOD or MSM_EUML_FUNCTION).</p><p>Example:
|
||||
</p><pre class="programlisting">some_user_function_(fsm_)</pre></li><li class="listitem"><p>as function: returns by reference the attribute passed as
|
||||
parameter.</p><p>Example:
|
||||
</p><pre class="programlisting">fsm_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="substate_"><a name="d0e7073"></a><h4>substate_</h4><p>Generic object or function returning a state of a given state machine:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>with 1 parameter: returns by reference the state passed as
|
||||
</p><pre class="programlisting">fsm_(m_counter)++</pre></li></ul></div></div><div class="refsect3" title="substate_"><a name="d0e7080"></a><h4>substate_</h4><p>Generic object or function returning a state of a given state machine:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>with 1 parameter: returns by reference the state passed as
|
||||
parameter, usually to be used by another function (usually
|
||||
one created by MSM_EUML_METHOD or MSM_EUML_FUNCTION).</p><p>Example:
|
||||
</p><pre class="programlisting">some_user_function_(substate_(my_state))</pre></li><li class="listitem"><p>with 2 parameters: returns by reference the state passed
|
||||
@@ -544,46 +544,46 @@ ActionSequence := Action | (Action ',' Action)</pre><p>Relevant operators are: +
|
||||
parameter, usually to be used by another function (usually
|
||||
one created by MSM_EUML_METHOD or MSM_EUML_FUNCTION). This
|
||||
makes sense when used in combination with attribute_.</p><p>Example (equivalent to the previous example):
|
||||
</p><pre class="programlisting">some_user_function_(substate_(my_state,fsm_))</pre></li></ul></div></div><div class="refsect3" title="attribute_"><a name="d0e7093"></a><h4>attribute_</h4><p>Generic object or function returning the attribute passed (by name) as
|
||||
</p><pre class="programlisting">some_user_function_(substate_(my_state,fsm_))</pre></li></ul></div></div><div class="refsect3" title="attribute_"><a name="d0e7100"></a><h4>attribute_</h4><p>Generic object or function returning the attribute passed (by name) as
|
||||
second parameter of the thing passed as first (a state, event or state
|
||||
machine). Example: </p><p>
|
||||
</p><pre class="programlisting">attribute_(substate_(my_state),cd_name_attribute)++</pre><p>
|
||||
</p></div><div class="refsect3" title="True_"><a name="d0e7103"></a><h4>True_</h4><p>Functor returning true for transition or state behaviors. Like all
|
||||
</p></div><div class="refsect3" title="True_"><a name="d0e7110"></a><h4>True_</h4><p>Functor returning true for transition or state behaviors. Like all
|
||||
constants, only the functor form exists, so parenthesis are necessary.
|
||||
Example:</p><p>
|
||||
</p><pre class="programlisting">if_then_(True_(),/* some action always called*/)</pre><p>
|
||||
</p></div><div class="refsect3" title="False_"><a name="d0e7113"></a><h4>False_</h4><p>Functor returning false for transition or state behaviors. Like all
|
||||
</p></div><div class="refsect3" title="False_"><a name="d0e7120"></a><h4>False_</h4><p>Functor returning false for transition or state behaviors. Like all
|
||||
constants, only the functor form exists, so parenthesis are necessary.
|
||||
Example:</p><p>
|
||||
</p><pre class="programlisting">if_then_(False_(),/* some action never called */)</pre><p>
|
||||
</p></div><div class="refsect3" title="Int_<int value>"><a name="d0e7123"></a><h4>Int_<int value></h4><p>Functor returning an integer value for transition or state behaviors.
|
||||
</p></div><div class="refsect3" title="Int_<int value>"><a name="d0e7130"></a><h4>Int_<int value></h4><p>Functor returning an integer value for transition or state behaviors.
|
||||
Like all constants, only the functor form exists, so parenthesis are
|
||||
necessary. Example:</p><p>
|
||||
</p><pre class="programlisting">target_(m_ringing_cpt) = Int_<RINGING_TIME>() // RINGING_TIME is a constant</pre><p>
|
||||
</p></div><div class="refsect3" title="Char_<char value>"><a name="d0e7133"></a><h4>Char_<char value></h4><p>Functor returning a char value for transition or state behaviors. Like
|
||||
</p></div><div class="refsect3" title="Char_<char value>"><a name="d0e7140"></a><h4>Char_<char value></h4><p>Functor returning a char value for transition or state behaviors. Like
|
||||
all constants, only the functor form exists, so parenthesis are
|
||||
necessary. Example:</p><p>
|
||||
</p><pre class="programlisting">// look for 'S' in event.m_song
|
||||
[string_find_(event_(m_song),Char_<'S'>(),Size_t_<0>()) != Npos_<string>()]</pre><p>
|
||||
</p></div><div class="refsect3" title="Size_t_<size_t value>"><a name="d0e7143"></a><h4>Size_t_<size_t value></h4><p>Functor returning a size_t value for transition or state behaviors.
|
||||
</p></div><div class="refsect3" title="Size_t_<size_t value>"><a name="d0e7150"></a><h4>Size_t_<size_t value></h4><p>Functor returning a size_t value for transition or state behaviors.
|
||||
Like all constants, only the functor form exists, so parenthesis are
|
||||
necessary. Example:</p><p>
|
||||
</p><pre class="programlisting">substr_(event_(m_song),Size_t_<1>()) // returns a substring of event.m_song</pre><p>
|
||||
</p></div><div class="refsect3" title="String_ < mpl::string >"><a name="d0e7153"></a><h4>String_ < mpl::string ></h4><p>Functor returning a string for transition or state behaviors. Like all
|
||||
</p></div><div class="refsect3" title="String_ < mpl::string >"><a name="d0e7160"></a><h4>String_ < mpl::string ></h4><p>Functor returning a string for transition or state behaviors. Like all
|
||||
constants, only the functor form exists, so parenthesis are necessary.
|
||||
Requires boost >= 1.40 for mpl::string.</p><p>Example:</p><p>
|
||||
</p><pre class="programlisting">// adds "Let it be" to fsm.m_src_container
|
||||
push_back_(fsm_(m_src_container), String_<mpl::string<'Let','it ','be'> >())</pre><p>
|
||||
</p></div><div class="refsect3" title="Predicate_ < some_stl_compatible_functor >"><a name="d0e7165"></a><h4>Predicate_ < some_stl_compatible_functor ></h4><p>This functor eUML-enables a STL functor (for use in an algorithm).
|
||||
</p></div><div class="refsect3" title="Predicate_ < some_stl_compatible_functor >"><a name="d0e7172"></a><h4>Predicate_ < some_stl_compatible_functor ></h4><p>This functor eUML-enables a STL functor (for use in an algorithm).
|
||||
This is necessary because all what is in the transition table must be a
|
||||
eUML terminal.</p><p>Example:</p><pre class="programlisting">//equivalent to:
|
||||
//std::accumulate(fsm.m_vec.begin(),fsm.m_vec.end(),1,std::plus<int>())== 1
|
||||
accumulate_(begin_(fsm_(m_vec)),end_(fsm_(m_vec)),Int_<1>(),
|
||||
Predicate_<std::plus<int> >()) == Int_<1>())</pre></div><div class="refsect3" title="process_"><a name="d0e7174"></a><h4>process_</h4><p>This function sends an event to up to 4 state machines by calling
|
||||
Predicate_<std::plus<int> >()) == Int_<1>())</pre></div><div class="refsect3" title="process_"><a name="d0e7181"></a><h4>process_</h4><p>This function sends an event to up to 4 state machines by calling
|
||||
<code class="code">process_event</code> on them:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">process_(some_event)</code> : processes an event in
|
||||
the current (containing) state machine.</p></li><li class="listitem"><p><code class="code">process_(some_event [,fsm1...fsm4] )</code> :
|
||||
processes the same event in the 1-4 state machines passed as
|
||||
argument.</p></li></ul></div></div><div class="refsect3" title="process2_"><a name="d0e7193"></a><h4>process2_</h4><p>This function sends an event to up to 3 state machines by calling
|
||||
argument.</p></li></ul></div></div><div class="refsect3" title="process2_"><a name="d0e7200"></a><h4>process2_</h4><p>This function sends an event to up to 3 state machines by calling
|
||||
<code class="code">process_event</code> on them and copy-constructing the event
|
||||
from the data passed as second parameter:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">process2_(some_event, some_data)</code> : processes
|
||||
an event in the current (containing) state machine.</p></li><li class="listitem"><p><code class="code">process2_(some_event, some_data [,fsm1...fsm3]
|
||||
@@ -593,24 +593,24 @@ accumulate_(begin_(fsm_(m_vec)),end_(fsm_(m_vec)),Int_<1>(),
|
||||
// copy-constructed with event.m_song
|
||||
process2_(NotFound,event_(m_song))</pre><p>
|
||||
</p><p>With the following definitions:</p><pre class="programlisting">BOOST_MSM_EUML_DECLARE_ATTRIBUTE(std::string,m_song)//declaration of m_song
|
||||
NotFound (const string& data) // copy-constructor of NotFound</pre></div><div class="refsect3" title="is_flag_"><a name="d0e7223"></a><h4>is_flag_</h4><p>This function tells if a flag is active by calling
|
||||
NotFound (const string& data) // copy-constructor of NotFound</pre></div><div class="refsect3" title="is_flag_"><a name="d0e7230"></a><h4>is_flag_</h4><p>This function tells if a flag is active by calling
|
||||
<code class="code">is_flag_active</code> on the current state machine or one
|
||||
passed as parameter:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">is_flag_(some_flag)</code> : calls
|
||||
<code class="code">is_flag_active</code> on the current (containing)
|
||||
state machine.</p></li><li class="listitem"><p><code class="code">is_flag_(some_flag, some_fsm)</code> :calls
|
||||
<code class="code">is_flag_active</code> on the state machine.passed
|
||||
as argument.</p></li></ul></div></div><div class="refsect3" title="defer_"><a name="d0e7248"></a><h4>defer_</h4><p>This object defers the current event by calling
|
||||
as argument.</p></li></ul></div></div><div class="refsect3" title="defer_"><a name="d0e7255"></a><h4>defer_</h4><p>This object defers the current event by calling
|
||||
<code class="code">defer_event</code> on the current state machine.
|
||||
Example:</p><pre class="programlisting">Empty() + play() / defer_</pre></div><div class="refsect3" title="explicit_(submachine-name,state-name)"><a name="d0e7258"></a><h4>explicit_(submachine-name,state-name)</h4><p>Used as transition's target, causes an explicit entry into the given
|
||||
Example:</p><pre class="programlisting">Empty() + play() / defer_</pre></div><div class="refsect3" title="explicit_(submachine-name,state-name)"><a name="d0e7265"></a><h4>explicit_(submachine-name,state-name)</h4><p>Used as transition's target, causes an explicit entry into the given
|
||||
state from the given submachine. Several explicit_ as targets, separated
|
||||
by commas, means a fork. The state must have been declared as such using
|
||||
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE.</p></div><div class="refsect3" title="entry_pt_(submachine-name,state-name)"><a name="d0e7263"></a><h4>entry_pt_(submachine-name,state-name)</h4><p>Used as transition's target from a containing state machine, causes
|
||||
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE.</p></div><div class="refsect3" title="entry_pt_(submachine-name,state-name)"><a name="d0e7270"></a><h4>entry_pt_(submachine-name,state-name)</h4><p>Used as transition's target from a containing state machine, causes
|
||||
submachine-name to be entered using the given entry pseudo-state. This
|
||||
state must have been declared as pseudo entry using
|
||||
BOOST_MSM_EUML_ENTRY_STATE.</p></div><div class="refsect3" title="exit_pt_(submachine-name,state-name)"><a name="d0e7268"></a><h4>exit_pt_(submachine-name,state-name)</h4><p>Used as transition's source from a containing state machine, causes
|
||||
BOOST_MSM_EUML_ENTRY_STATE.</p></div><div class="refsect3" title="exit_pt_(submachine-name,state-name)"><a name="d0e7275"></a><h4>exit_pt_(submachine-name,state-name)</h4><p>Used as transition's source from a containing state machine, causes
|
||||
submachine-name to be left using the given exit pseudo-state. This state
|
||||
must have been declared as pseudo exit using
|
||||
BOOST_MSM_EUML_EXIT_STATE.</p></div><div class="refsect3" title="MSM_EUML_FUNCTION"><a name="d0e7273"></a><h4>MSM_EUML_FUNCTION</h4><p>This macro creates a eUML function and a functor for use with the
|
||||
BOOST_MSM_EUML_EXIT_STATE.</p></div><div class="refsect3" title="MSM_EUML_FUNCTION"><a name="d0e7280"></a><h4>MSM_EUML_FUNCTION</h4><p>This macro creates a eUML function and a functor for use with the
|
||||
functor front-end, based on a free function:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>first parameter: the name of the functor</p></li><li class="listitem"><p>second parameter: the underlying function</p></li><li class="listitem"><p>third parameter: the eUML function name</p></li><li class="listitem"><p>fourth parameter: the return type if used in a transition
|
||||
behavior</p></li><li class="listitem"><p>fifth parameter: the return type if used in a state
|
||||
behavior (entry/exit)</p></li></ul></div><p> Note that the function itself can take up to 5
|
||||
@@ -618,7 +618,7 @@ NotFound (const string& data) // copy-constructor of NotFound</pre></div><di
|
||||
</p><pre class="programlisting">MSM_EUML_FUNCTION(BinarySearch_,std::binary_search,binary_search_,bool,bool)</pre><p>
|
||||
</p><p>Can be used like:</p><p>
|
||||
</p><pre class="programlisting">binary_search_(begin_(fsm_(m_var)),end_(fsm_(m_var)),Int_<9>())</pre><p>
|
||||
</p></div><div class="refsect3" title="MSM_EUML_METHOD"><a name="d0e7309"></a><h4>MSM_EUML_METHOD</h4><p>This macro creates a eUML function and a functor for use with the
|
||||
</p></div><div class="refsect3" title="MSM_EUML_METHOD"><a name="d0e7316"></a><h4>MSM_EUML_METHOD</h4><p>This macro creates a eUML function and a functor for use with the
|
||||
functor front-end, based on a method:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>first parameter: the name of the functor</p></li><li class="listitem"><p>second parameter: the underlying function</p></li><li class="listitem"><p>third parameter: the eUML function name</p></li><li class="listitem"><p>fourth parameter: the return type if used in a transition
|
||||
behavior</p></li><li class="listitem"><p>fifth parameter: the return type if used in a state
|
||||
behavior (entry/exit)</p></li></ul></div><p> Note that the method itself can take up to 4 arguments
|
||||
@@ -630,40 +630,40 @@ NotFound (const string& data) // copy-constructor of NotFound</pre></div><di
|
||||
};
|
||||
MSM_EUML_METHOD(ActivateEmpty_,activate_empty,activate_empty_,void,void)</pre><p>Can be used like:</p><p>
|
||||
</p><pre class="programlisting">Empty == Open + open_close / (close_drawer , activate_empty_(target_))</pre><p>
|
||||
</p></div><div class="refsect3" title="BOOST_MSM_EUML_ACTION(action-instance-name)"><a name="d0e7342"></a><h4>BOOST_MSM_EUML_ACTION(action-instance-name)</h4><p>This macro declares a behavior type and a const instance for use in
|
||||
</p></div><div class="refsect3" title="BOOST_MSM_EUML_ACTION(action-instance-name)"><a name="d0e7349"></a><h4>BOOST_MSM_EUML_ACTION(action-instance-name)</h4><p>This macro declares a behavior type and a const instance for use in
|
||||
state or transition behaviors. The action implementation itself follows
|
||||
the macro declaration, for example:</p><pre class="programlisting">BOOST_MSM_EUML_ACTION(good_disk_format)
|
||||
{
|
||||
template <class Fsm,class Evt,class SourceState,class TargetState>
|
||||
void/bool operator()(Evt const& evt,Fsm&,SourceState& ,TargetState& ){...}
|
||||
};</pre></div><div class="refsect3" title="BOOST_MSM_EUML_FLAG(flag-instance-name)"><a name="d0e7349"></a><h4>BOOST_MSM_EUML_FLAG(flag-instance-name)</h4><p>This macro declares a flag type and a const instance for use in
|
||||
behaviors.</p></div><div class="refsect3" title="BOOST_MSM_EUML_FLAG_NAME(flag-instance-name)"><a name="d0e7354"></a><h4>BOOST_MSM_EUML_FLAG_NAME(flag-instance-name)</h4><p>This macro returns the name of the flag type generated by
|
||||
};</pre></div><div class="refsect3" title="BOOST_MSM_EUML_FLAG(flag-instance-name)"><a name="d0e7356"></a><h4>BOOST_MSM_EUML_FLAG(flag-instance-name)</h4><p>This macro declares a flag type and a const instance for use in
|
||||
behaviors.</p></div><div class="refsect3" title="BOOST_MSM_EUML_FLAG_NAME(flag-instance-name)"><a name="d0e7361"></a><h4>BOOST_MSM_EUML_FLAG_NAME(flag-instance-name)</h4><p>This macro returns the name of the flag type generated by
|
||||
BOOST_MSM_EUML_FLAG. You need this where the type is required (usually
|
||||
with the back-end method is_flag_active). For example:</p><pre class="programlisting">fsm.is_flag_active<BOOST_MSM_EUML_FLAG_NAME(CDLoaded)>()</pre></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_ATTRIBUTE(event-type,event-name)"><a name="d0e7361"></a><h4>BOOST_MSM_EUML_DECLARE_ATTRIBUTE(event-type,event-name)</h4><p>This macro declares an attribute called event-name of type event-type.
|
||||
with the back-end method is_flag_active). For example:</p><pre class="programlisting">fsm.is_flag_active<BOOST_MSM_EUML_FLAG_NAME(CDLoaded)>()</pre></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_ATTRIBUTE(event-type,event-name)"><a name="d0e7368"></a><h4>BOOST_MSM_EUML_DECLARE_ATTRIBUTE(event-type,event-name)</h4><p>This macro declares an attribute called event-name of type event-type.
|
||||
This attribute can then be made part of an attribute list using
|
||||
BOOST_MSM_EUML_ATTRIBUTES.</p></div><div class="refsect3" title="BOOST_MSM_EUML_ATTRIBUTES(attributes-expression,attributes-name)"><a name="d0e7366"></a><h4>BOOST_MSM_EUML_ATTRIBUTES(attributes-expression,attributes-name)</h4><p>This macro declares an attribute list called attributes-name based on
|
||||
BOOST_MSM_EUML_ATTRIBUTES.</p></div><div class="refsect3" title="BOOST_MSM_EUML_ATTRIBUTES(attributes-expression,attributes-name)"><a name="d0e7373"></a><h4>BOOST_MSM_EUML_ATTRIBUTES(attributes-expression,attributes-name)</h4><p>This macro declares an attribute list called attributes-name based on
|
||||
the expression as first argument. These attributes can then be made part
|
||||
of an event using BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES, of a state as
|
||||
3rd parameter of BOOST_MSM_EUML_STATE or of a state machine as 5th
|
||||
parameter of BOOST_MSM_EUML_DECLARE_STATE_MACHINE.</p><p>Attributes are added using left-shift, for example:</p><pre class="programlisting">// m_song is of type std::string
|
||||
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(std::string,m_song)
|
||||
// contains one attribute, m_song
|
||||
BOOST_MSM_EUML_ATTRIBUTES((attributes_ << m_song ), FoundDef)</pre></div><div class="refsect3" title="BOOST_MSM_EUML_EVENT(event-instance name)"><a name="d0e7375"></a><h4>BOOST_MSM_EUML_EVENT(event-instance name)</h4><p>This macro defines an event type (event-instance-name_helper) and
|
||||
BOOST_MSM_EUML_ATTRIBUTES((attributes_ << m_song ), FoundDef)</pre></div><div class="refsect3" title="BOOST_MSM_EUML_EVENT(event-instance name)"><a name="d0e7382"></a><h4>BOOST_MSM_EUML_EVENT(event-instance name)</h4><p>This macro defines an event type (event-instance-name_helper) and
|
||||
declares a const instance of this event type called event-instance-name
|
||||
for use in a transition table or state behaviors.</p></div><div class="refsect3" title="BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(event-instance-name,attributes)"><a name="d0e7380"></a><h4>BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(event-instance-name,attributes)</h4><p>This macro defines an event type (event-instance-name_helper) and
|
||||
for use in a transition table or state behaviors.</p></div><div class="refsect3" title="BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(event-instance-name,attributes)"><a name="d0e7387"></a><h4>BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(event-instance-name,attributes)</h4><p>This macro defines an event type (event-instance-name_helper) and
|
||||
declares a const instance of this event type called event-instance-name
|
||||
for use in a transition table or state behaviors. The event will have as
|
||||
attributes the ones passed by the second argument:</p><p><code class="code">BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(Found,FoundDef)</code>
|
||||
</p><p>The created event instance supports operator()(attributes) so that
|
||||
</p><pre class="programlisting">my_back_end.process_event(Found(some_string))</pre><p>
|
||||
is possible.</p></div><div class="refsect3" title="BOOST_MSM_EUML_EVENT_NAME(event-instance-name)"><a name="d0e7394"></a><h4>BOOST_MSM_EUML_EVENT_NAME(event-instance-name)</h4><p>This macro returns the name of the event type generated by
|
||||
is possible.</p></div><div class="refsect3" title="BOOST_MSM_EUML_EVENT_NAME(event-instance-name)"><a name="d0e7401"></a><h4>BOOST_MSM_EUML_EVENT_NAME(event-instance-name)</h4><p>This macro returns the name of the event type generated by
|
||||
BOOST_MSM_EUML_EVENT or BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES. You need
|
||||
this where the type is required (usually inside a back-end definition).
|
||||
For example:</p><p>
|
||||
</p><pre class="programlisting">typedef msm::back::state_machine<Playing_,
|
||||
msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
> > > Playing_type;</pre><p>
|
||||
</p></div><div class="refsect3" title="BOOST_MSM_EUML_STATE(build-expression,state-instance-name)"><a name="d0e7404"></a><h4>BOOST_MSM_EUML_STATE(build-expression,state-instance-name)</h4><p>This macro defines a state type (state-instance-name_helper) and
|
||||
</p></div><div class="refsect3" title="BOOST_MSM_EUML_STATE(build-expression,state-instance-name)"><a name="d0e7411"></a><h4>BOOST_MSM_EUML_STATE(build-expression,state-instance-name)</h4><p>This macro defines a state type (state-instance-name_helper) and
|
||||
declares a const instance of this state type called state-instance-name
|
||||
for use in a transition table or state behaviors.</p><p>There are several possibilitites for the expression syntax:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>(): state without entry or exit action.</p></li><li class="listitem"><p>(Expr1): state with entry but no exit action.</p></li><li class="listitem"><p>(Expr1,Expr2): state with entry and exit action.</p></li><li class="listitem"><p>(Expr1,Expr2,Attributes): state with entry and exit
|
||||
action, defining some attributes.</p></li><li class="listitem"><p>(Expr1,Expr2,Attributes,Configure): state with entry and
|
||||
@@ -672,7 +672,7 @@ msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
events).</p></li><li class="listitem"><p>(Expr1,Expr2,Attributes,Configure,Base): state with entry
|
||||
and exit action, defining some attributes, flags and
|
||||
deferred events (plain msm deferred events) and a
|
||||
non-default base state (as defined in standard MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_INTERRUPT_STATE(build-expression,state-instance-name)"><a name="d0e7430"></a><h4>BOOST_MSM_EUML_INTERRUPT_STATE(build-expression,state-instance-name)</h4><p>This macro defines an interrupt state type
|
||||
non-default base state (as defined in standard MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_INTERRUPT_STATE(build-expression,state-instance-name)"><a name="d0e7437"></a><h4>BOOST_MSM_EUML_INTERRUPT_STATE(build-expression,state-instance-name)</h4><p>This macro defines an interrupt state type
|
||||
(state-instance-name_helper) and declares a const instance of this state
|
||||
type called state-instance-name for use in a transition table or state
|
||||
behaviors.</p><p>There are several possibilitites for the expression syntax. In all of
|
||||
@@ -689,7 +689,7 @@ msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
interrupt state with entry and exit action, defining some
|
||||
attributes, flags and deferred events (plain msm deferred
|
||||
events) and a non-default base state (as defined in standard
|
||||
MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_TERMINATE_STATE(build-expression,state-instance-name)"><a name="d0e7456"></a><h4>BOOST_MSM_EUML_TERMINATE_STATE(build-expression,state-instance-name)</h4><p>This macro defines a terminate pseudo-state type
|
||||
MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_TERMINATE_STATE(build-expression,state-instance-name)"><a name="d0e7463"></a><h4>BOOST_MSM_EUML_TERMINATE_STATE(build-expression,state-instance-name)</h4><p>This macro defines a terminate pseudo-state type
|
||||
(state-instance-name_helper) and declares a const instance of this state
|
||||
type called state-instance-name for use in a transition table or state
|
||||
behaviors.</p><p>There are several possibilitites for the expression syntax:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>(): terminate pseudo-state without entry or exit
|
||||
@@ -703,7 +703,7 @@ msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
pseudo-state with entry and exit action, defining some
|
||||
attributes, flags and deferred events (plain msm deferred
|
||||
events) and a non-default base state (as defined in standard
|
||||
MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_EXIT_STATE(build-expression,state-instance-name)"><a name="d0e7482"></a><h4>BOOST_MSM_EUML_EXIT_STATE(build-expression,state-instance-name)</h4><p>This macro defines an exit pseudo-state type
|
||||
MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_EXIT_STATE(build-expression,state-instance-name)"><a name="d0e7489"></a><h4>BOOST_MSM_EUML_EXIT_STATE(build-expression,state-instance-name)</h4><p>This macro defines an exit pseudo-state type
|
||||
(state-instance-name_helper) and declares a const instance of this state
|
||||
type called state-instance-name for use in a transition table or state
|
||||
behaviors.</p><p>There are several possibilitites for the expression syntax:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>(forwarded_event):exit pseudo-state without entry or exit
|
||||
@@ -719,7 +719,7 @@ msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
attributes, flags and deferred events (plain msm deferred
|
||||
events) and a non-default base state (as defined in standard
|
||||
MSM).</p></li></ul></div><p>Note that the forwarded_event must be constructible from the event
|
||||
sent by the submachine containing the exit point.</p></div><div class="refsect3" title="BOOST_MSM_EUML_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7510"></a><h4>BOOST_MSM_EUML_ENTRY_STATE(int
|
||||
sent by the submachine containing the exit point.</p></div><div class="refsect3" title="BOOST_MSM_EUML_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7517"></a><h4>BOOST_MSM_EUML_ENTRY_STATE(int
|
||||
region-index,build-expression,state-instance-name)</h4><p>This macro defines an entry pseudo-state type
|
||||
(state-instance-name_helper) and declares a const instance of this state
|
||||
type called state-instance-name for use in a transition table or state
|
||||
@@ -734,7 +734,7 @@ msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
pseudo-state with entry and exit action, defining some
|
||||
attributes, flags and deferred events (plain msm deferred
|
||||
events) and a non-default base state (as defined in standard
|
||||
MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7536"></a><h4>BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(int
|
||||
MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7543"></a><h4>BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(int
|
||||
region-index,build-expression,state-instance-name)</h4><p>This macro defines a submachine's substate type
|
||||
(state-instance-name_helper), which can be explicitly entered and also
|
||||
declares a const instance of this state type called state-instance-name
|
||||
@@ -745,28 +745,28 @@ msm::back::ShallowHistory<mpl::vector<BOOST_MSM_EUML_EVENT_NAME(end_pause)
|
||||
events).</p></li><li class="listitem"><p>(Expr1,Expr2,Attributes,Configure,Base): state with entry
|
||||
and exit action, defining some attributes, flags and
|
||||
deferred events (plain msm deferred events) and a
|
||||
non-default base state (as defined in standard MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_STATE_NAME(state-instance-name)"><a name="d0e7562"></a><h4>BOOST_MSM_EUML_STATE_NAME(state-instance-name)</h4><p>This macro returns the name of the state type generated by
|
||||
non-default base state (as defined in standard MSM).</p></li></ul></div></div><div class="refsect3" title="BOOST_MSM_EUML_STATE_NAME(state-instance-name)"><a name="d0e7569"></a><h4>BOOST_MSM_EUML_STATE_NAME(state-instance-name)</h4><p>This macro returns the name of the state type generated by
|
||||
BOOST_MSM_EUML_STATE or other state macros. You need this where the type
|
||||
is required (usually using a backend function). For example:</p><p>
|
||||
</p><pre class="programlisting">fsm.get_state<BOOST_MSM_EUML_STATE_NAME(StringFind)&>().some_state_function();</pre><p>
|
||||
</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_STATE(build-expression,state-instance-name)"><a name="d0e7572"></a><h4>BOOST_MSM_EUML_DECLARE_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_STATE but does not provide an instance, simply a
|
||||
type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_INTERRUPT_STATE(build-expression,state-instance-name)"><a name="d0e7577"></a><h4>BOOST_MSM_EUML_DECLARE_INTERRUPT_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_INTERRUPT_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_TERMINATE_STATE(build-expression,state-instance-name)"><a name="d0e7582"></a><h4>BOOST_MSM_EUML_DECLARE_TERMINATE_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_TERMINATE_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_EXIT_STATE(build-expression,state-instance-name)"><a name="d0e7587"></a><h4>BOOST_MSM_EUML_DECLARE_EXIT_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_EXIT_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7592"></a><h4>BOOST_MSM_EUML_DECLARE_ENTRY_STATE(int
|
||||
</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_STATE(build-expression,state-instance-name)"><a name="d0e7579"></a><h4>BOOST_MSM_EUML_DECLARE_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_STATE but does not provide an instance, simply a
|
||||
type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_INTERRUPT_STATE(build-expression,state-instance-name)"><a name="d0e7584"></a><h4>BOOST_MSM_EUML_DECLARE_INTERRUPT_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_INTERRUPT_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_TERMINATE_STATE(build-expression,state-instance-name)"><a name="d0e7589"></a><h4>BOOST_MSM_EUML_DECLARE_TERMINATE_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_TERMINATE_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_EXIT_STATE(build-expression,state-instance-name)"><a name="d0e7594"></a><h4>BOOST_MSM_EUML_DECLARE_EXIT_STATE(build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_EXIT_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7599"></a><h4>BOOST_MSM_EUML_DECLARE_ENTRY_STATE(int
|
||||
region-index,build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_ENTRY_STATE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_EXPLICIT_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7597"></a><h4>BOOST_MSM_EUML_DECLARE_EXPLICIT_ENTRY_STATE(int
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_EXPLICIT_ENTRY_STATE(int region-index,build-expression,state-instance-name)"><a name="d0e7604"></a><h4>BOOST_MSM_EUML_DECLARE_EXPLICIT_ENTRY_STATE(int
|
||||
region-index,build-expression,state-instance-name)</h4><p>Like BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE but does not provide an
|
||||
instance, simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_TRANSITION_TABLE(expression, table-instance-name)"><a name="d0e7602"></a><h4>BOOST_MSM_EUML_TRANSITION_TABLE(expression,
|
||||
instance, simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_TRANSITION_TABLE(expression, table-instance-name)"><a name="d0e7609"></a><h4>BOOST_MSM_EUML_TRANSITION_TABLE(expression,
|
||||
table-instance-name)</h4><p>This macro declares a transition table type and also declares a const
|
||||
instance of the table which can then be used in a state machine
|
||||
declaration (see BOOST_MSM_EUML_DECLARE_STATE_MACHINE).The expression
|
||||
must follow the <span class="command"><strong><a class="command" href="re03.html#reference-stt-grammar">transition
|
||||
table grammar</a></strong></span>.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(iexpression,table-instance-name)"><a name="d0e7610"></a><h4>BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(iexpression,table-instance-name)</h4><p>Like BOOST_MSM_EUML_TRANSITION_TABLE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_INTERNAL_TRANSITION_TABLE(expression, table-instance-name)"><a name="d0e7615"></a><h4>BOOST_MSM_EUML_INTERNAL_TRANSITION_TABLE(expression,
|
||||
table grammar</a></strong></span>.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(iexpression,table-instance-name)"><a name="d0e7617"></a><h4>BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(iexpression,table-instance-name)</h4><p>Like BOOST_MSM_EUML_TRANSITION_TABLE but does not provide an instance,
|
||||
simply a type declaration.</p></div><div class="refsect3" title="BOOST_MSM_EUML_INTERNAL_TRANSITION_TABLE(expression, table-instance-name)"><a name="d0e7622"></a><h4>BOOST_MSM_EUML_INTERNAL_TRANSITION_TABLE(expression,
|
||||
table-instance-name)</h4><p>This macro declares a transition table type and also declares a const
|
||||
instance of the table.The expression must follow the <span class="command"><strong><a class="command" href="re03.html#reference-stt-grammar">transition table
|
||||
grammar</a></strong></span>. For the moment, this macro is not used.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_INTERNAL_TRANSITION_TABLE(iexpression,table-instance-name)"><a name="d0e7623"></a><h4>BOOST_MSM_EUML_DECLARE_INTERNAL_TRANSITION_TABLE(iexpression,table-instance-name)</h4><p>Like BOOST_MSM_EUML_TRANSITION_TABLE but does not provide an instance,
|
||||
grammar</a></strong></span>. For the moment, this macro is not used.</p></div><div class="refsect3" title="BOOST_MSM_EUML_DECLARE_INTERNAL_TRANSITION_TABLE(iexpression,table-instance-name)"><a name="d0e7630"></a><h4>BOOST_MSM_EUML_DECLARE_INTERNAL_TRANSITION_TABLE(iexpression,table-instance-name)</h4><p>Like BOOST_MSM_EUML_TRANSITION_TABLE but does not provide an instance,
|
||||
simply a type declaration. This is currently the only way to declare an
|
||||
internal transition table with eUML. For example:</p><pre class="programlisting">BOOST_MSM_EUML_DECLARE_STATE((Open_Entry,Open_Exit),Open_def)
|
||||
struct Open_impl : public Open_def
|
||||
|
||||
Reference in New Issue
Block a user