Drag[en]gine Game Engine  1.0
deInputEventQueue Class Reference

Input events queue with an initial size. More...

#include <deInputEventQueue.h>

Public Member Functions

Constructors and Destructors
 deInputEventQueue (int queueSize)
 Create a new event queue. More...
 
 ~deInputEventQueue ()
 Clean up the event queue. More...
 
Management
bool GetHasEvents () const
 Determine if the queue contains any events. More...
 
int GetEventCount () const
 Number of events in the queue. More...
 
const deInputEventGetEventAt (int index) const
 Event by index. More...
 
bool AddEvent (const deInputEvent &event)
 Add a copy of an event to the end of the queue. More...
 
void RemoveAllEvents ()
 Remove all events from the queue. More...
 

Detailed Description

Input events queue with an initial size.

The queue does not grow since processing a large amount of events due to a short time problem is more of a problem than discarding some events in such a situation.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deInputEventQueue()

deInputEventQueue::deInputEventQueue ( int  queueSize)

Create a new event queue.

Exceptions
deeInvalidParamqueueSize is less than 1.

◆ ~deInputEventQueue()

deInputEventQueue::~deInputEventQueue ( )

Clean up the event queue.

Member Function Documentation

◆ AddEvent()

bool deInputEventQueue::AddEvent ( const deInputEvent event)

Add a copy of an event to the end of the queue.

If the queue is full the event is discarded.

Returns
true if the event has been added otherwise false.

Referenced by GetEventCount().

◆ GetEventAt()

const deInputEvent& deInputEventQueue::GetEventAt ( int  index) const

Event by index.

Exceptions
deeInvalidParamindex is less than 0 or greater than GetEventCount()-1.

Referenced by GetEventCount().

◆ GetEventCount()

int deInputEventQueue::GetEventCount ( ) const
inline

Number of events in the queue.

References AddEvent(), GetEventAt(), and RemoveAllEvents().

◆ GetHasEvents()

bool deInputEventQueue::GetHasEvents ( ) const
inline

Determine if the queue contains any events.

◆ RemoveAllEvents()

void deInputEventQueue::RemoveAllEvents ( )

Remove all events from the queue.

Referenced by GetEventCount().


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