#include <DelayedEvent.h>
Inheritance diagram for CODEX_Events::DelayedEvent:


Public Member Functions | |
| DelayedEvent (EventBase *evt) | |
| Object constructor. | |
| virtual | ~DelayedEvent () |
| Virtual destructor. | |
| bool | handle () |
| Handle the event. | |
| Activity * | source () |
| The Activity that created this event. | |
Static Public Attributes | |
| static long int | sDelay |
| Number of seconds to delay. | |
| static long int | usDelay |
| Number of milliseconds to delay. | |
Protected Attributes | |
| Activity * | m_source |
| Source of this event. | |
This class enables event delays based on the wall clock. Given another EventBase object, a DelayedEvent will wait until a specified amount of time has elapsed before handling the internal event. The delay is the same for all DelayEvent%s, and is configured through static members sDelay and usDelay.
Definition at line 38 of file DelayedEvent.h.
|
|
Object constructor.
Definition at line 46 of file DelayedEvent.h. |
|
|
Handle the event. This behaves differently than most of the implementations of EventBase::handle(). Rather than calling an appropriate Activity%'s handler, this method checks the age of the event. If the age is greater than or equal to the specified delay, the internally-held event is dispatched through its EventBase::handle() method. If not, the event is returned to the queue.
Implements CODEX_Events::EventBase. Definition at line 74 of file DelayedEvent.h. References CODEX_Events::EventBase::handle(), sDelay, and usDelay. |
1.4.1