diff options
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r-- | src/uscxml/interpreter/ContentExecutorImpl.h | 1 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterImpl.h | 4 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterMonitor.h | 6 | ||||
-rw-r--r-- | src/uscxml/interpreter/MicroStepImpl.h | 1 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/uscxml/interpreter/ContentExecutorImpl.h b/src/uscxml/interpreter/ContentExecutorImpl.h index 0e12aff..d23b7be 100644 --- a/src/uscxml/interpreter/ContentExecutorImpl.h +++ b/src/uscxml/interpreter/ContentExecutorImpl.h @@ -66,6 +66,7 @@ public: /** Monitoring */ virtual std::set<InterpreterMonitor*> getMonitors() = 0; + virtual InterpreterImpl* getInterpreter() = 0; }; diff --git a/src/uscxml/interpreter/InterpreterImpl.h b/src/uscxml/interpreter/InterpreterImpl.h index 6d047ec..fa7bf89 100644 --- a/src/uscxml/interpreter/InterpreterImpl.h +++ b/src/uscxml/interpreter/InterpreterImpl.h @@ -140,6 +140,10 @@ public: return _monitors; } + virtual InterpreterImpl* getInterpreter() { + return this; + } + /** DataModelCallbacks */ diff --git a/src/uscxml/interpreter/InterpreterMonitor.h b/src/uscxml/interpreter/InterpreterMonitor.h index ff2e7cb..aae4296 100644 --- a/src/uscxml/interpreter/InterpreterMonitor.h +++ b/src/uscxml/interpreter/InterpreterMonitor.h @@ -34,13 +34,13 @@ catch (...) { LOG(ERROR) << "An exception occurred when calling " #callback " on if (_state == USCXML_DESTROYED) { throw std::bad_weak_ptr(); } #define USCXML_MONITOR_CALLBACK(callbacks, function) \ -for (auto callback : callbacks) { callback->function(NULL); } +for (auto callback : callbacks) { callback->function(_callbacks->getInterpreter()); } #define USCXML_MONITOR_CALLBACK1(callbacks, function, arg1) \ -for (auto callback : callbacks) { callback->function(NULL, arg1); } +for (auto callback : callbacks) { callback->function(_callbacks->getInterpreter(), arg1); } #define USCXML_MONITOR_CALLBACK2(callbacks, function, arg1, arg2) \ -for (auto callback : callbacks) { callback->function(NULL, arg1, arg2); } +for (auto callback : callbacks) { callback->function(_callbacks->getInterpreter(), arg1, arg2); } // forward declare namespace XERCESC_NS { diff --git a/src/uscxml/interpreter/MicroStepImpl.h b/src/uscxml/interpreter/MicroStepImpl.h index cb4aec6..a9287aa 100644 --- a/src/uscxml/interpreter/MicroStepImpl.h +++ b/src/uscxml/interpreter/MicroStepImpl.h @@ -61,6 +61,7 @@ public: /** Monitoring */ virtual std::set<InterpreterMonitor*> getMonitors() = 0; + virtual InterpreterImpl* getInterpreter() = 0; }; /** |