diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-01-18 17:15:46 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-01-18 17:15:46 (GMT) |
commit | fc78cfdc4d1f5bba8dbd6a412f23651e185cb191 (patch) | |
tree | dd32929c07e6c19250f2e8fde1e73712bab0c6fb /src/uscxml/plugins/invoker | |
parent | 01ee860a88b5c8cf25fb7dcc145662d2c27f3ebe (diff) | |
download | uscxml-fc78cfdc4d1f5bba8dbd6a412f23651e185cb191.zip uscxml-fc78cfdc4d1f5bba8dbd6a412f23651e185cb191.tar.gz uscxml-fc78cfdc4d1f5bba8dbd6a412f23651e185cb191.tar.bz2 |
Worked on passing even more IRP tests
Diffstat (limited to 'src/uscxml/plugins/invoker')
-rw-r--r-- | src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp | 10 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp index d6d0f99..b5d7e8b 100644 --- a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp +++ b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp @@ -65,7 +65,7 @@ DirMonInvoker::~DirMonInvoker() { std::shared_ptr<InvokerImpl> DirMonInvoker::create(InterpreterImpl* interpreter) { std::shared_ptr<DirMonInvoker> invoker(new DirMonInvoker()); - invoker->_interpreter = interpreter; + invoker->_callbacks = interpreter; return invoker; } @@ -99,7 +99,7 @@ void DirMonInvoker::eventFromSCXML(const Event& event) { void DirMonInvoker::invoke(const std::string& source, const Event& req) { if (req.params.find("dir") == req.params.end()) { - LOG(_interpreter->getLogger(), USCXML_ERROR) << "No dir param given"; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "No dir param given"; return; } @@ -134,10 +134,10 @@ void DirMonInvoker::invoke(const std::string& source, const Event& req) { std::multimap<std::string, Data>::const_iterator dirIter = req.params.find("dir"); while(dirIter != req.params.upper_bound("dir")) { // this is simplified - Data might be more elaborate than a simple string atom - URL url = URL::resolve(dirIter->second.atom, _interpreter->getBaseURL()); + URL url = URL::resolve(dirIter->second.atom, _callbacks->getBaseURL()); if (!url.isAbsolute()) { - LOG(_interpreter->getLogger(), USCXML_ERROR) << "Given directory '" << dirIter->second << "' cannot be transformed to absolute path"; + LOG(_callbacks->getLogger(), USCXML_ERROR) << "Given directory '" << dirIter->second << "' cannot be transformed to absolute path"; } else { _dir = url.path(); } @@ -145,7 +145,7 @@ void DirMonInvoker::invoke(const std::string& source, const Event& req) { } _watcher = new DirectoryWatch(_dir, _recurse); - _watcher->setLogger(_interpreter->getLogger()); + _watcher->setLogger(_callbacks->getLogger()); _watcher->addMonitor(this); _watcher->updateEntries(true); diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index 0f7cc24..9ac8621 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -134,7 +134,7 @@ void USCXMLInvoker::run(void* instance) { e.eventType = Event::PLATFORM; e.invokeid = INSTANCE->_invokedInterpreter.getImpl()->getInvokeId(); e.name = "done.invoke." + e.invokeid; - INSTANCE->_interpreter->enqueueExternal(e); + INSTANCE->_callbacks->enqueueExternal(e); } INSTANCE->_isActive = false; @@ -142,7 +142,7 @@ void USCXMLInvoker::run(void* instance) { std::shared_ptr<InvokerImpl> USCXMLInvoker::create(InterpreterImpl* interpreter) { std::shared_ptr<USCXMLInvoker> invoker(new USCXMLInvoker()); - invoker->_interpreter = interpreter; + invoker->_callbacks = interpreter; return invoker; } @@ -163,10 +163,10 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent) document->appendChild(newNode); // TODO: where do we get the namespace from? - _invokedInterpreter = Interpreter::fromDocument(document, _interpreter->getBaseURL(), false); + _invokedInterpreter = Interpreter::fromDocument(document, _callbacks->getBaseURL(), false); } else if (invokeEvent.data.atom.size() > 0) { // test530 when deserializing - _invokedInterpreter = Interpreter::fromXML(invokeEvent.data.atom, _interpreter->getBaseURL()); + _invokedInterpreter = Interpreter::fromXML(invokeEvent.data.atom, _callbacks->getBaseURL()); } else { _isActive = false; @@ -181,17 +181,17 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent) // create new instances from the parent's ActionLanguage #if 1 InterpreterImpl* invoked = _invokedInterpreter.getImpl().get(); - invoked->_execContent = _interpreter->_execContent.getImpl()->create(invoked); - invoked->_delayQueue = _interpreter->_delayQueue.getImplDelayed()->create(invoked); - invoked->_internalQueue = _interpreter->_internalQueue.getImplBase()->create(); - invoked->_externalQueue = _interpreter->_externalQueue.getImplBase()->create(); - invoked->_microStepper = _interpreter->_microStepper.getImpl()->create(invoked); + invoked->_execContent = _callbacks->_execContent.getImpl()->create(invoked); + invoked->_delayQueue = _callbacks->_delayQueue.getImplDelayed()->create(invoked); + invoked->_internalQueue = _callbacks->_internalQueue.getImplBase()->create(); + invoked->_externalQueue = _callbacks->_externalQueue.getImplBase()->create(); + invoked->_microStepper = _callbacks->_microStepper.getImpl()->create(invoked); // TODO: setup invokers dom, check datamodel attribute and create new instance from parent if matching? #endif // copy monitors - std::set<InterpreterMonitor*>::const_iterator monIter = _interpreter->_monitors.begin(); - while(monIter != _interpreter->_monitors.end()) { + std::set<InterpreterMonitor*>::const_iterator monIter = _callbacks->_monitors.begin(); + while(monIter != _callbacks->_monitors.end()) { if ((*monIter)->copyToInvokers()) { _invokedInterpreter.getImpl()->_monitors.insert(*monIter); } |