summaryrefslogtreecommitdiffstats
path: root/src/uscxml/interpreter/InterpreterMonitor.h
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-06-18 11:55:39 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-06-18 11:55:39 (GMT)
commit0e0be07906a720ae54e4572d6ac0cb657424550d (patch)
tree7d48c87a9142a5dad06570ca4daf0212475d83f1 /src/uscxml/interpreter/InterpreterMonitor.h
parent84bbbd42c3480c40c0355c64899f99f8d588d5c0 (diff)
downloaduscxml-0e0be07906a720ae54e4572d6ac0cb657424550d.zip
uscxml-0e0be07906a720ae54e4572d6ac0cb657424550d.tar.gz
uscxml-0e0be07906a720ae54e4572d6ac0cb657424550d.tar.bz2
Started to port Debugger and issue 87
Diffstat (limited to 'src/uscxml/interpreter/InterpreterMonitor.h')
-rw-r--r--src/uscxml/interpreter/InterpreterMonitor.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/uscxml/interpreter/InterpreterMonitor.h b/src/uscxml/interpreter/InterpreterMonitor.h
index 8dac445..ff2e7cb 100644
--- a/src/uscxml/interpreter/InterpreterMonitor.h
+++ b/src/uscxml/interpreter/InterpreterMonitor.h
@@ -33,14 +33,14 @@ catch (std::bad_weak_ptr e) { LOG(ERROR) << "Unclean shutdown " << std::endl; }
catch (...) { LOG(ERROR) << "An exception occurred when calling " #callback " on monitors"; } \
if (_state == USCXML_DESTROYED) { throw std::bad_weak_ptr(); }
-#define USCXML_MONITOR_CALLBACK(callback, function) \
-if (callback) { callback->function(); }
+#define USCXML_MONITOR_CALLBACK(callbacks, function) \
+for (auto callback : callbacks) { callback->function(NULL); }
-#define USCXML_MONITOR_CALLBACK1(callback, function, arg1) \
-if (callback) { callback->function(arg1); }
+#define USCXML_MONITOR_CALLBACK1(callbacks, function, arg1) \
+for (auto callback : callbacks) { callback->function(NULL, arg1); }
-#define USCXML_MONITOR_CALLBACK2(callback, function, arg1, arg2) \
-if (callback) { callback->function(arg1, arg2); }
+#define USCXML_MONITOR_CALLBACK2(callbacks, function, arg1, arg2) \
+for (auto callback : callbacks) { callback->function(NULL, arg1, arg2); }
// forward declare
namespace XERCESC_NS {
@@ -54,34 +54,34 @@ public:
InterpreterMonitor() : _copyToInvokers(false) {}
virtual ~InterpreterMonitor() {}
- virtual void beforeProcessingEvent(const Event& event) {}
- virtual void beforeMicroStep() {}
+ virtual void beforeProcessingEvent(InterpreterImpl* impl, const Event& event) {}
+ virtual void beforeMicroStep(InterpreterImpl* impl) {}
- virtual void beforeExitingState(const XERCESC_NS::DOMElement* state) {}
- virtual void afterExitingState(const XERCESC_NS::DOMElement* state) {}
+ virtual void beforeExitingState(InterpreterImpl* impl, const XERCESC_NS::DOMElement* state) {}
+ virtual void afterExitingState(InterpreterImpl* impl, const XERCESC_NS::DOMElement* state) {}
- virtual void beforeExecutingContent(const XERCESC_NS::DOMElement* execContent) {}
- virtual void afterExecutingContent(const XERCESC_NS::DOMElement* execContent) {}
+ virtual void beforeExecutingContent(InterpreterImpl* impl, const XERCESC_NS::DOMElement* execContent) {}
+ virtual void afterExecutingContent(InterpreterImpl* impl, const XERCESC_NS::DOMElement* execContent) {}
- virtual void beforeUninvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
- virtual void afterUninvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
+ virtual void beforeUninvoking(InterpreterImpl* impl, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
+ virtual void afterUninvoking(InterpreterImpl* impl, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
- virtual void beforeTakingTransition(const XERCESC_NS::DOMElement* transition) {}
- virtual void afterTakingTransition(const XERCESC_NS::DOMElement* transition) {}
+ virtual void beforeTakingTransition(InterpreterImpl* impl, const XERCESC_NS::DOMElement* transition) {}
+ virtual void afterTakingTransition(InterpreterImpl* impl, const XERCESC_NS::DOMElement* transition) {}
- virtual void beforeEnteringState(const XERCESC_NS::DOMElement* state) {}
- virtual void afterEnteringState(const XERCESC_NS::DOMElement* state) {}
+ virtual void beforeEnteringState(InterpreterImpl* impl, const XERCESC_NS::DOMElement* state) {}
+ virtual void afterEnteringState(InterpreterImpl* impl, const XERCESC_NS::DOMElement* state) {}
- virtual void beforeInvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
- virtual void afterInvoking(const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
+ virtual void beforeInvoking(InterpreterImpl* impl, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
+ virtual void afterInvoking(InterpreterImpl* impl, const XERCESC_NS::DOMElement* invokeElem, const std::string& invokeid) {}
- virtual void afterMicroStep() {}
- virtual void onStableConfiguration() {}
+ virtual void afterMicroStep(InterpreterImpl* impl) {}
+ virtual void onStableConfiguration(InterpreterImpl* impl) {}
- virtual void beforeCompletion() {}
- virtual void afterCompletion() {}
+ virtual void beforeCompletion(InterpreterImpl* impl) {}
+ virtual void afterCompletion(InterpreterImpl* impl) {}
- virtual void reportIssue(const InterpreterIssue& issue) {}
+ virtual void reportIssue(InterpreterImpl* impl, const InterpreterIssue& issue) {}
void copyToInvokers(bool copy) {
_copyToInvokers = copy;
@@ -101,13 +101,13 @@ public:
StateTransitionMonitor() {}
virtual ~StateTransitionMonitor() {}
- virtual void beforeTakingTransition(const XERCESC_NS::DOMElement* transition);
- virtual void beforeExecutingContent(const XERCESC_NS::DOMElement* element);
- virtual void onStableConfiguration();
- virtual void beforeProcessingEvent(const uscxml::Event& event);
- virtual void beforeExitingState(const XERCESC_NS::DOMElement* state);
- virtual void beforeEnteringState(const XERCESC_NS::DOMElement* state);
- virtual void beforeMicroStep();
+ virtual void beforeTakingTransition(InterpreterImpl* impl, const XERCESC_NS::DOMElement* transition);
+ virtual void beforeExecutingContent(InterpreterImpl* impl, const XERCESC_NS::DOMElement* element);
+ virtual void onStableConfiguration(InterpreterImpl* impl);
+ virtual void beforeProcessingEvent(InterpreterImpl* impl, const uscxml::Event& event);
+ virtual void beforeExitingState(InterpreterImpl* impl, const XERCESC_NS::DOMElement* state);
+ virtual void beforeEnteringState(InterpreterImpl* impl, const XERCESC_NS::DOMElement* state);
+ virtual void beforeMicroStep(InterpreterImpl* impl);
protected:
static std::recursive_mutex _mutex;