rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
scxml4cpp::EventQueue Class Reference

#include <EventQueue.h>

Public Member Functions

 EventQueue ()
 
virtual ~EventQueue ()
 
void add (Event *e)
 
Eventremove ()
 
bool isEmpty () const
 
int size () const
 
void clear ()
 

Detailed Description

This class implements a queue that can be shared by different threads to exchange events.

The queue is protected by a mutex.

Constructor & Destructor Documentation

◆ EventQueue()

scxml4cpp::EventQueue::EventQueue ( )

◆ ~EventQueue()

scxml4cpp::EventQueue::~EventQueue ( )
virtual

Member Function Documentation

◆ add()

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.

Parameters
ePointer to the event to be added.

◆ clear()

void scxml4cpp::EventQueue::clear ( )

Thread safe method to remove all events from the queue. Only the pointers are remove, the events are not deleted.

◆ isEmpty()

bool scxml4cpp::EventQueue::isEmpty ( ) const
Returns
true if the queue is emtpy, false otherwise.

◆ remove()

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.

Parameters
ePointer to the last event in the queue which has been removed.

◆ size()

int scxml4cpp::EventQueue::size ( ) const
Returns
the number of events in the queue.

The documentation for this class was generated from the following files: