#include "uscxml/Interpreter.h"
#include "glog/logging.h"
using namespace uscxml;
int main(int argc, char** argv) {
google::LogToStderr();
google::InitGoogleLogging(argv[0]);
const char* scxmlContent =
""
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" ";
std::string msg;
uscxml::Interpreter scxml = uscxml::Interpreter(uscxml::Interpreter::fromXML(scxmlContent, ""));
std::list issues = scxml.validate();
for (std::list::iterator issueIter = issues.begin(); issueIter != issues.end(); issueIter++) {
std::cout << *issueIter << std::endl;
}
scxml.addMonitor(new StateTransitionMonitor());
uscxml::InterpreterState state;
do {
state = scxml.step();
} while(state != uscxml::USCXML_FINISHED && state != uscxml::USCXML_DESTROYED);
std::cout << "************************************" << std::endl;
std::cout << "Successfully finished state machine!" << std::endl;
return EXIT_SUCCESS;
}