diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-01-23 16:58:06 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-01-23 16:58:06 (GMT) |
commit | 69247ac083836cfae493e0d220c5faf3818c0bf9 (patch) | |
tree | a63e584f7d3731ccaccb6ce02f844ea2b46f4cb9 /src/uscxml/plugins/InvokerImpl.h | |
parent | ef66cbbaf07bd1ac661f9a9622dcdaf6851ca6ba (diff) | |
download | uscxml-69247ac083836cfae493e0d220c5faf3818c0bf9.zip uscxml-69247ac083836cfae493e0d220c5faf3818c0bf9.tar.gz uscxml-69247ac083836cfae493e0d220c5faf3818c0bf9.tar.bz2 |
Introduced InvokerCallbacks
Diffstat (limited to 'src/uscxml/plugins/InvokerImpl.h')
-rw-r--r-- | src/uscxml/plugins/InvokerImpl.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/uscxml/plugins/InvokerImpl.h b/src/uscxml/plugins/InvokerImpl.h index e5f7366..9d159a8 100644 --- a/src/uscxml/plugins/InvokerImpl.h +++ b/src/uscxml/plugins/InvokerImpl.h @@ -25,11 +25,37 @@ #include "uscxml/Common.h" #include "uscxml/plugins/EventHandler.h" #include "uscxml/messages/Event.h" -#include "uscxml/interpreter/InterpreterImpl.h" + +#include <set> + +namespace XERCESC_NS { + class DOMElement; + class DOMDocument; + class DOMNode; +} namespace uscxml { class Interpreter; +class InterpreterMonitor; +class ActionLanguage; +class Logger; + +/** + * @ingroup invoker + * @ingroup callback + * Callbacks available for every invoker. + */ +class USCXML_API InvokerCallbacks { +public: + virtual ~InvokerCallbacks() {} ///< silence virtual destructor warning from swig + virtual void enqueueInternal(const Event& event) = 0; + virtual void enqueueExternal(const Event& event) = 0; + virtual ActionLanguage getActionLanguage() = 0; + virtual std::set<InterpreterMonitor*> getMonitors() = 0; + virtual std::string getBaseURL() = 0; + virtual Logger getLogger() = 0; +}; /** * @ingroup invoker @@ -48,7 +74,7 @@ public: * @param interpreter The imlementation of the associated Interpreter * @todo We will eventually introduce callbacks and prevent complete access to the interpreter. */ - virtual std::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter) = 0; + virtual std::shared_ptr<InvokerImpl> create(InvokerCallbacks* callbacks) = 0; /** * Invoker's parent state became active at the end of a macro-step. @@ -115,7 +141,7 @@ protected: XERCESC_NS::DOMElement* _finalize; std::string _invokeId; - InterpreterImpl* _callbacks; + InvokerCallbacks* _callbacks; }; } |