diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-04-12 07:19:13 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-04-12 07:19:13 (GMT) |
commit | 321faf9461274eb6758dbec5e070b4e4600d10b6 (patch) | |
tree | d911cbce893898e442fb8715199f84fc9b2c7f5b /src/uscxml/plugins/invoker/scxml | |
parent | e0d37b8181e12030cc71d538ca08a80a924d5d4a (diff) | |
download | uscxml-321faf9461274eb6758dbec5e070b4e4600d10b6.zip uscxml-321faf9461274eb6758dbec5e070b4e4600d10b6.tar.gz uscxml-321faf9461274eb6758dbec5e070b4e4600d10b6.tar.bz2 |
Reduced dependencies on XercesC
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml')
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index 783727a..e0812d0 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -182,16 +182,18 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent) // create new instances from the parent's ActionLanguage InterpreterImpl* invoked = _invokedInterpreter.getImpl().get(); - ActionLanguage al = _callbacks->getActionLanguage(); - - // create new instances - al.execContent = al.execContent.getImpl()->create(invoked); - al.delayQueue = al.delayQueue.getImplDelayed()->create(invoked); - al.internalQueue = al.internalQueue.getImplBase()->create(); - al.externalQueue = al.externalQueue.getImplBase()->create(); - al.microStepper = al.microStepper.getImpl()->create(invoked); - - _invokedInterpreter.setActionLanguage(al); + ActionLanguage* alOrig = _callbacks->getActionLanguage(); + if (alOrig != NULL) { + ActionLanguage al = *alOrig; // invokes copy operator + // create new instances + al.execContent = alOrig->execContent.getImpl()->create(invoked); + al.delayQueue = alOrig->delayQueue.getImplDelayed()->create(invoked); + al.internalQueue = alOrig->internalQueue.getImplBase()->create(); + al.externalQueue = alOrig->externalQueue.getImplBase()->create(); + al.microStepper = alOrig->microStepper.getImpl()->create(invoked); + + _invokedInterpreter.setActionLanguage(al); + } // TODO: setup invokers dom, check datamodel attribute and create new instance from parent if matching? // copy monitors |