EventListenerFactory< T, D > Struct Template Reference

Helper for using member functions as dispatch methods. More...

#include <eventlistener.hpp>


Classes

struct  create


Detailed Description

template<class T, EventListener T::* D>
struct EventListenerFactory< T, D >

Helper for using member functions as dispatch methods.

The 3-level structure is due to default template parameter not being allowed on functions yet. Conceptually, this helper takes two parameters: the name of the member variable pointing to the dispatch table and the name of the member function to call on dispatch. With these two parameters, it creates a dispatch method. When called, this free function forwards the call to the member function. Pseudo-syntax for getting a dispatch method: &EventListenerFactory< _, DispatchPointerName >create< _, MemberFunctionName >function See the start of the spawnarea.cpp file for a complete example.

Definition at line 85 of file eventlistener.hpp.


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

Generated on Sun Apr 26 17:30:46 2009 for TMW Server Collection by  doxygen 1.5.5