20#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_EVENTQUEUE_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_INC_EVENTQUEUE_HXX
44 std::shared_ptr< ::canvas::tools::ElapsedTime > pPresTimer );
115 std::shared_ptr< ::canvas::tools::ElapsedTime >
const &
137 void process_(
bool bFireAllEvents );
142 std::shared_ptr< ::canvas::tools::ElapsedTime >
mpTimer;
This class handles events in a presentation.
EventQueue(std::shared_ptr< ::canvas::tools::ElapsedTime > pPresTimer)
std::shared_ptr< ::canvas::tools::ElapsedTime > const & getTimer() const
Gets the queue's timer object.
std::shared_ptr< ::canvas::tools::ElapsedTime > mpTimer
EventEntryVector maNextEvents
bool addEventForNextRound(const EventSharedPtr &event)
Add the given event to the queue.
EventQueue & operator=(const EventQueue &)=delete
void forceEmpty()
Forces an empty queue, firing all events immediately without minding any times.
::std::priority_queue< EventEntry > ImplQueueType
EventQueue(const EventQueue &)=delete
ImplQueueType maNextNextEvents
bool addEvent(const EventSharedPtr &event)
Add the given event to the queue.
double nextTimeout() const
Query timeout for the topmost event in the queue.
::std::vector< EventEntry > EventEntryVector
void process()
Process the event queue.
void process_(bool bFireAllEvents)
bool addEventWhenQueueIsEmpty(const EventSharedPtr &rpEvent)
Another way to control the order of asynchronous event execution.
void clear()
Remove all pending events from the queue.
bool isEmpty() const
Query state of the queue.
::std::shared_ptr< Event > EventSharedPtr
bool operator<(const EventEntry &) const
EventEntry(EventSharedPtr p, double t)