EventQueue.h
Go to the documentation of this file.
1 
20 #ifndef EVENTQUEUE_H_C5C41BEE
21 #define EVENTQUEUE_H_C5C41BEE
22 
23 #include "uscxml/Common.h"
24 #include "uscxml/messages/Event.h"
25 
26 namespace uscxml {
27 
28 class EventQueueImpl;
29 class DelayedEventQueueImpl;
30 
35 class USCXML_API EventQueue {
36 public:
38 
39  virtual Event dequeue(bool blocking);
40  virtual void enqueue(const Event& event);
41 
42 protected:
43  std::shared_ptr<EventQueueImpl> _impl;
44 
45 };
46 
51 class USCXML_API DelayedEventQueue : public EventQueue {
52 public:
53  PIMPL_OPERATORS_INHERIT(DelayedEventQueue, EventQueue);
54 
55  void enqueueDelayed(const Event& event, size_t delayMs, const std::string& eventUUID);
56  void cancelDelayed(const std::string& eventUUID);
57  void cancelAllDelayed();
58 
59 protected:
60  std::shared_ptr<DelayedEventQueueImpl> _impl;
61 };
62 
63 }
64 
65 #endif /* end of include guard: EVENTQUEUE_H_C5C41BEE */
Definition: InterpreterIssue.cpp:33
#define PIMPL_OPERATORS(type)
The usual operators as required for the PIMPL pattern.
Definition: Common.h:60
Definition: EventQueue.h:35
Definition: EventQueue.h:51
Definition: Event.h:84