summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker
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
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')
-rw-r--r--src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp4
-rw-r--r--src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h2
-rw-r--r--src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp4
-rw-r--r--src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h2
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp10
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h2
-rw-r--r--src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp4
-rw-r--r--src/uscxml/plugins/invoker/umundo/UmundoInvoker.h2
8 files changed, 16 insertions, 14 deletions
diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp
index 94156c0..08fc1f3 100644
--- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp
+++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp
@@ -22,8 +22,8 @@ OSGInvoker::OSGInvoker() {
OSGInvoker::~OSGInvoker() {
};
-InvokerImpl* OSGInvoker::create(Interpreter* interpreter) {
- OSGInvoker* invoker = new OSGInvoker();
+boost::shared_ptr<IOProcessorImpl> OSGInvoker::create(Interpreter* interpreter) {
+ boost::shared_ptr<OSGInvoker> invoker = boost::shared_ptr<OSGInvoker> (new OSGInvoker());
invoker->_interpreter = interpreter;
return invoker;
}
diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h
index 933ee4a..29f950f 100644
--- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h
+++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h
@@ -20,7 +20,7 @@ class OSGInvoker : public InvokerImpl, public Arabica::DOM::Events::EventListene
public:
OSGInvoker();
virtual ~OSGInvoker();
- virtual InvokerImpl* create(Interpreter* interpreter);
+ virtual boost::shared_ptr<IOProcessorImpl> create(Interpreter* interpreter);
virtual std::set<std::string> getNames() {
std::set<std::string> names;
diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp
index eaf5eba..65eed78 100644
--- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp
+++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp
@@ -21,8 +21,8 @@ HeartbeatInvoker::HeartbeatInvoker() {
HeartbeatInvoker::~HeartbeatInvoker() {
};
-InvokerImpl* HeartbeatInvoker::create(Interpreter* interpreter) {
- HeartbeatInvoker* invoker = new HeartbeatInvoker();
+boost::shared_ptr<IOProcessorImpl> HeartbeatInvoker::create(Interpreter* interpreter) {
+ boost::shared_ptr<HeartbeatInvoker> invoker = boost::shared_ptr<HeartbeatInvoker>(new HeartbeatInvoker());
invoker->_interpreter = interpreter;
return invoker;
}
diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h
index 8a90011..bbea7d6 100644
--- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h
+++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h
@@ -13,7 +13,7 @@ class HeartbeatInvoker : public InvokerImpl {
public:
HeartbeatInvoker();
virtual ~HeartbeatInvoker();
- virtual InvokerImpl* create(Interpreter* interpreter);
+ virtual boost::shared_ptr<IOProcessorImpl> create(Interpreter* interpreter);
virtual std::set<std::string> getNames() {
std::set<std::string> names;
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");
diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
index 3ddc14a..2957078 100644
--- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
+++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp
@@ -28,8 +28,8 @@ UmundoInvoker::~UmundoInvoker() {
}
};
-InvokerImpl* UmundoInvoker::create(Interpreter* interpreter) {
- UmundoInvoker* invoker = new UmundoInvoker();
+boost::shared_ptr<IOProcessorImpl> UmundoInvoker::create(Interpreter* interpreter) {
+ boost::shared_ptr<UmundoInvoker> invoker = boost::shared_ptr<UmundoInvoker>(new UmundoInvoker());
invoker->_interpreter = interpreter;
return invoker;
}
diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h
index 1aa37f2..c5f9656 100644
--- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h
+++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h
@@ -20,7 +20,7 @@ class UmundoInvoker : public InvokerImpl, public umundo::TypedReceiver, public u
public:
UmundoInvoker();
virtual ~UmundoInvoker();
- virtual InvokerImpl* create(Interpreter* interpreter);
+ virtual boost::shared_ptr<IOProcessorImpl> create(Interpreter* interpreter);
virtual std::set<std::string> getNames() {
std::set<std::string> names;