Simpler event reader interface. More...
#include <Event_Reader.hpp>
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_Queue & | Queue () 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::Event & | Event () const |
| Gets the latest event as a reference to Event. | |
| a5::Timer::Event & | Timer () const |
| Gets the latest event as a reference to Timer::Event. | |
| a5::Display::Event & | Display () const |
| Gets the latest event as a reference to Display::Event. | |
| a5::Keyboard::Event & | Keyboard () const |
| Gets the latest event as a reference to Keyboard::Event. | |
| a5::Mouse::Event & | Mouse () 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. | |
Simpler event reader interface.
| a5::Event_Reader::Event_Reader | ( | Event_Queue & | queue_ | ) |
Create an event reader.
| 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.
| T& a5::Event_Reader::Get | ( | ) | const |
Gets the latest event as a reference to the specified type.
| 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.
1.7.1