diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-15 19:55:13 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-15 19:55:13 (GMT) |
commit | f9a620340ddce2a17fd775d1e210268cac13377b (patch) | |
tree | 58d8dad794e5a34237c2738fe77c151d0810624f /README.md | |
parent | 49127140ed2ad91bfcf532b3d2265582cb80b0db (diff) | |
download | uscxml-f9a620340ddce2a17fd775d1e210268cac13377b.zip uscxml-f9a620340ddce2a17fd775d1e210268cac13377b.tar.gz uscxml-f9a620340ddce2a17fd775d1e210268cac13377b.tar.bz2 |
Introduced interpreter.step()
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -107,6 +107,19 @@ or return immediately. You will have to call this method every now and then if y Interpreter scxml = Interpreter::fromXML("<scxml><final id="exit"/></scxml>"); scxml.interpret(); // blocking +When using blocking interpretation, it is assumed that it is running on the main thread and +it will call <tt>runOnMainThread</tt> between stable configurations. + +### Interleaved Interpretation with inline SCXML + Interpreter scxml = Interpreter::fromXML("<scxml><final id="exit"/></scxml>"); + InterpreterState state; + do { + state = interpreter.step(true); // boolean argument causes blocking or not + } while(state > 0) + +Using <tt>step</tt>, you can run a single macrostep of the interpreter and interleave +interpretation with the rest of your code. + ### Callbacks for an Interpreter You can register an <tt>InterpreterMonitor</tt> prior to start in order to receive |