diff options
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r-- | src/uscxml/interpreter/InterpreterImpl.cpp | 9 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterImpl.h | 21 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp index ac6aa41..60448f9 100644 --- a/src/uscxml/interpreter/InterpreterImpl.cpp +++ b/src/uscxml/interpreter/InterpreterImpl.cpp @@ -465,9 +465,9 @@ Event InterpreterImpl::dequeueExternal(size_t blockMs) { // test 233 if (_currEvent.invokeid.size() > 0 && - _invokers.find(_currEvent.invokeid) != _invokers.end() && - _invokers[_currEvent.invokeid].getFinalize() != NULL) { - _execContent.process(_invokers[_currEvent.invokeid].getFinalize()); + _finalize.find(_currEvent.invokeid) != _finalize.end() && + _finalize[_currEvent.invokeid] != NULL) { + _execContent.process(_finalize[_currEvent.invokeid]); } for (auto invIter = _invokers.begin(); invIter != _invokers.end(); invIter++) { @@ -545,7 +545,7 @@ void InterpreterImpl::invoke(const std::string& type, const std::string& src, bo } std::shared_ptr<InvokerImpl> invokerImpl = _factory->createInvoker(type, this); - invokerImpl->setFinalize(finalize); + _finalize[invokeEvent.invokeid] = finalize; _invokers[invokeEvent.invokeid] = invokerImpl; _invokers[invokeEvent.invokeid].invoke(tmp, invokeEvent); @@ -558,6 +558,7 @@ void InterpreterImpl::uninvoke(const std::string& invokeId) { if (_invokers.find(invokeId) != _invokers.end()) { _invokers[invokeId].uninvoke(); _autoForwarders.erase(invokeId); + _finalize.erase(invokeId); _invokers.erase(invokeId); } diff --git a/src/uscxml/interpreter/InterpreterImpl.h b/src/uscxml/interpreter/InterpreterImpl.h index 8e8b810..a68298b 100644 --- a/src/uscxml/interpreter/InterpreterImpl.h +++ b/src/uscxml/interpreter/InterpreterImpl.h @@ -234,16 +234,15 @@ public: _delayQueue = al.delayQueue; } - ActionLanguage getActionLanguage() { - ActionLanguage al; - al.logger = _logger; - al.execContent = _execContent; - al.microStepper = _microStepper; - al.dataModel = _dataModel; - al.internalQueue = _internalQueue; - al.externalQueue = _externalQueue; - al.delayQueue = _delayQueue; - return al; + ActionLanguage* getActionLanguage() { + _al.logger = _logger; + _al.execContent = _execContent; + _al.microStepper = _microStepper; + _al.dataModel = _dataModel; + _al.internalQueue = _internalQueue; + _al.externalQueue = _externalQueue; + _al.delayQueue = _delayQueue; + return &_al; } void setFactory(Factory* factory) { @@ -264,6 +263,7 @@ protected: static void addInstance(std::shared_ptr<InterpreterImpl> instance); Binding _binding; + ActionLanguage _al; std::string _sessionId; std::string _name; @@ -314,6 +314,7 @@ protected: std::map<std::string, IOProcessor> _ioProcs; std::map<std::string, Invoker> _invokers; + std::map<std::string, XERCESC_NS::DOMElement*> _finalize; std::set<std::string> _autoForwarders; std::set<InterpreterMonitor*> _monitors; |