ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::Callback< T, S > Class Template Reference

Callback<T, S> implements an object-oriented callback. More...

#include <callback.h>

Inheritance diagram for Common::Callback< T, S >:
Collaboration diagram for Common::Callback< T, S >:

List of all members.

Public Member Functions

 Callback (T *object, TMethod method)
virtual ~Callback ()
void operator() (S data)

Protected Types

typedef void(T::* TMethod )(S)

Protected Attributes

T * _object
TMethod _method

Detailed Description

template<class T, typename S = void *>
class Common::Callback< T, S >

Callback<T, S> implements an object-oriented callback.

<T> stands for a class which method you want to call. <S>, again, is the type of an object passed to operator().

So, if you have void MyClass::myMethod(AnotherClass) method, the corresponding callback is Callback<MyClass, AnotherClass>. You create it similarly to this: new Callback<MyClass, AnotherClass>( pointerToMyClassObject, &MyClass::myMethod )

Definition at line 82 of file callback.h.


Member Typedef Documentation

template<class T, typename S = void *>
typedef void(T::* Common::Callback< T, S >::TMethod)(S) [protected]

Definition at line 84 of file callback.h.


Constructor & Destructor Documentation

template<class T, typename S = void *>
Common::Callback< T, S >::Callback ( T *  object,
TMethod  method 
) [inline]

Definition at line 88 of file callback.h.

template<class T, typename S = void *>
virtual Common::Callback< T, S >::~Callback (  )  [inline, virtual]

Definition at line 89 of file callback.h.


Member Function Documentation

template<class T, typename S = void *>
void Common::Callback< T, S >::operator() ( data  )  [inline, virtual]

Implements Common::BaseCallback< S >.

Definition at line 90 of file callback.h.


Member Data Documentation

template<class T, typename S = void *>
TMethod Common::Callback< T, S >::_method [protected]

Definition at line 86 of file callback.h.

template<class T, typename S = void *>
T* Common::Callback< T, S >::_object [protected]

Definition at line 85 of file callback.h.


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


Generated on Sat Jul 13 2019 05:03:36 for ResidualVM by doxygen 1.7.1
curved edge   curved edge