summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-06 21:17:13 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-06 21:17:13 (GMT)
commit1e6ba139ac12c688f025745812d381915775b1fb (patch)
tree1d49070eddd4502ec6aa25a769ab7c47d04a1c30 /src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
parent139439f0675ec05e936fd4297086462037cd618e (diff)
downloaduscxml-1e6ba139ac12c688f025745812d381915775b1fb.zip
uscxml-1e6ba139ac12c688f025745812d381915775b1fb.tar.gz
uscxml-1e6ba139ac12c688f025745812d381915775b1fb.tar.bz2
See detailled log
Added new revised W3C tests Hide Interpreter via PIMPL Implemented SCXMLIOProcessor
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp')
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
index a142231..fc2ac2b 100644
--- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
@@ -21,10 +21,9 @@ USCXMLInvoker::USCXMLInvoker() : _cancelled(false) {
USCXMLInvoker::~USCXMLInvoker() {
_cancelled = true;
- delete _invokedInterpreter;
};
-boost::shared_ptr<IOProcessorImpl> USCXMLInvoker::create(Interpreter* interpreter) {
+boost::shared_ptr<IOProcessorImpl> USCXMLInvoker::create(InterpreterImpl* interpreter) {
boost::shared_ptr<USCXMLInvoker> invoker = boost::shared_ptr<USCXMLInvoker>(new USCXMLInvoker());
invoker->_parentInterpreter = interpreter;
return invoker;
@@ -36,7 +35,7 @@ Data USCXMLInvoker::getDataModelVariables() {
}
void USCXMLInvoker::send(const SendRequest& req) {
- _invokedInterpreter->_externalQueue.push(req);
+ _invokedInterpreter.getImpl()->_externalQueue.push(req);
}
void USCXMLInvoker::cancel(const std::string sendId) {
@@ -54,27 +53,27 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) {
LOG(ERROR) << "Cannot invoke nested SCXML interpreter, neither src attribute nor DOM is given";
}
if (_invokedInterpreter) {
- DataModel dataModel(_invokedInterpreter->getDataModel());
+ DataModel dataModel(_invokedInterpreter.getImpl()->getDataModel());
if (dataModel) {
}
- _invokedInterpreter->setParentQueue(this);
+ _invokedInterpreter.getImpl()->setParentQueue(this);
// transfer namespace prefixes
- _invokedInterpreter->_nsURL = _parentInterpreter->_nsURL;
- _invokedInterpreter->_xpathPrefix = _parentInterpreter->_xpathPrefix;
- _invokedInterpreter->_nsToPrefix = _parentInterpreter->_nsToPrefix;
+ _invokedInterpreter.getImpl()->_nsURL = _parentInterpreter->_nsURL;
+ _invokedInterpreter.getImpl()->_xpathPrefix = _parentInterpreter->_xpathPrefix;
+ _invokedInterpreter.getImpl()->_nsToPrefix = _parentInterpreter->_nsToPrefix;
std::map<std::string, std::string>::iterator nsIter = _parentInterpreter->_nsToPrefix.begin();
while(nsIter != _parentInterpreter->_nsToPrefix.end()) {
- _invokedInterpreter->_nsContext.addNamespaceDeclaration(nsIter->first, nsIter->second);
+ _invokedInterpreter.getImpl()->_nsContext.addNamespaceDeclaration(nsIter->first, nsIter->second);
nsIter++;
}
- _invokedInterpreter->_xmlNSPrefix = _parentInterpreter->_xmlNSPrefix;
- _invokedInterpreter->_sessionId = req.invokeid;
+ _invokedInterpreter.getImpl()->_xmlNSPrefix = _parentInterpreter->_xmlNSPrefix;
+ _invokedInterpreter.getImpl()->_sessionId = req.invokeid;
/// test240 assumes that invoke request params will carry over to the datamodel
- _invokedInterpreter->setInvokeRequest(req);
+ _invokedInterpreter.getImpl()->setInvokeRequest(req);
- _invokedInterpreter->start();
+ _invokedInterpreter.getImpl()->start();
} else {
/// test 530
_parentInterpreter->receive(Event("done.invoke." + _invokeId, Event::PLATFORM));