summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/scxml
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-13 02:20:15 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-13 02:20:15 (GMT)
commitc443aaa23e079d8ab94942bfefa65b940c1acd01 (patch)
treebeab36f1446339fe1b157c349c0808e4f5106982 /src/uscxml/plugins/invoker/scxml
parenta116aeb2cf5a84fa03f9814c3884561149029267 (diff)
downloaduscxml-c443aaa23e079d8ab94942bfefa65b940c1acd01.zip
uscxml-c443aaa23e079d8ab94942bfefa65b940c1acd01.tar.gz
uscxml-c443aaa23e079d8ab94942bfefa65b940c1acd01.tar.bz2
Fixed bugs intriduced by PIMPL
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml')
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp10
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
index c90ef4d..85f2963 100644
--- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
@@ -23,8 +23,8 @@ USCXMLInvoker::~USCXMLInvoker() {
delete _invokedInterpreter;
};
-InvokerImpl* USCXMLInvoker::create(Interpreter* interpreter) {
- USCXMLInvoker* invoker = new USCXMLInvoker();
+boost::shared_ptr<IOProcessorImpl> USCXMLInvoker::create(Interpreter* interpreter) {
+ boost::shared_ptr<USCXMLInvoker> invoker = boost::shared_ptr<USCXMLInvoker>(new USCXMLInvoker());
invoker->_parentInterpreter = interpreter;
return invoker;
}
@@ -55,8 +55,10 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) {
if (dataModel) {
}
- _invokedInterpreter->setInvoker(boost::static_pointer_cast<InvokerImpl>(shared_from_this()));
- _invokedInterpreter->start();
+ if (_invokedInterpreter) {
+ _invokedInterpreter->setInvoker(boost::static_pointer_cast<InvokerImpl>(shared_from_this()));
+ _invokedInterpreter->start();
+ }
}
} \ No newline at end of file
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h
index b1579a2..95de9b2 100644
--- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h
+++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h
@@ -16,7 +16,7 @@ class USCXMLInvoker : public InvokerImpl, public boost::enable_shared_from_this<
public:
USCXMLInvoker();
virtual ~USCXMLInvoker();
- virtual InvokerImpl* create(Interpreter* interpreter);
+ virtual boost::shared_ptr<IOProcessorImpl> create(Interpreter* interpreter);
virtual std::set<std::string> getNames() {
std::set<std::string> names;
names.insert("uscxml");