File: uml_mapping.html

package info (click to toggle)
boost1.62 1.62.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 686,420 kB
  • sloc: cpp: 2,609,004; xml: 972,558; ansic: 53,674; python: 32,437; sh: 8,829; asm: 3,071; cs: 2,121; makefile: 964; perl: 859; yacc: 472; php: 132; ruby: 94; f90: 55; sql: 13; csh: 6
file content (364 lines) | stat: -rw-r--r-- 13,072 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <meta http-equiv="Content-Language" content="en-us">
  <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
  <meta name="ProgId" content="FrontPage.Editor.Document">
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
  <link rel="stylesheet" type="text/css" href="../../../boost.css">

  <title>The Boost Statechart Library - Definitions</title>
</head>

<body link="#0000FF" vlink="#800080">
  <table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
  "header">
    <tr>
      <td valign="top" width="300">
        <h3><a href="../../../index.htm"><img alt="C++ Boost" src=
        "../../../boost.png" border="0" width="277" height="86"></a></h3>
      </td>

      <td valign="top">
        <h1 align="center">The Boost Statechart Library</h1>

        <h2 align="center">UML to Boost.Statechart mapping summary</h2>
      </td>
    </tr>
  </table>
  <hr>

  <h2>Contents</h2>

  <dl class="page-index">
    <dt><a href="#StateMachine">State machine</a></dt>

    <dt><a href="#States">States</a></dt>

    <dd><a href="#NormalState">Normal state</a></dd>

    <dd><a href="#InitialPseudostate">Initial pseudostate</a></dd>

    <dd><a href="#FinalPseudostate">Final pseudostate</a></dd>

    <dd><a href="#ShallowHistoryPseudostate">Shallow history
    pseudostate</a></dd>

    <dd><a href="#DeepHistoryPseudostate">Deep history pseudostate</a></dd>

    <dd><a href="#JunctionPoint">Junction point</a></dd>

    <dd><a href="#DynamicChoicePoint">Dynamic choice point</a></dd>

    <dd><a href="#JoinAndForkBars">Join and fork bars</a></dd>

    <dt><a href="#Events">Events</a></dt>

    <dd><a href="#CallEvent">Call event</a></dd>

    <dd><a href="#SignalEvent">Signal event</a></dd>

    <dd><a href="#TimeEvent">Time event</a></dd>

    <dd><a href="#ChangeEvent">Change event</a></dd>

    <dt><a href="#Reactions">Reactions</a></dt>

    <dd><a href="#Guard">Guard</a></dd>

    <dd><a href="#Transition">Transition</a></dd>

    <dd><a href="#Deferral">Deferral</a></dd>

    <dd><a href="#InternalTransition">Internal transition (in-state
    reaction)</a></dd>

    <dt><a href="#Actions">Actions</a></dt>

    <dd><a href="#EntryAction">Entry action</a></dd>

    <dd><a href="#ExitAction">Exit action</a></dd>

    <dd><a href="#TransitionAction">Transition action</a></dd>

    <dd><a href="#DoActivity">Do activity</a></dd>
  </dl>
  <hr>

  <h2><a name="StateMachine" id="StateMachine">State machine</a></h2>

  <ul>
    <li>A state machine is defined by deriving a class from either the
    <code><a href=
    "reference.html#ClassTemplatestate_machine">state_machine</a></code> or
    the <code><a href=
    "reference.html#ClassTemplateasynchronous_state_machine">asynchronous_state_machine</a></code>
    class templates; <a href=
    "tutorial.html#DefiningStatesAndEvents">example</a></li>
  </ul>

  <h2><a name="States" id="States">States</a></h2>

  <h3><a name="NormalState" id="NormalState">Normal state</a></h3>

  <ul>
    <li>A state is defined by deriving a class from either the <code><a href=
    "reference.html#ClassTemplatesimple_state">simple_state</a></code> or
    <code><a href="reference.html#ClassTemplatestate">state</a></code> class
    templates; <a href=
    "tutorial.html#DefiningStatesAndEvents">example</a></li>

    <li>The position of a state in the state hierarchy is defined by what is
    passed as the <code>Context</code> template parameter. <a href=
    "definitions.html#OutermostState">Outermost states</a> pass the
    <code><a href=
    "reference.html#ClassTemplatestate_machine">state_machine&lt;&gt;</a></code>
    or <code><a href=
    "reference.html#ClassTemplateasynchronous_state_machine">asynchronous_state_machine&lt;&gt;</a></code>
    subtype they belong to, inner states pass their direct outer state;
    <a href="tutorial.html#DefiningStatesAndEvents">example</a></li>

    <li>A state can be made a member of a particular orthogonal region by
    passing an instantiation of the <code>orthogonal</code> class template
    nested in its outer state; <a href=
    "tutorial.html#OrthogonalStates">example</a></li>
  </ul>

  <h3><a name="InitialPseudostate" id="InitialPseudostate">Initial
  pseudostate</a></h3>

  <ul>
    <li>The state that is initially entered is identified by template
    parameters rather than by a default transition from the initial
    pseudostate (there is no such thing in Boost.Statechart)</li>

    <li>For <code><a href=
    "reference.html#ClassTemplatestate_machine">state_machine&lt;&gt;</a></code>
    and <code><a href=
    "reference.html#ClassTemplateasynchronous_state_machine">asynchronous_state_machine&lt;&gt;</a></code>
    the state that is initially entered needs to be specified with the
    <code>InitialState</code> template parameter; <a href=
    "tutorial.html#DefiningStatesAndEvents">example</a></li>

    <li>For <code><a href=
    "reference.html#ClassTemplatesimple_state">simple_state&lt;&gt;</a></code>
    and <code><a href=
    "reference.html#ClassTemplatestate">state&lt;&gt;</a></code> the inner
    state(s) that is/are initially entered can be specified with the
    <code>InnerInitial</code> template parameter; <a href=
    "tutorial.html#DefiningStatesAndEvents">example</a></li>
  </ul>

  <h3><a name="FinalPseudostate" id="FinalPseudostate">Final
  pseudostate</a></h3>

  <ul>
    <li>There is no such thing as a final pseudostate in
    Boost.Statechart</li>

    <li>This functionality is implemented with a special reaction
    (<code><a href=
    "reference.html#ClassTemplatetermination">termination&lt;&gt;</a></code>)
    and special reaction function (<code><a href=
    "reference.html#simple_state::terminate">simple_state&lt;&gt;::terminate()</a></code>);
    <a href="tutorial.html#StateQueries">example</a></li>
  </ul>

  <h3><a name="ShallowHistoryPseudostate" id=
  "ShallowHistoryPseudostate">Shallow history pseudostate</a></h3>

  <ul>
    <li>A shallow history transition target or shallow history inner initial
    state can be specified with <code><a href=
    "reference.html#ClassTemplateshallow_history">shallow_history&lt;&gt;</a></code></li>
  </ul>

  <h3><a name="DeepHistoryPseudostate" id="DeepHistoryPseudostate">Deep
  history pseudostate</a></h3>

  <ul>
    <li>A deep history transition target or deep history inner initial state
    can be specified with <code><a href=
    "reference.html#ClassTemplatedeep_history">deep_history&lt;&gt;</a></code>;
    <a href="tutorial.html#History">example</a></li>
  </ul>

  <h3><a name="JunctionPoint" id="JunctionPoint">Junction point</a></h3>

  <ul>
    <li>Does not exist in Boost.Statechart; <a href=
    "rationale.html#Limitations">rationale</a></li>
  </ul>

  <h3><a name="DynamicChoicePoint" id="DynamicChoicePoint">Dynamic choice
  point</a></h3>

  <ul>
    <li>Does not (yet?) exist in Boost.Statechart; <a href=
    "rationale.html#Limitations">rationale</a></li>
  </ul>

  <h3><a name="JoinAndForkBars" id="JoinAndForkBars">Join and fork
  bars</a></h3>

  <ul>
    <li>Do not exist in Boost.Statechart; <a href=
    "rationale.html#Limitations">rationale</a></li>
  </ul>

  <h2><a name="Events" id="Events">Events</a></h2>

  <ul>
    <li>A event is defined by deriving a class from the <a href=
    "reference.html#ClassTemplateevent"><code>event</code></a> class
    template; <a href=
    "tutorial.html#DefiningStatesAndEvents">example</a></li>

    <li>There is no distinction between signal and call events, see
    below</li>
  </ul>

  <h3><a name="CallEvent" id="CallEvent">Call event</a></h3>

  <ul>
    <li>All events passed to <code><a href=
    "reference.html#process_event">state_machine&lt;&gt;::process_event()</a></code>
    are implicitly call events</li>
  </ul>

  <h3><a name="SignalEvent" id="SignalEvent">Signal event</a></h3>

  <ul>
    <li>All events passed to either <code><a href=
    "reference.html#post_event0">simple_state&lt;&gt;::post_event()</a></code>
    or <code><a href=
    "reference.html#queue_event">fifo_scheduler&lt;&gt;::queue_event()</a></code>
    are implicitly signal events</li>
  </ul>

  <h3><a name="TimeEvent" id="TimeEvent">Time event</a></h3>

  <ul>
    <li>Does not exist in Boost.Statechart</li>

    <li>A time event can be simulated with an external timer that is started
    in the entry action and stopped in the exit action of a particular state.
    When starting the timer, it is instructed to call <code><a href=
    "reference.html#queue_event">fifo_scheduler&lt;&gt;::queue_event()</a></code>
    when the due time elapses</li>
  </ul>

  <h3><a name="ChangeEvent" id="ChangeEvent">Change event</a></h3>

  <ul>
    <li>Does not exist in Boost.Statechart</li>

    <li>A change event can be simulated by packing to be monitored variables
    into an external wrapper with <code>get</code> and <code>set</code>
    methods. Whenever <code>set</code> is called the wrapper posts an
    appropriate event</li>
  </ul>

  <h2><a name="Reactions" id="Reactions">Reactions</a></h2>

  <h3><a name="Guard" id="Guard">Guard</a></h3>

  <ul>
    <li>A guard can be implemented with a selection statement in a
    <code><a href=
    "reference.html#ClassTemplatecustom_reaction">custom_reaction&lt;&gt;</a></code>;
    <a href="tutorial.html#Guards">example</a></li>
  </ul>

  <h3><a name="Transition" id="Transition">Transition</a></h3>

  <ul>
    <li>A transition can be defined with either a <code><a href=
    "reference.html#ClassTemplatetransition">transition&lt;&gt;</a></code> or
    a call to <code><a href=
    "reference.html#transit1">simple_state&lt;&gt;::transit&lt;&gt;</a></code>
    in a <code><a href=
    "reference.html#ClassTemplatecustom_reaction">custom_reaction&lt;&gt;</a></code>;
    <a href="tutorial.html#AddingReactions">example</a></li>
  </ul>

  <h3><a name="Deferral" id="Deferral">Deferral</a></h3>

  <ul>
    <li>A deferral reaction can be defined with either a <code><a href=
    "reference.html#ClassTemplatedeferral">deferral&lt;&gt;</a></code> or a
    call to <code><a href=
    "reference.html#defer_event">simple_state&lt;&gt;::defer_event()</a></code>
    in a <code><a href=
    "reference.html#ClassTemplatecustom_reaction">custom_reaction&lt;&gt;</a></code>;
    <a href="tutorial.html#DeferringEvents">example</a></li>
  </ul>

  <h3><a name="InternalTransition" id="InternalTransition">Internal
  transition (in-state reaction)</a></h3>

  <ul>
    <li>An in-state reaction can be defined with either a <code><a href=
    "reference.html#ClassTemplatein_state_reaction">in_state_reaction&lt;&gt;</a></code>
    or a call to <a href=
    "reference.html#discard_event"><code>simple_state&lt;&gt;::discard_event()</code></a>
    in a <code><a href=
    "reference.html#ClassTemplatecustom_reaction">custom_reaction&lt;&gt;</a></code></li>
  </ul>

  <h2><a name="Actions" id="Actions">Actions</a></h2>

  <h3><a name="EntryAction" id="EntryAction">Entry action</a></h3>

  <ul>
    <li>A state entry action can be defined by adding a constructor to a
    state class; <a href="tutorial.html#HelloWorld">example</a></li>
  </ul>

  <h3><a name="ExitAction" id="ExitAction">Exit action</a></h3>

  <ul>
    <li>A state exit action can be defined by adding a destructor to a state
    class; <a href="tutorial.html#HelloWorld">example</a></li>
  </ul>

  <h3><a name="TransitionAction" id="TransitionAction">Transition
  action</a></h3>

  <ul>
    <li>A transition action can be defined by passing a function pointer
    referencing the action to either <code><a href=
    "reference.html#ClassTemplatetransition">transition&lt;&gt;</a></code> or
    <code><a href=
    "reference.html#transit2">simple_state&lt;&gt;::transit&lt;&gt;()</a></code>;
    <a href="tutorial.html#TransitionActions">example</a></li>
  </ul>

  <h3><a name="DoActivity" id="DoActivity">Do activity</a></h3>

  <ul>
    <li>Not supported in Boost.Statechart</li>

    <li>A do activity can be simulated with a separate thread that is started
    in the entry action and cancelled (!) in the exit action of a particular
    state</li>
  </ul>
  <hr>

  <p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
  "../../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
  height="31" width="88"></a></p>

  <p>Revised 
  <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->03 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38512" --></p>

  <p><i>Copyright &copy; 2003-<!--webbot bot="Timestamp" s-type="EDITED" s-format="%Y" startspan -->2006<!--webbot bot="Timestamp" endspan i-checksum="770" -->
  <a href="contact.html">Andreas Huber D&ouml;nni</a></i></p>

  <p><i>Distributed under the Boost Software License, Version 1.0. (See
  accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  copy at <a href=
  "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
</body>
</html>