Angel 3.2
A 2D Game Prototyping Engine
Public Types | Public Member Functions | List of all members
TGenericCallback< ClassInstance, ParamType > Class Template Reference

(Internal) A callback template to simplify storage/retrieval of method pointers More...

#include <Callback.h>

Public Types

typedef void(ClassInstance::* FunctionPointer )(ParamType param)

Public Member Functions

virtual void Execute (ParamType param) const
void SetCallback (ClassInstance *instance, FunctionPointer function)
const ClassInstance * GetInstance ()
const FunctionPointer GetFunction ()

Detailed Description

template<class ClassInstance, class ParamType>
class TGenericCallback< ClassInstance, ParamType >

Storing pointers to member functions (as opposed to just loose functions) can be complicated and error-prone. This template class is designed to make such things simpler. An example usage is in the SoundDevice class.

Note that this template only lets you store callbacks that take a single parameter.

Definition at line 43 of file Callback.h.

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