summaryrefslogtreecommitdiffstats
path: root/examples/cpp/library/lambdas/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cpp/library/lambdas/main.cpp')
-rw-r--r--examples/cpp/library/lambdas/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/cpp/library/lambdas/main.cpp b/examples/cpp/library/lambdas/main.cpp
new file mode 100644
index 0000000..316576b
--- /dev/null
+++ b/examples/cpp/library/lambdas/main.cpp
@@ -0,0 +1,17 @@
+#include <iostream>
+#include "uscxml/uscxml.h"
+
+int main(int argc, char *argv[])
+{
+ if (argc < 2) {
+ std::cerr << "Expected URL with SCXML document as first argument" << std::endl;
+ return -1;
+ }
+
+ uscxml::Interpreter sc = uscxml::Interpreter::fromURL(argv[1]);
+ uscxml::InterpreterState state;
+ while ((state = sc.step()) != uscxml::USCXML_FINISHED) {
+ }
+
+ return 0;
+}