2 <meta http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
3 <title>Chapter
10.
eUML operators and basic helpers
</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=
"ch09.html" title=
"Chapter 9. External references to MSM"><link rel=
"next" href=
"ch11.html" title=
"Chapter 11. Functional programming"></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">Chapter
10.
eUML operators and basic helpers
</th></tr><tr><td width=
"20%" align=
"left"><a accesskey=
"p" href=
"ch09.html">Prev
</a> </td><th width=
"60%" align=
"center">Part
II.
Reference
</th><td width=
"20%" align=
"right"> <a accesskey=
"n" href=
"ch11.html">Next
</a></td></tr></table><hr></div><div class=
"chapter" title=
"Chapter 10. eUML operators and basic helpers"><div class=
"titlepage"><div><div><h2 class=
"title"><a name=
"d0e3705"></a>Chapter
10.
eUML operators and basic helpers
</h2></div></div></div><p>The following table lists the supported operators:
</p><p>
4 </p><div class=
"table"><a name=
"d0e3712"></a><p class=
"title"><b>Table
10.1.
Operators and state machine helpers
</b></p><div class=
"table-contents"><table summary=
"Operators and state machine helpers" border=
"1"><colgroup><col><col><col></colgroup><thead><tr><th>eUML function / operator
</th><th>Description
</th><th>Functor
</th></tr></thead><tbody><tr><td>&&</td><td>Calls lazily Action1
&& Action2
</td><td>And_
</td></tr><tr><td>||
</td><td>Calls lazily Action1|| Action2
</td><td>Or_
</td></tr><tr><td>!
</td><td>Calls lazily !Action1
</td><td>Not_
</td></tr><tr><td>!=
</td><td>Calls lazily Action1 != Action2
</td><td>NotEqualTo_
</td></tr><tr><td>==
</td><td>Calls lazily Action1 == Action2
</td><td>EqualTo_
</td></tr><tr><td>></td><td>Calls lazily Action1
> Action2
</td><td>Greater_
</td></tr><tr><td>>=
</td><td>Calls lazily Action1
>= Action2
</td><td>Greater_Equal_
</td></tr><tr><td><</td><td>Calls lazily Action1
< Action2
</td><td>Less_
</td></tr><tr><td><=
</td><td>Calls lazily Action1
<= Action2
</td><td>Less_Equal_
</td></tr><tr><td>&</td><td>Calls lazily Action1
& Action2
</td><td>Bitwise_And_
</td></tr><tr><td>|
</td><td>Calls lazily Action1 | Action2
</td><td>Bitwise_Or_
</td></tr><tr><td>^
</td><td>Calls lazily Action1 ^ Action2
</td><td>Bitwise_Xor_
</td></tr><tr><td>--
</td><td>Calls lazily --Action1 / Action1--
</td><td>Pre_Dec_ / Post_Dec_
</td></tr><tr><td>++
</td><td>Calls lazily ++Action1 / Action1++
</td><td>Pre_Inc_ / Post_Inc_
</td></tr><tr><td>/
</td><td>Calls lazily Action1 / Action2
</td><td>Divides_
</td></tr><tr><td>/=
</td><td>Calls lazily Action1 /= Action2
</td><td>Divides_Assign_
</td></tr><tr><td>*
</td><td>Calls lazily Action1 * Action2
</td><td>Multiplies_
</td></tr><tr><td>*=
</td><td>Calls lazily Action1 *= Action2
</td><td>Multiplies_Assign_
</td></tr><tr><td>+ (binary)
</td><td>Calls lazily Action1 + Action2
</td><td>Plus_
</td></tr><tr><td>+ (unary)
</td><td>Calls lazily +Action1
</td><td>Unary_Plus_
</td></tr><tr><td>+=
</td><td>Calls lazily Action1 += Action2
</td><td>Plus_Assign_
</td></tr><tr><td>- (binary)
</td><td>Calls lazily Action1 - Action2
</td><td>Minus_
</td></tr><tr><td>- (unary)
</td><td>Calls lazily -Action1
</td><td>Unary_Minus_
</td></tr><tr><td>-=
</td><td>Calls lazily Action1 -= Action2
</td><td>Minus_Assign_
</td></tr><tr><td>%
</td><td>Calls lazily Action1 % Action2
</td><td>Modulus_
</td></tr><tr><td>%=
</td><td>Calls lazily Action1 %= Action2
</td><td>Modulus_Assign_
</td></tr><tr><td>>></td><td>Calls lazily Action1
>> Action2
</td><td>ShiftRight_
</td></tr><tr><td>>>=
</td><td>Calls lazily Action1
>>= Action2
</td><td>ShiftRight_Assign_
</td></tr><tr><td><<</td><td>Calls lazily Action1
<< Action2
</td><td>ShiftLeft_
</td></tr><tr><td><<=
</td><td>Calls lazily Action1
<<= Action2
</td><td>ShiftLeft_Assign_
</td></tr><tr><td>[] (works on vector, map, arrays)
</td><td>Calls lazily Action1 [Action2]
</td><td>Subscript_
</td></tr><tr><td>if_then_else_(Condition,Action1,Action2)
</td><td>Returns either the result of calling Action1 or the result of
5 calling Action2
</td><td>If_Else_
</td></tr><tr><td>if_then_(Condition,Action)
</td><td>Returns the result of calling Action if Condition
</td><td>If_Then_
</td></tr><tr><td>while_(Condition, Body)
</td><td>While Condition(), calls Body(). Returns nothing
</td><td>While_Do_
</td></tr><tr><td>do_while_(Condition, Body)
</td><td>Calls Body() while Condition(). Returns nothing
</td><td>Do_While_
</td></tr><tr><td>for_(Begin,Stop,EndLoop,Body)
</td><td>Calls for(Begin;Stop;EndLoop){Body;}
</td><td>For_Loop_
</td></tr><tr><td>process_(Event [,fsm1] [,fsm2] [,fsm3] [,fsm4])
</td><td>Processes Event on the current state machine (if no fsm
6 specified) or on up to
4 state machines returned by an
7 appropriate functor.
</td><td>Process_
</td></tr><tr><td>process2_(Event, Data [,fsm1] [,fsm2] [,fsm3])
</td><td>Processes Event on the current state machine (if no fsm
8 specified) or on up to
2 state machines returned by an
9 appropriate functor. The event is copy-constructed from what
10 Data() returns.
</td><td>Process2_
</td></tr><tr><td>is_flag_(Flag [,fsm])
</td><td>Calls is_flag_active() on the current state machine or the
11 one returned by calling fsm.
</td><td>Get_Flag_
</td></tr><tr><td>event_ [(attribute name)]
</td><td>Returns the current event (as const reference)
</td><td>GetEvent_
</td></tr><tr><td>source_ [(attribute name)]
</td><td>Returns the source state of the currently triggered
12 transition (as reference). If an attribute name is provided,
13 returns the attribute by reference.
</td><td>GetSource_
</td></tr><tr><td>target_ [(attribute name)]
</td><td>Returns the target state of the currently triggered
14 transition (as reference). If an attribute name is provided,
15 returns the attribute by reference.
</td><td>GetTarget_
</td></tr><tr><td>state_ [(attribute name)]
</td><td>Returns the source state of the currently active state (as
16 reference). Valid inside a state entry/exit action. If an
17 attribute name is provided, returns the attribute by
18 reference.
</td><td>GetState_
</td></tr><tr><td>fsm_ [(attribute name)]
</td><td>Returns the current state machine (as reference). Valid
19 inside a state entry/exit action or a transition. If an
20 attribute name is provided, returns the attribute by
21 reference.
</td><td>GetFsm_
</td></tr><tr><td>substate_(state_name [,fsm])
</td><td>Returns (as reference) the state state_name referenced in the
22 current state machine or the one given as argument.
</td><td>SubState_
</td></tr></tbody></table></div></div><p><br class=
"table-break">
23 </p><p>To use these functions, you need to include:
</p><p><code class=
"code">#include
<msm/front/euml/euml.hpp
></code></p></div><div class=
"navfooter"><hr><table width=
"100%" summary=
"Navigation footer"><tr><td width=
"40%" align=
"left"><a accesskey=
"p" href=
"ch09.html">Prev
</a> </td><td width=
"20%" align=
"center"><a accesskey=
"u" href=
"pt02.html">Up
</a></td><td width=
"40%" align=
"right"> <a accesskey=
"n" href=
"ch11.html">Next
</a></td></tr><tr><td width=
"40%" align=
"left" valign=
"top">Chapter
9.
External references to MSM
</td><td width=
"20%" align=
"center"><a accesskey=
"h" href=
"index.html">Home
</a></td><td width=
"40%" align=
"right" valign=
"top"> Chapter
11.
24 Functional programming
</td></tr></table></div></body></html>