blob: 9ce39d9ab6fb66925df730d82b6887f76f5a2bb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "uscxml/Interpreter.h"
#include "uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h"
int main(int argc, char** argv) {
if (argc != 2) {
std::cerr << "Expected path to test-ecmascript.scxml" << std::endl;
exit(EXIT_FAILURE);
}
using namespace uscxml;
using namespace Arabica::DOM;
using namespace Arabica::XPath;
Interpreter* scxml = Interpreter::fromURI(argv[1]);
scxml->start();
scxml->waitForStabilization();
Event event1;
event1.name = "event1";
scxml->receive(event1);
scxml->join();
tthread::this_thread::sleep_for(tthread::chrono::milliseconds(500));
}
|