SDL++
C++wrapperfortheSDLlibrary.

sdl::event::Adder< Listeners, Handler > Struct Template Reference

Adds a Listener for an event to a collection of Listeners. More...

#include <Dispatcher.h>

List of all members.

Public Member Functions

 Adder (Listeners &listeners, Handler &handler)
template<class Event >
void operator() (const Event &event)

Detailed Description

template<class Listeners, class Handler>
struct sdl::event::Adder< Listeners, Handler >

Adds a Listener for an event to a collection of Listeners.

Template Parameters:
ListenersThe type of the Listeners to which to add the Listener.
HandlerThe type of the Handler from which to get the Listener's handle function.

Definition at line 44 of file Dispatcher.h.


Constructor & Destructor Documentation

template<class Listeners , class Handler >
sdl::event::Adder< Listeners, Handler >::Adder ( Listeners &  listeners,
Handler &  handler 
) [inline]

Constructs an Adder from a Listener and a Handler.

Parameters:
listenersthe Listeners to which to add the Listener.
handlerthe Handler from which to get the Listener's handle function.

Definition at line 51 of file Dispatcher.h.


Member Function Documentation

template<class Listeners , class Handler >
template<class Event >
void sdl::event::Adder< Listeners, Handler >::operator() ( const Event event) [inline]

Adds a listener for event to the Listeners.

Template Parameters:
EventThe type of the event for which to add a Listener.
Parameters:
eventThe event for which to add a Listener.

Definition at line 61 of file Dispatcher.h.


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