summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Factory.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-08-25 10:41:58 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-08-25 10:41:58 (GMT)
commit26183abd9acd44a0382e55cc985795ee7c526aed (patch)
treea9d9289397b65892dbad037d02460cf2d04597fb /src/uscxml/Factory.cpp
parentbd45c688b3d3aad5d62b85457ce943eaadf989ae (diff)
downloaduscxml-26183abd9acd44a0382e55cc985795ee7c526aed.zip
uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.gz
uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.bz2
Updated W3C tests and bug-fixes
Diffstat (limited to 'src/uscxml/Factory.cpp')
-rw-r--r--src/uscxml/Factory.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/uscxml/Factory.cpp b/src/uscxml/Factory.cpp
index bc23e53..1494dff 100644
--- a/src/uscxml/Factory.cpp
+++ b/src/uscxml/Factory.cpp
@@ -352,7 +352,9 @@ boost::shared_ptr<InvokerImpl> Factory::createInvoker(const std::string& type, I
if (_invokerAliases.find(type) != _invokerAliases.end()) {
std::string canonicalName = _invokerAliases[type];
if (_invokers.find(canonicalName) != _invokers.end()) {
- return _invokers[canonicalName]->create(interpreter);
+ boost::shared_ptr<InvokerImpl> invoker = _invokers[canonicalName]->create(interpreter);
+ invoker->setInterpreter(interpreter);
+ return invoker;
}
}
@@ -372,7 +374,9 @@ boost::shared_ptr<DataModelImpl> Factory::createDataModel(const std::string& typ
if (_dataModelAliases.find(type) != _dataModelAliases.end()) {
std::string canonicalName = _dataModelAliases[type];
if (_dataModels.find(canonicalName) != _dataModels.end()) {
- return _dataModels[canonicalName]->create(interpreter);
+ boost::shared_ptr<DataModelImpl> dataModel = _dataModels[canonicalName]->create(interpreter);
+ dataModel->setInterpreter(interpreter);
+ return dataModel;
}
}
@@ -391,7 +395,9 @@ boost::shared_ptr<IOProcessorImpl> Factory::createIOProcessor(const std::string&
if (_ioProcessorAliases.find(type) != _ioProcessorAliases.end()) {
std::string canonicalName = _ioProcessorAliases[type];
if (_ioProcessors.find(canonicalName) != _ioProcessors.end()) {
- return _ioProcessors[canonicalName]->create(interpreter);
+ boost::shared_ptr<IOProcessorImpl> ioProc = _ioProcessors[canonicalName]->create(interpreter);
+ ioProc->setInterpreter(interpreter);
+ return ioProc;
}
}
@@ -399,7 +405,7 @@ boost::shared_ptr<IOProcessorImpl> Factory::createIOProcessor(const std::string&
if (_parentFactory) {
return _parentFactory->createIOProcessor(type, interpreter);
} else {
- LOG(ERROR) << "No " << type << " Datamodel known";
+ LOG(ERROR) << "No " << type << " IOProcessor known";
}
return boost::shared_ptr<IOProcessorImpl>();
@@ -409,7 +415,8 @@ boost::shared_ptr<ExecutableContentImpl> Factory::createExecutableContent(const
// do we have this type in this factory?
std::string actualNameSpace = (nameSpace.length() == 0 ? "http://www.w3.org/2005/07/scxml" : nameSpace);
if (_executableContent.find(std::make_pair(localName, actualNameSpace)) != _executableContent.end()) {
- return _executableContent[std::make_pair(localName, actualNameSpace)]->create(interpreter);
+ boost::shared_ptr<ExecutableContentImpl> execContent = _executableContent[std::make_pair(localName, actualNameSpace)]->create(interpreter);
+ execContent->setInterpreter(interpreter);
}
// lookup in parent factory