diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-12 23:49:43 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-12 23:49:43 (GMT) |
commit | a116aeb2cf5a84fa03f9814c3884561149029267 (patch) | |
tree | bdd7dfc15ec1e38edcc9a7532ffad03fe4f6f823 /src/uscxml/plugins/invoker/heartbeat | |
parent | 6d0622c0bb8f0e52589c82252f2cc1eb847ad9bf (diff) | |
download | uscxml-a116aeb2cf5a84fa03f9814c3884561149029267.zip uscxml-a116aeb2cf5a84fa03f9814c3884561149029267.tar.gz uscxml-a116aeb2cf5a84fa03f9814c3884561149029267.tar.bz2 |
Refactored to PIMPL pattern
Diffstat (limited to 'src/uscxml/plugins/invoker/heartbeat')
-rw-r--r-- | src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp | 10 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp index 6bc06d9..eaf5eba 100644 --- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp +++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp @@ -21,7 +21,7 @@ HeartbeatInvoker::HeartbeatInvoker() { HeartbeatInvoker::~HeartbeatInvoker() { }; -Invoker* HeartbeatInvoker::create(Interpreter* interpreter) { +InvokerImpl* HeartbeatInvoker::create(Interpreter* interpreter) { HeartbeatInvoker* invoker = new HeartbeatInvoker(); invoker->_interpreter = interpreter; return invoker; @@ -32,23 +32,23 @@ Data HeartbeatInvoker::getDataModelVariables() { return data; } -void HeartbeatInvoker::send(SendRequest& req) { +void HeartbeatInvoker::send(const SendRequest& req) { } void HeartbeatInvoker::cancel(const std::string sendId) { HeartbeatDispatcher::getInstance()->cancelEvent(toStr(this)); } -void HeartbeatInvoker::sendToParent(SendRequest& req) { +void HeartbeatInvoker::sendToParent(const SendRequest& req) { } -void HeartbeatInvoker::invoke(InvokeRequest& req) { +void HeartbeatInvoker::invoke(const InvokeRequest& req) { _invokeId = req.invokeid; _event.invokeid = _invokeId; std::string intervalStr; double interval = 0; unsigned long intervalMs = 0; - InvokeRequest::params_t::iterator paramIter = req.params.begin(); + InvokeRequest::params_t::const_iterator paramIter = req.params.begin(); while(paramIter != req.params.end()) { if (boost::iequals(paramIter->first, "interval")) { intervalStr = paramIter->second; diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h index 9a6cb47..8a90011 100644 --- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h +++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h @@ -9,11 +9,11 @@ namespace uscxml { -class HeartbeatInvoker : public Invoker { +class HeartbeatInvoker : public InvokerImpl { public: HeartbeatInvoker(); virtual ~HeartbeatInvoker(); - virtual Invoker* create(Interpreter* interpreter); + virtual InvokerImpl* create(Interpreter* interpreter); virtual std::set<std::string> getNames() { std::set<std::string> names; @@ -23,10 +23,10 @@ public: } virtual Data getDataModelVariables(); - virtual void send(SendRequest& req); + virtual void send(const SendRequest& req); virtual void cancel(const std::string sendId); - virtual void invoke(InvokeRequest& req); - virtual void sendToParent(SendRequest& req); + virtual void invoke(const InvokeRequest& req); + virtual void sendToParent(const SendRequest& req); static void dispatch(void* instance, std::string name); |