summaryrefslogtreecommitdiffstats
path: root/src/uscxml/interpreter
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-10-25 11:59:18 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-10-25 11:59:18 (GMT)
commit954a1eb75f2abc81da1e09701d700674f0baddfb (patch)
tree873eb6412e958ecd53214ddbd6a3e17465da5100 /src/uscxml/interpreter
parent1a1513c6497e8818eb2a92a8fbf77d4c60bc911e (diff)
downloaduscxml-954a1eb75f2abc81da1e09701d700674f0baddfb.zip
uscxml-954a1eb75f2abc81da1e09701d700674f0baddfb.tar.gz
uscxml-954a1eb75f2abc81da1e09701d700674f0baddfb.tar.bz2
Worked on PROMELA transformation
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r--src/uscxml/interpreter/BasicContentExecutor.cpp20
-rw-r--r--src/uscxml/interpreter/BasicEventQueue.cpp20
-rw-r--r--src/uscxml/interpreter/BasicEventQueue.h6
-rw-r--r--src/uscxml/interpreter/ContentExecutorImpl.h2
-rw-r--r--src/uscxml/interpreter/EventQueue.cpp2
-rw-r--r--src/uscxml/interpreter/EventQueue.h2
-rw-r--r--src/uscxml/interpreter/EventQueueImpl.h2
-rw-r--r--src/uscxml/interpreter/FastMicroStep.cpp96
-rw-r--r--src/uscxml/interpreter/FastMicroStep.h16
-rw-r--r--src/uscxml/interpreter/InterpreterImpl.cpp44
-rw-r--r--src/uscxml/interpreter/InterpreterImpl.h47
-rw-r--r--src/uscxml/interpreter/InterpreterMonitor.h4
-rw-r--r--src/uscxml/interpreter/MicroStepImpl.h4
13 files changed, 132 insertions, 133 deletions
diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp
index f85e2b8..9f58b46 100644
--- a/src/uscxml/interpreter/BasicContentExecutor.cpp
+++ b/src/uscxml/interpreter/BasicContentExecutor.cpp
@@ -210,7 +210,7 @@ void BasicContentExecutor::processCancel(XERCESC_NS::DOMElement* content) {
void BasicContentExecutor::processIf(XERCESC_NS::DOMElement* content) {
bool blockIsTrue = _callbacks->isTrue(ATTR(content, "cond"));
- for (auto childElem = content->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
+ for (auto childElem = content->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
if (iequals(TAGNAME(childElem), XML_PREFIX(content).str() + "elseif")) {
if (blockIsTrue) {
// last block was true, break here
@@ -252,7 +252,7 @@ void BasicContentExecutor::processForeach(XERCESC_NS::DOMElement* content) {
for (uint32_t iteration = 0; iteration < iterations; iteration++) {
_callbacks->setForeach(item, array, index, iteration);
- for (auto childElem = content->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
+ for (auto childElem = content->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
process(childElem, XML_PREFIX(content));
}
}
@@ -285,7 +285,7 @@ void BasicContentExecutor::process(XERCESC_NS::DOMElement* block, const X& xmlPr
iequals(tagName, xmlPrefix.str() + "transition")) {
try {
- for (auto childElem = block->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
+ for (auto childElem = block->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
// process any child eleents
process(childElem, xmlPrefix);
}
@@ -404,7 +404,7 @@ void BasicContentExecutor::invoke(XERCESC_NS::DOMElement* element) {
_callbacks->assign(ATTR(element, "idlocation"), Data(invokeEvent.invokeid, Data::VERBATIM));
}
}
-
+
// we need the invokeid to uninvoke
char* invokeId = (char*)malloc(invokeEvent.invokeid.size() + 1);
memcpy(invokeId, invokeEvent.invokeid.c_str(), invokeEvent.invokeid.size());
@@ -477,7 +477,7 @@ void BasicContentExecutor::uninvoke(XERCESC_NS::DOMElement* invoke) {
_callbacks->uninvoke(invokeId);
USCXML_MONITOR_CALLBACK2(_callbacks->getMonitors(), afterUninvoking, invoke, invokeId);
- invoke->setUserData(X("invokeid"), NULL, NULL);
+ invoke->setUserData(X("invokeid"), NULL, NULL);
free(invokeId);
}
@@ -558,7 +558,7 @@ Data BasicContentExecutor::elementAsData(XERCESC_NS::DOMElement* element) {
if (HAS_ATTR(element, "expr")) {
// return _callbacks->evalAsData(ATTR(element, "expr"));
#if 0
- if (LOCALNAME(element) == "content") {
+ if (LOCALNAME(element) == "content") {
// test 528
return _callbacks->evalAsData(ATTR(element, "expr"));
} else {
@@ -566,7 +566,7 @@ Data BasicContentExecutor::elementAsData(XERCESC_NS::DOMElement* element) {
return Data(ATTR(element, "expr"), Data::INTERPRETED);
}
#endif
- return _callbacks->evalAsData(ATTR(element, "expr"));
+ return _callbacks->evalAsData(ATTR(element, "expr"));
}
if (HAS_ATTR(element, "src")) {
@@ -582,7 +582,7 @@ Data BasicContentExecutor::elementAsData(XERCESC_NS::DOMElement* element) {
std::string content = url.getInContent();
// make an attempt to parse as XML
- try {
+ try {
XERCESC_NS::XercesDOMParser parser;
parser.setValidationScheme(XERCESC_NS::XercesDOMParser::Val_Never);
parser.setDoNamespaces(true);
@@ -600,8 +600,8 @@ Data BasicContentExecutor::elementAsData(XERCESC_NS::DOMElement* element) {
XERCESC_NS::DOMDocument* doc = parser.adoptDocument();
d.adoptedDoc = std::shared_ptr<XERCESC_NS::DOMDocument>(doc);
d.node = doc->getDocumentElement();
-
- return d;
+
+ return d;
} catch (...) {
// just ignore and return as an interpreted string below
diff --git a/src/uscxml/interpreter/BasicEventQueue.cpp b/src/uscxml/interpreter/BasicEventQueue.cpp
index 3cf4daf..cc5ff04 100644
--- a/src/uscxml/interpreter/BasicEventQueue.cpp
+++ b/src/uscxml/interpreter/BasicEventQueue.cpp
@@ -36,11 +36,11 @@ Event BasicEventQueue::dequeue(size_t blockMs) {
if (blockMs > 0) {
- // block for given milliseconds or until queue is filled
- auto endTime = std::chrono::system_clock::now() + std::chrono::milliseconds(blockMs);
-
- while (_queue.empty()) {
- _cond.wait_until(_mutex, endTime);
+ // block for given milliseconds or until queue is filled
+ auto endTime = std::chrono::system_clock::now() + std::chrono::milliseconds(blockMs);
+
+ while (_queue.empty()) {
+ _cond.wait_until(_mutex, endTime);
}
}
@@ -61,8 +61,8 @@ void BasicEventQueue::enqueue(const Event& event) {
}
void BasicEventQueue::reset() {
- std::lock_guard<std::recursive_mutex> lock(_mutex);
- _queue.clear();
+ std::lock_guard<std::recursive_mutex> lock(_mutex);
+ _queue.clear();
}
static void dummyCallback(evutil_socket_t fd, short what, void *arg) {
@@ -198,9 +198,9 @@ void BasicDelayedEventQueue::stop() {
}
void BasicDelayedEventQueue::reset() {
- std::lock_guard<std::recursive_mutex> lock(_mutex);
- cancelAllDelayed();
- _queue.clear();
+ std::lock_guard<std::recursive_mutex> lock(_mutex);
+ cancelAllDelayed();
+ _queue.clear();
}
} \ No newline at end of file
diff --git a/src/uscxml/interpreter/BasicEventQueue.h b/src/uscxml/interpreter/BasicEventQueue.h
index 1542e30..2bc739e 100644
--- a/src/uscxml/interpreter/BasicEventQueue.h
+++ b/src/uscxml/interpreter/BasicEventQueue.h
@@ -43,8 +43,8 @@ public:
virtual ~BasicEventQueue();
virtual Event dequeue(size_t blockMs);
virtual void enqueue(const Event& event);
- virtual void reset();
-
+ virtual void reset();
+
protected:
std::list<Event> _queue;
std::recursive_mutex _mutex;
@@ -68,7 +68,7 @@ public:
virtual void enqueue(const Event& event) {
return BasicEventQueue::enqueue(event);
}
- virtual void reset();
+ virtual void reset();
protected:
struct callbackData {
diff --git a/src/uscxml/interpreter/ContentExecutorImpl.h b/src/uscxml/interpreter/ContentExecutorImpl.h
index ad4d695..ca565f0 100644
--- a/src/uscxml/interpreter/ContentExecutorImpl.h
+++ b/src/uscxml/interpreter/ContentExecutorImpl.h
@@ -66,7 +66,7 @@ public:
/** Monitoring */
virtual std::set<InterpreterMonitor*> getMonitors() = 0;
- virtual Interpreter getInterpreter() = 0;
+ virtual Interpreter getInterpreter() = 0;
};
diff --git a/src/uscxml/interpreter/EventQueue.cpp b/src/uscxml/interpreter/EventQueue.cpp
index 7ff0bfb..dd83f38 100644
--- a/src/uscxml/interpreter/EventQueue.cpp
+++ b/src/uscxml/interpreter/EventQueue.cpp
@@ -39,7 +39,7 @@ void EventQueue::enqueue(const Event& event) {
return _impl->enqueue(event);
}
void EventQueue::reset() {
- return _impl->reset();
+ return _impl->reset();
}
PIMPL_OPERATORS_INHERIT_IMPL(DelayedEventQueue, EventQueue)
diff --git a/src/uscxml/interpreter/EventQueue.h b/src/uscxml/interpreter/EventQueue.h
index 37b90be..79d0c26 100644
--- a/src/uscxml/interpreter/EventQueue.h
+++ b/src/uscxml/interpreter/EventQueue.h
@@ -38,7 +38,7 @@ public:
virtual Event dequeue(size_t blockMs);
virtual void enqueue(const Event& event);
- virtual void reset();
+ virtual void reset();
protected:
std::shared_ptr<EventQueueImpl> _impl;
diff --git a/src/uscxml/interpreter/EventQueueImpl.h b/src/uscxml/interpreter/EventQueueImpl.h
index befd684..1f99226 100644
--- a/src/uscxml/interpreter/EventQueueImpl.h
+++ b/src/uscxml/interpreter/EventQueueImpl.h
@@ -42,7 +42,7 @@ class USCXML_API EventQueueImpl {
public:
virtual Event dequeue(size_t blockMs) = 0;
virtual void enqueue(const Event& event) = 0;
- virtual void reset() = 0;
+ virtual void reset() = 0;
};
/**
diff --git a/src/uscxml/interpreter/FastMicroStep.cpp b/src/uscxml/interpreter/FastMicroStep.cpp
index 826df93..b0fda1f 100644
--- a/src/uscxml/interpreter/FastMicroStep.cpp
+++ b/src/uscxml/interpreter/FastMicroStep.cpp
@@ -91,24 +91,24 @@ FastMicroStep::~FastMicroStep() {
void FastMicroStep::resortStates(DOMElement* element, const X& xmlPrefix) {
- /**
+ /**
initials
deep histories
shallow histories
everything else
*/
- DOMElement* child = element->getFirstElementChild();
- while(child) {
- resortStates(child, xmlPrefix);
- child = child->getNextElementSibling();
- }
+ DOMElement* child = element->getFirstElementChild();
+ while(child) {
+ resortStates(child, xmlPrefix);
+ child = child->getNextElementSibling();
+ }
// shallow history states to top
child = element->getFirstElementChild();
while(child) {
if (TAGNAME_CAST(child) == xmlPrefix.str() + "history" &&
- (!HAS_ATTR(element, "type") || iequals(ATTR(element, "type"), "shallow"))) {
+ (!HAS_ATTR(element, "type") || iequals(ATTR(element, "type"), "shallow"))) {
DOMElement* tmp = child->getNextElementSibling();
if (child != element->getFirstChild()) {
@@ -154,34 +154,34 @@ void FastMicroStep::resortStates(DOMElement* element, const X& xmlPrefix) {
}
std::list<XERCESC_NS::DOMElement*> FastMicroStep::getExitSetCached(const XERCESC_NS::DOMElement* transition,
- const XERCESC_NS::DOMElement* root) {
-
- if (_cache.exitSet.find(transition) == _cache.exitSet.end()) {
- _cache.exitSet[transition] = getExitSet(transition, root);
- }
-
- return _cache.exitSet[transition];
+ const XERCESC_NS::DOMElement* root) {
+
+ if (_cache.exitSet.find(transition) == _cache.exitSet.end()) {
+ _cache.exitSet[transition] = getExitSet(transition, root);
+ }
+
+ return _cache.exitSet[transition];
}
bool FastMicroStep::conflictsCached(const DOMElement* t1, const DOMElement* t2, const DOMElement* root) {
- if (getSourceState(t1) == getSourceState(t2))
- return true;
-
- if (DOMUtils::isDescendant(getSourceState(t1), getSourceState(t2)))
- return true;
-
- if (DOMUtils::isDescendant(getSourceState(t2), getSourceState(t1)))
- return true;
-
- if (DOMUtils::hasIntersection(getExitSetCached(t1, root), getExitSetCached(t2, root)))
- return true;
-
- return false;
+ if (getSourceState(t1) == getSourceState(t2))
+ return true;
+
+ if (DOMUtils::isDescendant(getSourceState(t1), getSourceState(t2)))
+ return true;
+
+ if (DOMUtils::isDescendant(getSourceState(t2), getSourceState(t1)))
+ return true;
+
+ if (DOMUtils::hasIntersection(getExitSetCached(t1, root), getExitSetCached(t2, root)))
+ return true;
+
+ return false;
}
-
+
void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
-
+
_scxml = scxml;
_binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY);
_xmlPrefix = _scxml->getPrefix();
@@ -193,7 +193,7 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
resortStates(_scxml, _xmlPrefix);
// assert(false);
// throw NULL;
-
+
/** -- All things states -- */
std::list<XERCESC_NS::DOMElement*> tmp;
@@ -356,8 +356,8 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
assert(_transitions[i]->element != NULL);
// std::cout << "i: " << i << std::endl << std::flush;
std::list<DOMElement*> exitList = getExitSetCached(_transitions[i]->element, _scxml);
- _cache.exitSet[_transitions[i]->element] = exitList;
-
+ _cache.exitSet[_transitions[i]->element] = exitList;
+
for (j = 0; j < _states.size(); j++) {
if (!exitList.empty() && _states[j]->element == exitList.front()) {
_transitions[i]->exitSet[j] = true;
@@ -369,7 +369,7 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
assert(exitList.size() == 0);
// establish the transitions' conflict set
- for (j = i; j < _transitions.size(); j++) {
+ for (j = i; j < _transitions.size(); j++) {
if (conflictsCached(_transitions[i]->element, _transitions[j]->element, _scxml)) {
_transitions[i]->conflicts[j] = true;
} else {
@@ -377,13 +377,13 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
}
// std::cout << ".";
}
-
- // conflicts matrix is symmetric
- for (j = 0; j < i; j++) {
- _transitions[i]->conflicts[j] = _transitions[j]->conflicts[i];
- }
-
+ // conflicts matrix is symmetric
+ for (j = 0; j < i; j++) {
+ _transitions[i]->conflicts[j] = _transitions[j]->conflicts[i];
+ }
+
+
// establish the transitions' target set
std::list<std::string> targets = tokenize(ATTR(_transitions[i]->element, "target"));
for (auto tIter = targets.begin(); tIter != targets.end(); tIter++) {
@@ -421,9 +421,9 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
// the transitions event and condition
_transitions[i]->event = (HAS_ATTR(_transitions[i]->element, "event") ?
- ATTR(_transitions[i]->element, "event") : "");
+ ATTR(_transitions[i]->element, "event") : "");
_transitions[i]->cond = (HAS_ATTR(_transitions[i]->element, "cond") ?
- ATTR(_transitions[i]->element, "cond") : "");
+ ATTR(_transitions[i]->element, "cond") : "");
// is there executable content?
if (_transitions[i]->element->getChildElementCount() > 0) {
@@ -431,7 +431,7 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) {
}
}
- _cache.exitSet.clear();
+ _cache.exitSet.clear();
_isInitialized = true;
}
@@ -942,11 +942,11 @@ ESTABLISH_ENTRYSET:
// are we running in circles?
if (_microstepConfigurations.find(_configuration) != _microstepConfigurations.end()) {
- InterpreterIssue issue("Reentering same configuration during microstep - possible endless loop",
- NULL,
- InterpreterIssue::USCXML_ISSUE_WARNING);
-
- USCXML_MONITOR_CALLBACK1(_callbacks->getMonitors(),
+ InterpreterIssue issue("Reentering same configuration during microstep - possible endless loop",
+ NULL,
+ InterpreterIssue::USCXML_ISSUE_WARNING);
+
+ USCXML_MONITOR_CALLBACK1(_callbacks->getMonitors(),
reportIssue,
issue);
}
@@ -1068,7 +1068,7 @@ std::list<DOMElement*> FastMicroStep::getCompletion(const DOMElement* state) {
completion.push_back(initElems.front());
} else {
// first child state
- for (auto childElem = state->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
+ for (auto childElem = state->getFirstElementChild(); childElem; childElem = childElem->getNextElementSibling()) {
if (isState(childElem)) {
completion.push_back(childElem);
break;
diff --git a/src/uscxml/interpreter/FastMicroStep.h b/src/uscxml/interpreter/FastMicroStep.h
index dd58480..1fbc8f4 100644
--- a/src/uscxml/interpreter/FastMicroStep.h
+++ b/src/uscxml/interpreter/FastMicroStep.h
@@ -91,10 +91,10 @@ protected:
unsigned char type;
};
- class CachedPredicates {
- public:
- std::map<const XERCESC_NS::DOMElement*, std::list<XERCESC_NS::DOMElement*> > exitSet;
- };
+ class CachedPredicates {
+ public:
+ std::map<const XERCESC_NS::DOMElement*, std::list<XERCESC_NS::DOMElement*> > exitSet;
+ };
virtual void init(XERCESC_NS::DOMElement* scxml);
@@ -127,12 +127,12 @@ private:
std::list<XERCESC_NS::DOMElement*> getHistoryCompletion(const XERCESC_NS::DOMElement* state);
void resortStates(XERCESC_NS::DOMElement* node, const X& xmlPrefix);
- bool conflictsCached(const XERCESC_NS::DOMElement* t1, const XERCESC_NS::DOMElement* t2, const XERCESC_NS::DOMElement* root); ///< overrides implementation Predicates::conflicts for speed
+ bool conflictsCached(const XERCESC_NS::DOMElement* t1, const XERCESC_NS::DOMElement* t2, const XERCESC_NS::DOMElement* root); ///< overrides implementation Predicates::conflicts for speed
- std::list<XERCESC_NS::DOMElement*> getExitSetCached(const XERCESC_NS::DOMElement* transition,
- const XERCESC_NS::DOMElement* root);
+ std::list<XERCESC_NS::DOMElement*> getExitSetCached(const XERCESC_NS::DOMElement* transition,
+ const XERCESC_NS::DOMElement* root);
- CachedPredicates _cache;
+ CachedPredicates _cache;
#ifdef USCXML_VERBOSE
void printStateNames(const boost::dynamic_bitset<>& bitset);
diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp
index 5cbae3c..d3b044a 100644
--- a/src/uscxml/interpreter/InterpreterImpl.cpp
+++ b/src/uscxml/interpreter/InterpreterImpl.cpp
@@ -82,27 +82,27 @@ InterpreterImpl::InterpreterImpl() : _isInitialized(false), _document(NULL), _sc
InterpreterImpl::~InterpreterImpl() {
-
- // make sure we deallocate all user-data in the DOM,
- // this is neccesary if we were aborted early
- std::list<DOMElement*> invokes = DOMUtils::filterChildElements(_xmlPrefix.str() + "invoke", _scxml, true);
- for (auto invoke : invokes) {
- char* invokeId = (char*)invoke->getUserData(X("invokeid"));
- if (invokeId != NULL) {
- free(invokeId);
- invoke->setUserData(X("invokeid"), NULL, NULL);
- }
- }
-
- if (_delayQueue)
- _delayQueue.cancelAllDelayed();
- if (_document)
- delete _document;
-
- {
- std::lock_guard<std::recursive_mutex> lock(_instanceMutex);
- _instances.erase(getSessionId());
- }
+
+ // make sure we deallocate all user-data in the DOM,
+ // this is neccesary if we were aborted early
+ std::list<DOMElement*> invokes = DOMUtils::filterChildElements(_xmlPrefix.str() + "invoke", _scxml, true);
+ for (auto invoke : invokes) {
+ char* invokeId = (char*)invoke->getUserData(X("invokeid"));
+ if (invokeId != NULL) {
+ free(invokeId);
+ invoke->setUserData(X("invokeid"), NULL, NULL);
+ }
+ }
+
+ if (_delayQueue)
+ _delayQueue.cancelAllDelayed();
+ if (_document)
+ delete _document;
+
+ {
+ std::lock_guard<std::recursive_mutex> lock(_instanceMutex);
+ _instances.erase(getSessionId());
+ }
// assert(_invokers.size() == 0);
// ::xercesc_3_1::XMLPlatformUtils::Terminate();
@@ -377,7 +377,7 @@ void InterpreterImpl::uninvoke(const std::string& invokeId) {
if (_invokers.find(invokeId) != _invokers.end()) {
_invokers[invokeId].uninvoke();
_autoForwarders.erase(invokeId);
- _invokers.erase(invokeId);
+ _invokers.erase(invokeId);
}
}
diff --git a/src/uscxml/interpreter/InterpreterImpl.h b/src/uscxml/interpreter/InterpreterImpl.h
index d6dbd1a..9b784d3 100644
--- a/src/uscxml/interpreter/InterpreterImpl.h
+++ b/src/uscxml/interpreter/InterpreterImpl.h
@@ -50,9 +50,8 @@ class USCXML_API InterpreterImpl :
public MicroStepCallbacks,
public DataModelCallbacks,
public ContentExecutorCallbacks,
- public DelayedEventQueueCallbacks,
- public std::enable_shared_from_this<InterpreterImpl>
-{
+ public DelayedEventQueueCallbacks,
+ public std::enable_shared_from_this<InterpreterImpl> {
public:
enum Binding {
EARLY = 0,
@@ -77,13 +76,13 @@ public:
virtual void reset() {///< Reset state machine
if (_microStepper)
- _microStepper.reset();
-
+ _microStepper.reset();
+
_isInitialized = false;
_state = USCXML_INSTANTIATED;
// _dataModel.reset();
- if (_delayQueue)
- _delayQueue.reset();
+ if (_delayQueue)
+ _delayQueue.reset();
// _contentExecutor.reset();
}
@@ -101,9 +100,9 @@ public:
_monitors.insert(monitor);
}
- void removeMonitor(InterpreterMonitor* monitor) {
- _monitors.erase(monitor);
- }
+ void removeMonitor(InterpreterMonitor* monitor) {
+ _monitors.erase(monitor);
+ }
/**
MicrostepCallbacks
@@ -136,13 +135,13 @@ public:
_execContent.uninvoke(invoke);
}
- virtual std::set<InterpreterMonitor*> getMonitors() {
+ virtual std::set<InterpreterMonitor*> getMonitors() {
return _monitors;
}
- virtual Interpreter getInterpreter() {
- return Interpreter(shared_from_this());
- }
+ virtual Interpreter getInterpreter() {
+ return Interpreter(shared_from_this());
+ }
/**
DataModelCallbacks
@@ -230,14 +229,14 @@ public:
_execContent = al.execContent;
_microStepper = al.microStepper;
_dataModel = al.dataModel;
- _internalQueue = al.internalQueue;
- _externalQueue = al.externalQueue;
- _delayQueue = al.delayedQueue;
+ _internalQueue = al.internalQueue;
+ _externalQueue = al.externalQueue;
+ _delayQueue = al.delayedQueue;
}
- void setFactory(Factory* factory) {
- _factory = factory;
- }
+ void setFactory(Factory* factory) {
+ _factory = factory;
+ }
static std::map<std::string, std::weak_ptr<InterpreterImpl> > getInstances();
@@ -270,9 +269,9 @@ protected:
friend class InterpreterIssue;
friend class TransformerImpl;
friend class USCXMLInvoker;
- friend class SCXMLIOProcessor;
- friend class DebugSession;
- friend class Debugger;
+ friend class SCXMLIOProcessor;
+ friend class DebugSession;
+ friend class Debugger;
X _xmlPrefix;
X _xmlNS;
@@ -297,7 +296,7 @@ protected:
std::map<std::string, IOProcessor> _ioProcs;
std::map<std::string, Invoker> _invokers;
std::set<std::string> _autoForwarders;
- std::set<InterpreterMonitor*> _monitors;
+ std::set<InterpreterMonitor*> _monitors;
private:
void setupDOM();
diff --git a/src/uscxml/interpreter/InterpreterMonitor.h b/src/uscxml/interpreter/InterpreterMonitor.h
index 10cc6ac..2519cfd 100644
--- a/src/uscxml/interpreter/InterpreterMonitor.h
+++ b/src/uscxml/interpreter/InterpreterMonitor.h
@@ -47,13 +47,13 @@ for (auto callback : callbacks) { callback->function(inptr, arg1, arg2); } }
// forward declare
namespace XERCESC_NS {
- class DOMElement;
+class DOMElement;
}
namespace uscxml {
class Interpreter;
-
+
class USCXML_API InterpreterMonitor {
public:
InterpreterMonitor() : _copyToInvokers(false) {}
diff --git a/src/uscxml/interpreter/MicroStepImpl.h b/src/uscxml/interpreter/MicroStepImpl.h
index 40f065c..7d7c9b0 100644
--- a/src/uscxml/interpreter/MicroStepImpl.h
+++ b/src/uscxml/interpreter/MicroStepImpl.h
@@ -35,7 +35,7 @@
namespace uscxml {
class InterpreterMonitor;
-
+
/**
* @ingroup microstep
* @ingroup callback
@@ -61,7 +61,7 @@ public:
/** Monitoring */
virtual std::set<InterpreterMonitor*> getMonitors() = 0;
- virtual Interpreter getInterpreter() = 0;
+ virtual Interpreter getInterpreter() = 0;
};
/**