SDL++
C++wrapperfortheSDLlibrary.
|
Listens for and handles an event. More...
#include <Listener.h>
Public Types | |
typedef void(Handler::* | HandleFunc )(const EventType &event) |
The member function pointer to the Handler's handle function. | |
Public Member Functions | |
virtual bool | operator== (const SDL_Event *event) |
Listener (Handler &h, HandleFunc func) | |
virtual | ~Listener () |
virtual void | operator() (const SDL_Event *event) |
Listens for and handles an event.
EventType | The type of the event for which to listen. |
Handler | The Handler to handle the event. |
Definition at line 67 of file Listener.h.
void(Handler::* sdl::event::Listener< EventType, Handler >::HandleFunc)(const EventType &event), |
The member function pointer to the Handler's handle function.
event | The event to handle. |
Definition at line 75 of file Listener.h.
sdl::event::Listener< EventType, Handler >::Listener | ( | Handler & | h, |
HandleFunc | func | ||
) | [inline] |
Constructs a Listener for a Handler's handle function.
h | The Handler to handle the event. |
func | The Handler's handle function for the event. |
Definition at line 94 of file Listener.h.
virtual sdl::event::Listener< EventType, Handler >::~Listener | ( | ) | [inline, virtual] |
Destroys the Listener.
Definition at line 101 of file Listener.h.
virtual void sdl::event::Listener< EventType, Handler >::operator() | ( | const SDL_Event * | event | ) | [inline, virtual] |
Handles an event.
event | the event to handle. |
Implements sdl::event::basic_Listener.
Definition at line 109 of file Listener.h.
virtual bool sdl::event::Listener< EventType, Handler >::operator== | ( | const SDL_Event * | event | ) | [inline, virtual] |
Determines if a Listener equates to an SDL_Event.
event | The SDL_Event to check. |
Reimplemented from sdl::event::basic_Listener.
Definition at line 84 of file Listener.h.