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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- For Mobile Devices -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>uSCXML: uscxml::Interpreter Class Reference</title>
<!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="doxy-boot.js"></script>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand">uSCXML 2.0.0</a>
</div>
</div>
</nav>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div class="content" id="content">
<div class="container">
<div class="row">
<div class="col-sm-12 panel " style="padding-bottom: 15px;">
<div style="margin-bottom: 15px;">
<!-- end header part --><!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>uscxml</b></li><li class="navelem"><a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="classuscxml_1_1_interpreter-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">uscxml::Interpreter Class Reference<div class="ingroups"><a class="el" href="group__interpreter.html">Interpreter</a> | <a class="el" href="group__facade.html">Facades</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Central class to interpret and process SCXML documents.
<a href="classuscxml_1_1_interpreter.html#details">More...</a></p>
<p><code>#include <<a class="el" href="_interpreter_8h_source.html">Interpreter.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4bc6779fb41b1bb12d137f62b32eca4f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bc6779fb41b1bb12d137f62b32eca4f"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a4bc6779fb41b1bb12d137f62b32eca4f">addMonitor</a> (<a class="el" href="classuscxml_1_1_interpreter_monitor.html">InterpreterMonitor</a> *monitor)</td></tr>
<tr class="memdesc:a4bc6779fb41b1bb12d137f62b32eca4f"><td class="mdescLeft"> </td><td class="mdescRight">Attach a monitor to make more details of the interpreter observable. <br /></td></tr>
<tr class="separator:a4bc6779fb41b1bb12d137f62b32eca4f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6cffb6d5573c2168e0215b5389a44aa8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6cffb6d5573c2168e0215b5389a44aa8"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a6cffb6d5573c2168e0215b5389a44aa8">cancel</a> ()</td></tr>
<tr class="memdesc:a6cffb6d5573c2168e0215b5389a44aa8"><td class="mdescLeft"> </td><td class="mdescRight">Unblock and mark for finalize. <br /></td></tr>
<tr class="separator:a6cffb6d5573c2168e0215b5389a44aa8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaf7fa4cdb85a97331f3c69d54675949f"><td class="memItemLeft" align="right" valign="top">std::list< XERCESC_NS::DOMElement * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#aaf7fa4cdb85a97331f3c69d54675949f">getConfiguration</a> ()</td></tr>
<tr class="memdesc:aaf7fa4cdb85a97331f3c69d54675949f"><td class="mdescLeft"> </td><td class="mdescRight">Get all state elements that constitute the active configuration. <a href="#aaf7fa4cdb85a97331f3c69d54675949f">More...</a><br /></td></tr>
<tr class="separator:aaf7fa4cdb85a97331f3c69d54675949f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a24ac91189b526ed80edc4b34e02bca53"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24ac91189b526ed80edc4b34e02bca53"></a>
std::shared_ptr< <a class="el" href="classuscxml_1_1_interpreter_impl.html">InterpreterImpl</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a24ac91189b526ed80edc4b34e02bca53">getImpl</a> () const </td></tr>
<tr class="memdesc:a24ac91189b526ed80edc4b34e02bca53"><td class="mdescLeft"> </td><td class="mdescRight">Return the actual implementation of the Interperter. <br /></td></tr>
<tr class="separator:a24ac91189b526ed80edc4b34e02bca53"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5738136c5b6c4621269b3af5878318fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5738136c5b6c4621269b3af5878318fd"></a>
<a class="el" href="classuscxml_1_1_logger.html">Logger</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a5738136c5b6c4621269b3af5878318fd">getLogger</a> ()</td></tr>
<tr class="memdesc:a5738136c5b6c4621269b3af5878318fd"><td class="mdescLeft"> </td><td class="mdescRight">Return the logger associated with this interpreter. <br /></td></tr>
<tr class="separator:a5738136c5b6c4621269b3af5878318fd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a013f7011d488894349b88fea2fbe4a52"><td class="memItemLeft" align="right" valign="top">InterpreterState </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a013f7011d488894349b88fea2fbe4a52">getState</a> ()</td></tr>
<tr class="memdesc:a013f7011d488894349b88fea2fbe4a52"><td class="mdescLeft"> </td><td class="mdescRight">The current state of the interpreter, not to be confused with its configuration. <a href="#a013f7011d488894349b88fea2fbe4a52">More...</a><br /></td></tr>
<tr class="separator:a013f7011d488894349b88fea2fbe4a52"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a05096251daf3f0665b275d8528244565"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a05096251daf3f0665b275d8528244565">isInState</a> (const std::string &stateId)</td></tr>
<tr class="memdesc:a05096251daf3f0665b275d8528244565"><td class="mdescLeft"> </td><td class="mdescRight">Determine whether the state with the given <code>id</code> is in the active configuration. <a href="#a05096251daf3f0665b275d8528244565">More...</a><br /></td></tr>
<tr class="separator:a05096251daf3f0665b275d8528244565"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed09ee1f90bc1e12397329c198c59be0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed09ee1f90bc1e12397329c198c59be0"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#aed09ee1f90bc1e12397329c198c59be0">PIMPL_OPERATORS</a> (<a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a>)</td></tr>
<tr class="memdesc:aed09ee1f90bc1e12397329c198c59be0"><td class="mdescLeft"> </td><td class="mdescRight">See PIMPL_OPERATORS macro in <a class="el" href="_common_8h.html">Common.h</a>. <br /></td></tr>
<tr class="separator:aed09ee1f90bc1e12397329c198c59be0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2279af2a6c78d2123e2a083903414e72"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a2279af2a6c78d2123e2a083903414e72">receive</a> (const <a class="el" href="classuscxml_1_1_event.html">Event</a> &event)</td></tr>
<tr class="memdesc:a2279af2a6c78d2123e2a083903414e72"><td class="mdescLeft"> </td><td class="mdescRight">Enqueue an event to the interpreter's external queue. <a href="#a2279af2a6c78d2123e2a083903414e72">More...</a><br /></td></tr>
<tr class="separator:a2279af2a6c78d2123e2a083903414e72"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3e048de612f479a6d20b036e4a5195b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e048de612f479a6d20b036e4a5195b1"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a3e048de612f479a6d20b036e4a5195b1">removeMonitor</a> (<a class="el" href="classuscxml_1_1_interpreter_monitor.html">InterpreterMonitor</a> *monitor)</td></tr>
<tr class="memdesc:a3e048de612f479a6d20b036e4a5195b1"><td class="mdescLeft"> </td><td class="mdescRight">Remove a monitor that was attached previously. <br /></td></tr>
<tr class="separator:a3e048de612f479a6d20b036e4a5195b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acd21b0cc08aee82e55685955cc3fe64c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd21b0cc08aee82e55685955cc3fe64c"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#acd21b0cc08aee82e55685955cc3fe64c">reset</a> ()</td></tr>
<tr class="memdesc:acd21b0cc08aee82e55685955cc3fe64c"><td class="mdescLeft"> </td><td class="mdescRight">Finalize and reset interpeter. <br /></td></tr>
<tr class="separator:acd21b0cc08aee82e55685955cc3fe64c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a269f8d91e9ea8e213fd51cac9964c6a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a269f8d91e9ea8e213fd51cac9964c6a3"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a269f8d91e9ea8e213fd51cac9964c6a3">setActionLanguage</a> (<a class="el" href="classuscxml_1_1_action_language.html">ActionLanguage</a> actionLanguage)</td></tr>
<tr class="memdesc:a269f8d91e9ea8e213fd51cac9964c6a3"><td class="mdescLeft"> </td><td class="mdescRight">Adapt the constituting components for a SCXML interpreter. <br /></td></tr>
<tr class="separator:a269f8d91e9ea8e213fd51cac9964c6a3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afd8517746bffe62cb368124fd44f2840"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd8517746bffe62cb368124fd44f2840"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#afd8517746bffe62cb368124fd44f2840">setFactory</a> (<a class="el" href="classuscxml_1_1_factory.html">Factory</a> *factory)</td></tr>
<tr class="memdesc:afd8517746bffe62cb368124fd44f2840"><td class="mdescLeft"> </td><td class="mdescRight">Provide a custom <a class="el" href="classuscxml_1_1_factory.html">Factory</a> to instantiate dynamic instances for this and invoked state-chart instances. <br /></td></tr>
<tr class="separator:afd8517746bffe62cb368124fd44f2840"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9e935bc5d73504768d59ceac2882f586"><td class="memItemLeft" align="right" valign="top">InterpreterState </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a9e935bc5d73504768d59ceac2882f586">step</a> (size_t blockMs=std::numeric_limits< size_t >::max())</td></tr>
<tr class="memdesc:a9e935bc5d73504768d59ceac2882f586"><td class="mdescLeft"> </td><td class="mdescRight">Advance the state-machine by a single microstep and return. <a href="#a9e935bc5d73504768d59ceac2882f586">More...</a><br /></td></tr>
<tr class="separator:a9e935bc5d73504768d59ceac2882f586"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab72353f9d89d1c64dcc3501e86ed7472"><td class="memItemLeft" align="right" valign="top">std::list< <a class="el" href="classuscxml_1_1_interpreter_issue.html">InterpreterIssue</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#ab72353f9d89d1c64dcc3501e86ed7472">validate</a> ()</td></tr>
<tr class="memdesc:ab72353f9d89d1c64dcc3501e86ed7472"><td class="mdescLeft"> </td><td class="mdescRight">Return a list of possible syntactic and semantic issues with the interpreter's state-chart. <a href="#ab72353f9d89d1c64dcc3501e86ed7472">More...</a><br /></td></tr>
<tr class="separator:ab72353f9d89d1c64dcc3501e86ed7472"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a6650b96dbf1e87996aef4c46ad99aadb"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a6650b96dbf1e87996aef4c46ad99aadb">fromClone</a> (const <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> &other)</td></tr>
<tr class="memdesc:a6650b96dbf1e87996aef4c46ad99aadb"><td class="mdescLeft"> </td><td class="mdescRight">Instantiate an Interpeter as a copy of another. <a href="#a6650b96dbf1e87996aef4c46ad99aadb">More...</a><br /></td></tr>
<tr class="separator:a6650b96dbf1e87996aef4c46ad99aadb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abc2f0ea505323e6d7af6c23d62963c54"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#abc2f0ea505323e6d7af6c23d62963c54">fromDocument</a> (XERCESC_NS::DOMDocument *dom, const std::string &baseURL, bool copy=true)</td></tr>
<tr class="memdesc:abc2f0ea505323e6d7af6c23d62963c54"><td class="mdescLeft"> </td><td class="mdescRight">Instantiate an Interpeter with a given XML document. <a href="#abc2f0ea505323e6d7af6c23d62963c54">More...</a><br /></td></tr>
<tr class="separator:abc2f0ea505323e6d7af6c23d62963c54"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a99c0413d9093d482ed46bf3d1ea2ed13"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#a99c0413d9093d482ed46bf3d1ea2ed13">fromElement</a> (XERCESC_NS::DOMElement *element, const std::string &baseURL)</td></tr>
<tr class="memdesc:a99c0413d9093d482ed46bf3d1ea2ed13"><td class="mdescLeft"> </td><td class="mdescRight">Instantiate an Interpeter with a given XML element. <a href="#a99c0413d9093d482ed46bf3d1ea2ed13">More...</a><br /></td></tr>
<tr class="separator:a99c0413d9093d482ed46bf3d1ea2ed13"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab3b1107314bbabcc642fe323bb6c76b7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#ab3b1107314bbabcc642fe323bb6c76b7">fromURL</a> (const std::string &url)</td></tr>
<tr class="memdesc:ab3b1107314bbabcc642fe323bb6c76b7"><td class="mdescLeft"> </td><td class="mdescRight">Instantiate an Interpeter with a document located at an <a class="el" href="classuscxml_1_1_u_r_l.html">URL</a>. <a href="#ab3b1107314bbabcc642fe323bb6c76b7">More...</a><br /></td></tr>
<tr class="separator:ab3b1107314bbabcc642fe323bb6c76b7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2966a3c1cf0503772c1054ee3af94ad"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classuscxml_1_1_interpreter.html#ac2966a3c1cf0503772c1054ee3af94ad">fromXML</a> (const std::string &xml, const std::string &baseURL)</td></tr>
<tr class="memdesc:ac2966a3c1cf0503772c1054ee3af94ad"><td class="mdescLeft"> </td><td class="mdescRight">Instantiate an Interpeter from a string containined proper XML markup. <a href="#ac2966a3c1cf0503772c1054ee3af94ad">More...</a><br /></td></tr>
<tr class="separator:ac2966a3c1cf0503772c1054ee3af94ad"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ac75b2088bc8f8fa00225988962f8159c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac75b2088bc8f8fa00225988962f8159c"></a>
std::shared_ptr< <a class="el" href="classuscxml_1_1_interpreter_impl.html">InterpreterImpl</a> > </td><td class="memItemRight" valign="bottom"><b>_impl</b></td></tr>
<tr class="separator:ac75b2088bc8f8fa00225988962f8159c"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Instances of this class are available from the static constructors. In order to use an interpreter instance to actually <em>do</em> things, you will want to provide an <a class="el" href="classuscxml_1_1_action_language.html" title="Collection of instances for interpreter that constitute its action language. ">ActionLanguage</a> and an <a class="el" href="classuscxml_1_1_interpreter_monitor.html">InterpreterMonitor</a>.</p>
<p>We did avoid threading primitives within the core interpreter (there is threading for nested interpeters in the <a class="el" href="classuscxml_1_1_u_s_c_x_m_l_invoker.html" title="An invoker for other SCXML instances. ">USCXMLInvoker</a>, though). As such, you will have to call the <step> function continuously. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6650b96dbf1e87996aef4c46ad99aadb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> uscxml::Interpreter::fromClone </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>The other interpreter. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="abc2f0ea505323e6d7af6c23d62963c54"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> uscxml::Interpreter::fromDocument </td>
<td>(</td>
<td class="paramtype">XERCESC_NS::DOMDocument * </td>
<td class="paramname"><em>dom</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>baseURL</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>copy</em> = <code>true</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">dom</td><td>A pointer to the XML document. </td></tr>
<tr><td class="paramname">baseURL</td><td>An absolute <a class="el" href="classuscxml_1_1_u_r_l.html">URL</a> to resolve relative URLs in the document. </td></tr>
<tr><td class="paramname">copy</td><td>Whether to make a copy of the document, we deallocate it either way. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a99c0413d9093d482ed46bf3d1ea2ed13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> uscxml::Interpreter::fromElement </td>
<td>(</td>
<td class="paramtype">XERCESC_NS::DOMElement * </td>
<td class="paramname"><em>element</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>baseURL</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This constructor will create a new document and copy/import the given element. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">element</td><td>The element to be copies/imported as the new document element. </td></tr>
<tr><td class="paramname">baseURL</td><td>An absolute <a class="el" href="classuscxml_1_1_u_r_l.html">URL</a> to resolve relative URLs in the document. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab3b1107314bbabcc642fe323bb6c76b7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> uscxml::Interpreter::fromURL </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>url</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">url</td><td>An absolute <a class="el" href="classuscxml_1_1_u_r_l.html">URL</a> to locate the SCXML document. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac2966a3c1cf0503772c1054ee3af94ad"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classuscxml_1_1_interpreter.html">Interpreter</a> uscxml::Interpreter::fromXML </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>xml</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>baseURL</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">xml</td><td>Textual representation of an SCXML document. </td></tr>
<tr><td class="paramname">baseURL</td><td>An absolute <a class="el" href="classuscxml_1_1_u_r_l.html">URL</a> to resolve relative URLs in the document. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aaf7fa4cdb85a97331f3c69d54675949f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::list< XERCESC_NS::DOMElement * > uscxml::Interpreter::getConfiguration </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A list of XML elements of the active states. </dd></dl>
</div>
</div>
<a class="anchor" id="a013f7011d488894349b88fea2fbe4a52"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">InterpreterState uscxml::Interpreter::getState </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The current state of the interpreter object. </dd></dl>
</div>
</div>
<a class="anchor" id="a05096251daf3f0665b275d8528244565"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool uscxml::Interpreter::isInState </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>stateId</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">id</td><td>An identifier for a state from the SCXML document. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the interpreter is in state <code>id</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a2279af2a6c78d2123e2a083903414e72"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void uscxml::Interpreter::receive </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classuscxml_1_1_event.html">Event</a> & </td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>An event to be enqueued </p>
</div>
</div>
<a class="anchor" id="a9e935bc5d73504768d59ceac2882f586"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">InterpreterState uscxml::Interpreter::step </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>blockMs</em> = <code>std::numeric_limits<size_t>::max()</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This is the central function to drive the state machine. Calling <a class="el" href="classuscxml_1_1_interpreter.html#a9e935bc5d73504768d59ceac2882f586" title="Advance the state-machine by a single microstep and return. ">step()</a> will perform one <em>microstep</em> and return the current state of the interpreter. Here, the state is not to be confused with the interpreter's configuration.</p>
<div class="fragment"><div class="line"> InterpreterState state = uscxml::USCXML_UNDEF;</div>
<div class="line"> <span class="keywordflow">while</span>((state = scxml.step()) != uscxml::USCXML_FINISHED) {</div>
<div class="line"> <span class="keywordflow">switch</span> (state) {</div>
<div class="line"> <span class="keywordflow">case</span> USCXML_MICROSTEPPED:</div>
<div class="line"> <span class="keywordflow">case</span> USCXML_MACROSTEPPED:</div>
<div class="line"> <span class="comment">/* Interpreter performed a microstep */</span></div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> <span class="keywordflow">default</span>:</div>
<div class="line"> <span class="keywordflow">break</span>;</div>
<div class="line"> }</div>
<div class="line"> }</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">blockMs</td><td>The maximum duration in milli-seconds to wait for an event to become available. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new state of the interpreter object. </dd></dl>
</div>
</div>
<a class="anchor" id="ab72353f9d89d1c64dcc3501e86ed7472"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::list< <a class="el" href="classuscxml_1_1_interpreter_issue.html">InterpreterIssue</a> > uscxml::Interpreter::validate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A list of <a class="el" href="classuscxml_1_1_interpreter_issue.html" title="Identify and report syntactic and semantic problems with a SCXML state-charts. ">InterpreterIssue</a>s </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_interpreter_8h_source.html">Interpreter.h</a></li>
<li><a class="el" href="_interpreter_8cpp.html">Interpreter.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<!-- <hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 12 2016 19:50:06 for uSCXML by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address> -->
</body>
</html>
|