BasicEventQueue.h
Go to the documentation of this file.
1 
20 #ifndef BASICEVENTQUEUE_H_39DCC18B
21 #define BASICEVENTQUEUE_H_39DCC18B
22 
23 #include "EventQueueImpl.h"
24 #include <string>
25 #include <map>
26 #include <list>
27 #include <thread>
28 #include <mutex>
29 #include <condition_variable>
30 
31 namespace uscxml {
32 
37 class USCXML_API BasicEventQueue : public EventQueueImpl {
38 public:
40  virtual ~BasicEventQueue();
41  virtual std::shared_ptr<EventQueueImpl> create();
42  virtual Event dequeue(size_t blockMs);
43  virtual void enqueue(const Event& event);
44  virtual void reset();
45  virtual Data serialize();
46  virtual void deserialize(const Data& data);
47 
48 protected:
49  std::list<Event> _queue;
50  std::recursive_mutex _mutex;
51  std::condition_variable_any _cond;
52 };
53 
54 }
55 
56 #endif /* end of include guard: BASICEVENTQUEUE_H_39DCC18B */
Definition: Breakpoint.cpp:26
Definition: BasicEventQueue.h:37
Definition: Event.h:94
Definition: EventQueueImpl.h:39
Definition: Data.h:44