SDL++
C++wrapperfortheSDLlibrary.

sdl::event::Dispatcher Class Reference

Dispatches events to Listeners. More...

#include <Dispatcher.h>

List of all members.

Public Member Functions

 Dispatcher ()
template<class Handler >
 Dispatcher (Handler &handler)
template<class Handler >
Dispatcheradd (Handler &handler)
void operator() (const SDL_Event *event)

Detailed Description

Dispatches events to Listeners.

Definition at line 81 of file Dispatcher.h.


Constructor & Destructor Documentation

sdl::event::Dispatcher::Dispatcher ( ) [inline]

Constructs a default Dispatcher.

Definition at line 86 of file Dispatcher.h.

template<class Handler >
sdl::event::Dispatcher::Dispatcher ( Handler &  handler) [inline]

Constructs a Dispatcher from a Handler.

Template Parameters:
HandlerThe type of the Handler from which to construct the Dispatcher.
Parameters:
handlerThe handler form which to get the Listener's handle functions.

Definition at line 96 of file Dispatcher.h.


Member Function Documentation

template<class Handler >
Dispatcher& sdl::event::Dispatcher::add ( Handler &  handler) [inline]

Adds a handler to the Dispatcher.

Template Parameters:
HandlerThe type of the Handler to add to the dispatcher.
Parameters:
handlerThe Handler to add to the Dispatcher.
Returns:
A reference to the Dispatcher.

Definition at line 108 of file Dispatcher.h.

void sdl::event::Dispatcher::operator() ( const SDL_Event *  event) [inline]

Dispatches an event.

Parameters:
eventThe event to handle.

Definition at line 118 of file Dispatcher.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs