Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

EventCallbackAs< EV > Class Template Reference

Listens for a specified event and then forwards to the specified callback. More...

#include <EventCallback.h>

Inheritance diagram for EventCallbackAs< EV >:

Detailed Description

template<class EV>
class EventCallbackAs< EV >

Listens for a specified event and then forwards to the specified callback.

This allows you to avoid the switch-block style of processing for events

Definition at line 13 of file EventCallback.h.

List of all members.

Public Member Functions

template<typename F >
 EventCallbackAs (const F &cb)
 constructor, pass zero-argument callback function
template<typename F , typename C >
 EventCallbackAs (const F &cb, C &userdata)
 constructor, pass the user data and single argument callback function
template<typename F , typename C >
 EventCallbackAs (const F &cb, const C &userdata)
 constructor, pass the user data and single argument callback function
template<typename F >
void redirect (const F &cb)
 constructor, pass zero-argument callback function
template<typename F , typename C >
void redirect (const F &cb, C &userdata)
 constructor, pass the user data and single argument callback function
template<typename F , typename C >
void redirect (const F &cb, const C &userdata)
 constructor, pass the user data and single argument callback function
 ~EventCallbackAs ()
 destructor

Protected Member Functions

virtual void processEvent (const EventBase &event)

Protected Attributes

FunctorAdapter * fun

Private Member Functions

 EventCallbackAs (const EventCallbackAs &)
 don't call
EventCallbackAsoperator= (const EventCallbackAs &)
 don't call

Constructor & Destructor Documentation

template<class EV>
template<typename F >
EventCallbackAs< EV >::EventCallbackAs ( const F &  cb  ) 

constructor, pass zero-argument callback function

Definition at line 17 of file EventCallback.h.

template<class EV>
template<typename F , typename C >
EventCallbackAs< EV >::EventCallbackAs ( const F &  cb,
C &  userdata 
)

constructor, pass the user data and single argument callback function

Definition at line 21 of file EventCallback.h.

template<class EV>
template<typename F , typename C >
EventCallbackAs< EV >::EventCallbackAs ( const F &  cb,
const C &  userdata 
)

constructor, pass the user data and single argument callback function

Definition at line 25 of file EventCallback.h.

template<class EV>
EventCallbackAs< EV >::~EventCallbackAs (  ) 

destructor

Definition at line 40 of file EventCallback.h.

template<class EV>
EventCallbackAs< EV >::EventCallbackAs ( const EventCallbackAs< EV > &   )  [private]

don't call


Member Function Documentation

template<class EV>
EventCallbackAs& EventCallbackAs< EV >::operator= ( const EventCallbackAs< EV > &   )  [private]

don't call

template<class EV>
virtual void EventCallbackAs< EV >::processEvent ( const EventBase event  )  [protected, virtual]

Implements EventListener.

Definition at line 107 of file EventCallback.h.

template<class EV>
template<typename F , typename C >
void EventCallbackAs< EV >::redirect ( const F &  cb,
const C &  userdata 
)

constructor, pass the user data and single argument callback function

Definition at line 37 of file EventCallback.h.

template<class EV>
template<typename F , typename C >
void EventCallbackAs< EV >::redirect ( const F &  cb,
C &  userdata 
)

constructor, pass the user data and single argument callback function

Definition at line 33 of file EventCallback.h.

template<class EV>
template<typename F >
void EventCallbackAs< EV >::redirect ( const F &  cb  ) 

constructor, pass zero-argument callback function

Definition at line 29 of file EventCallback.h.


Member Data Documentation

template<class EV>
FunctorAdapter* EventCallbackAs< EV >::fun [protected]

The documentation for this class was generated from the following file:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:07 2016 by Doxygen 1.6.3