diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-12-06 21:59:37 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-12-06 21:59:37 (GMT) |
commit | fc10986cdd35a7a5ce483682ca43f3c496e907c1 (patch) | |
tree | d3d2277f4033eabf3228c624bf006bb51d447a52 /src/uscxml/interpreter/BasicEventQueue.cpp | |
parent | 53197953ce382a536bfef870efc4c3f1ccf0f180 (diff) | |
download | uscxml-fc10986cdd35a7a5ce483682ca43f3c496e907c1.zip uscxml-fc10986cdd35a7a5ce483682ca43f3c496e907c1.tar.gz uscxml-fc10986cdd35a7a5ce483682ca43f3c496e907c1.tar.bz2 |
Use existing ActionLanguage to create new instances in invoked interpreters
Diffstat (limited to 'src/uscxml/interpreter/BasicEventQueue.cpp')
-rw-r--r-- | src/uscxml/interpreter/BasicEventQueue.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/uscxml/interpreter/BasicEventQueue.cpp b/src/uscxml/interpreter/BasicEventQueue.cpp index cc5ff04..78b2321 100644 --- a/src/uscxml/interpreter/BasicEventQueue.cpp +++ b/src/uscxml/interpreter/BasicEventQueue.cpp @@ -65,6 +65,10 @@ void BasicEventQueue::reset() { _queue.clear(); } +std::shared_ptr<EventQueueImpl> BasicEventQueue::create() { + return std::shared_ptr<EventQueueImpl>(new BasicEventQueue()); +} + static void dummyCallback(evutil_socket_t fd, short what, void *arg) { timeval tv; tv.tv_sec = 365 * 24 * 3600; @@ -102,6 +106,10 @@ BasicDelayedEventQueue::~BasicDelayedEventQueue() { event_base_free(_eventLoop); } +std::shared_ptr<DelayedEventQueueImpl> BasicDelayedEventQueue::create(DelayedEventQueueCallbacks* callbacks) { + return std::shared_ptr<DelayedEventQueueImpl>(new BasicDelayedEventQueue(_callbacks)); +} + void BasicDelayedEventQueue::timerCallback(evutil_socket_t fd, short what, void *arg) { struct callbackData *data = (struct callbackData*)arg; std::lock_guard<std::recursive_mutex> lock(data->eventQueue->_mutex); @@ -203,4 +211,4 @@ void BasicDelayedEventQueue::reset() { _queue.clear(); } -}
\ No newline at end of file +} |