HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_EventQueue Class Reference

#include <PDG_EventQueue.h>

Classes

class  ScopedPause
 

Public Member Functions

 PDG_EventQueue (bool background)
 Constructs a new event queue. More...
 
 ~PDG_EventQueue ()
 
void terminate ()
 
void queueEvent (const PDG_EventEmitter *emitter, const PDG_Event &event)
 
void emitEvent (const PDG_EventEmitter *emitter, const PDG_Event &event) const
 Emits an event immediately on the calling thread. More...
 
void waitAllEvents (PDG_EventEmitter *emitter=nullptr)
 
void waitEmitter (const PDG_EventEmitter *emitter)
 
bool isConsolidateEvents () const
 
void setConsolidateEvents (bool consolidate)
 Configures the event consolidation flag. More...
 

Friends

class PDG_EventEmitter
 

Detailed Description

Definition at line 35 of file PDG_EventQueue.h.

Constructor & Destructor Documentation

PDG_EventQueue::PDG_EventQueue ( bool  background)

Constructs a new event queue.

PDG_EventQueue::~PDG_EventQueue ( )

Member Function Documentation

void PDG_EventQueue::emitEvent ( const PDG_EventEmitter emitter,
const PDG_Event event 
) const

Emits an event immediately on the calling thread.

bool PDG_EventQueue::isConsolidateEvents ( ) const
inline

Returns whether or not the event queue attempts to consolidate consecutive events of the same type

Definition at line 94 of file PDG_EventQueue.h.

void PDG_EventQueue::queueEvent ( const PDG_EventEmitter emitter,
const PDG_Event event 
)

Queues an event that will eventually be dispatched by the background thread running in this event queue instance.

void PDG_EventQueue::setConsolidateEvents ( bool  consolidate)
inline

Configures the event consolidation flag.

Definition at line 98 of file PDG_EventQueue.h.

void PDG_EventQueue::terminate ( )

Terminates the queue, waits for the event thread to finish, and unsets the queue from all event emitters registered with this event queue instance.

void PDG_EventQueue::waitAllEvents ( PDG_EventEmitter emitter = nullptr)

Waits for all queued events to finish, and prevents new events from being added until that condition is reached. Blocks the caller. If an event emitter is passed into this function, it gets deregistered before unblocking the event queue.

void PDG_EventQueue::waitEmitter ( const PDG_EventEmitter emitter)

Waits until the specified emitter is registered, to ensure that all events for that emitter have been flushed

Friends And Related Function Documentation

friend class PDG_EventEmitter
friend

Definition at line 102 of file PDG_EventQueue.h.


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