In-memory event queue buffer.
More...
#include <SimpleEventQueueBuffer.h>
In-memory event queue buffer.
An event queue buffer provides a queue of events for an IEventQueue.
◆ SimpleEventQueueBuffer() [1/3]
SimpleEventQueueBuffer::SimpleEventQueueBuffer |
( |
| ) |
|
◆ SimpleEventQueueBuffer() [2/3]
◆ SimpleEventQueueBuffer() [3/3]
◆ ~SimpleEventQueueBuffer()
SimpleEventQueueBuffer::~SimpleEventQueueBuffer |
( |
| ) |
|
|
override |
◆ addEvent()
bool SimpleEventQueueBuffer::addEvent |
( |
uint32_t | dataID | ) |
|
|
overridevirtual |
Post an event.
Add the given event to the end of the queue buffer. This is a user event and getEvent()
must be able to identify it as such and return dataID
. This method must cause waitForEvent()
to return at some future time if it's blocked waiting on an event.
Implements IEventQueueBuffer.
◆ deleteTimer()
◆ getEvent()
Get the next event.
Get the next event from the buffer. Return None if no event is available. If a system event is next, return System and fill in event. The event data in a system event can point to a static buffer (because Event::deleteData() will not attempt to delete data in a System event). Otherwise, return User and fill in dataID
with the value passed to addEvent()
.
Implements IEventQueueBuffer.
◆ init()
void SimpleEventQueueBuffer::init |
( |
| ) |
|
|
inlineoverridevirtual |
Initialize.
Useful for platform-specific initialisation from a specific thread.
Implements IEventQueueBuffer.
◆ isEmpty()
bool SimpleEventQueueBuffer::isEmpty |
( |
| ) |
const |
|
overridevirtual |
Check if event queue buffer is empty.
Return true iff the event queue buffer is empty.
Implements IEventQueueBuffer.
◆ newTimer()
EventQueueTimer * SimpleEventQueueBuffer::newTimer |
( |
double | duration, |
|
|
bool | oneShot ) const |
|
overridevirtual |
Create a timer object.
Create and return a timer object. The object is opaque and is used only by the buffer but it must be a valid object (i.e. not nullptr).
Implements IEventQueueBuffer.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ waitForEvent()
void SimpleEventQueueBuffer::waitForEvent |
( |
double | timeout | ) |
|
|
overridevirtual |
Block waiting for an event.
Wait for an event in the event queue buffer for up to timeout
seconds.
Implements IEventQueueBuffer.
The documentation for this class was generated from the following files: