Classes | Public Member Functions

a5::Event_Reader Class Reference
[Event]

Simpler event reader interface. More...

#include <Event_Reader.hpp>

List of all members.

Classes

class  No_Event
 Thrown when no event was stored in the reader. More...

Public Member Functions

 Event_Reader (Event_Queue &queue_)
 Create an event reader.
Event_QueueQueue () const
 Returns the wrapped queue.
bool Next ()
 Checks the queue for a new event Returns true if an event was waiting, false otherwise.
void WaitNext ()
 Waits for a new event.
bool WaitNext (double seconds)
 Waits the specified time for a new event Returns true if an event was waiting, false otherwise.
bool HasEvent () const
 Returns true if Get() and friends return a valid pointer.
template<class T >
T & Get () const
 Gets the latest event as a reference to the specified type.
a5::EventEvent () const
 Gets the latest event as a reference to Event.
a5::Timer::EventTimer () const
 Gets the latest event as a reference to Timer::Event.
a5::Display::EventDisplay () const
 Gets the latest event as a reference to Display::Event.
a5::Keyboard::EventKeyboard () const
 Gets the latest event as a reference to Keyboard::Event.
a5::Mouse::EventMouse () const
 Gets the latest event as a reference to Mouse::Event.
unsigned int Type () const
 Gets the Event type.
unsigned int SubType () const
 Gets the Event sub-type.

Detailed Description

Simpler event reader interface.


Constructor & Destructor Documentation

a5::Event_Reader::Event_Reader ( Event_Queue queue_  ) 

Create an event reader.


Member Function Documentation

Event_Queue& a5::Event_Reader::Queue (  )  const

Returns the wrapped queue.

bool a5::Event_Reader::Next (  ) 

Checks the queue for a new event Returns true if an event was waiting, false otherwise.

void a5::Event_Reader::WaitNext (  ) 

Waits for a new event.

bool a5::Event_Reader::WaitNext ( double  seconds  ) 

Waits the specified time for a new event Returns true if an event was waiting, false otherwise.

bool a5::Event_Reader::HasEvent (  )  const

Returns true if Get() and friends return a valid pointer.

template<class T >
T& a5::Event_Reader::Get (  )  const

Gets the latest event as a reference to the specified type.

a5::Event& a5::Event_Reader::Event (  )  const

Gets the latest event as a reference to Event.

a5::Timer::Event& a5::Event_Reader::Timer (  )  const

Gets the latest event as a reference to Timer::Event.

a5::Display::Event& a5::Event_Reader::Display (  )  const

Gets the latest event as a reference to Display::Event.

a5::Keyboard::Event& a5::Event_Reader::Keyboard (  )  const

Gets the latest event as a reference to Keyboard::Event.

a5::Mouse::Event& a5::Event_Reader::Mouse (  )  const

Gets the latest event as a reference to Mouse::Event.

unsigned int a5::Event_Reader::Type (  )  const

Gets the Event type.

unsigned int a5::Event_Reader::SubType (  )  const

Gets the Event sub-type.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines