summaryrefslogtreecommitdiffstats
path: root/src/uscxml/interpreter
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-07-11 12:56:11 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-07-11 12:56:11 (GMT)
commit5fa85b7377db25a73a2208063e3167e82febe98f (patch)
tree2ea561e90cb84ff805387c377a967c076b5b99a6 /src/uscxml/interpreter
parent1a362feda9d514ee30ad8815394ce11da2bdd29a (diff)
downloaduscxml-5fa85b7377db25a73a2208063e3167e82febe98f.zip
uscxml-5fa85b7377db25a73a2208063e3167e82febe98f.tar.gz
uscxml-5fa85b7377db25a73a2208063e3167e82febe98f.tar.bz2
Reactivated REST bridge for debugger
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r--src/uscxml/interpreter/ContentExecutorImpl.h1
-rw-r--r--src/uscxml/interpreter/InterpreterImpl.h4
-rw-r--r--src/uscxml/interpreter/InterpreterMonitor.h6
-rw-r--r--src/uscxml/interpreter/MicroStepImpl.h1
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;
};
/**