rad 6.2.0
|
#include <EventQueue.h>
Public Member Functions | |
EventQueue () | |
virtual | ~EventQueue () |
void | add (Event *e) |
Event * | remove () |
bool | isEmpty () const |
int | size () const |
void | clear () |
This class implements a queue that can be shared by different threads to exchange events.
The queue is protected by a mutex.
scxml4cpp::EventQueue::EventQueue | ( | ) |
|
virtual |
void scxml4cpp::EventQueue::add | ( | Event * | e | ) |
Thread safe method to add an event in the queue. The event is not copied, only the pointer is added.
e | Pointer to the event to be added. |
void scxml4cpp::EventQueue::clear | ( | ) |
Thread safe method to remove all events from the queue. Only the pointers are remove, the events are not deleted.
bool scxml4cpp::EventQueue::isEmpty | ( | ) | const |
Event * scxml4cpp::EventQueue::remove | ( | ) |
Thread safe method to remove the last added event from the queue. The event is not copied/deleted, only the pointer is removed from the queue.
e | Pointer to the last event in the queue which has been removed. |
int scxml4cpp::EventQueue::size | ( | ) | const |