Base class for all types of events and timeouts.
Definition: event.h:23
Used by the TimeoutManager to create and handle a timeout.
Definition: timeout.h:28
XFTimeout(int id, int interval, interface::XFBehavior *pBehavior=nullptr)
bool deleteAfterConsume() const override
Tells the dispatcher if the event must be deleted or not.
int getInterval() const
Returns the timeout interval in milliseconds.
Definition: timeout.h:48
int getRelTicks() const
Returns remaining ticks.
Definition: timeout.h:50
int relTicks_
Used by the TimeoutManager to calculate remaining time (in milliseconds). Can get negative!
Definition: timeout.h:56
bool operator==(const XFTimeout &timeout) const
void setRelTicks(int relTicks)
Sets remaining ticks.
Definition: timeout.h:49
void addToRelTicks(int ticksToAdd)
Adds ticksToAdd to remaining ticks.
Definition: timeout.h:52
const int interval_
Timeout interval in milliseconds.
Definition: timeout.h:55
void substractFromRelTicks(int ticksToSubstract)
Substracts ticksToSubstract from remaining ticks.
Definition: timeout.h:51
Default implementation of the XF TimeoutManager.
Definition: timeoutmanager.h:21
Interface to receive and process events.
Definition: behavior.h:24
Interface for TimerManager classes (and some few 'tick' stuff already provided).
Definition: timeoutmanager.h:26