VR-Engage  2.2
Loading...
Searching...
No Matches
makRadarFx::MethodCallback< Ret, Param0, T, Method > Class Template Reference

Detailed Description

template<typename Ret, typename Param0, typename T, typename Method>
class makRadarFx::MethodCallback< Ret, Param0, T, Method >
Template Parameters
RetReturn type of the callback function
Param0Type of the single parameter passed to the callback
TType of the class containing the member function
MethodType of the member function pointer

This class implements the Callback interface for non-static class member methods that accept a single parameter and return a value

#include <delegate.h>

Inheritance diagram for makRadarFx::MethodCallback< Ret, Param0, T, Method >:
[legend]

Public Member Functions

 MethodCallback (void *object, Method method)
 
 MethodCallback (const MethodCallback &orig)
 
virtual MethodCallbackclone ()
 
virtual Ret invoke (Param0 param0)
 
virtual bool operator== (const Callback< Ret, Param0 > &rhs)
 
- Public Member Functions inherited from makRadarFx::Callback< Ret, Param0 >
virtual ~Callback ()
 
virtual bool operator!= (const Callback &rhs)
 

Private Attributes

void * myObject
 
Method myMethod
 

Constructor & Destructor Documentation

◆ MethodCallback() [1/2]

template<typename Ret, typename Param0, typename T, typename Method>
makRadarFx::MethodCallback< Ret, Param0, T, Method >::MethodCallback ( void * object,
Method method )
inline

Constructor.

Parameters
objectPointer to the object instance
methodPointer to the member function to bind

References myMethod, and myObject.

Referenced by clone(), MethodCallback(), and operator==().

◆ MethodCallback() [2/2]

template<typename Ret, typename Param0, typename T, typename Method>
makRadarFx::MethodCallback< Ret, Param0, T, Method >::MethodCallback ( const MethodCallback< Ret, Param0, T, Method > & orig)
inline

Copy constructor.

Parameters
origOriginal callback to copy from

References MethodCallback(), myMethod, and myObject.

Member Function Documentation

◆ clone()

template<typename Ret, typename Param0, typename T, typename Method>
virtual MethodCallback * makRadarFx::MethodCallback< Ret, Param0, T, Method >::clone ( )
inlinevirtual

Creates a copy of this callback.

Returns
Pointer to a newly allocated copy of this callback

Implements the clone method from the base class for deep copying

Implements makRadarFx::Callback< Ret, Param0 >.

References MethodCallback(), myMethod, and myObject.

◆ invoke()

template<typename Ret, typename Param0, typename T, typename Method>
virtual Ret makRadarFx::MethodCallback< Ret, Param0, T, Method >::invoke ( Param0 param0)
inlinevirtual

Invokes the bound member function with the provided parameter.

Parameters
param0The parameter to pass to the member function
Returns
Result of the member function invocation

Implements makRadarFx::Callback< Ret, Param0 >.

References myMethod, and myObject.

◆ operator==()

template<typename Ret, typename Param0, typename T, typename Method>
virtual bool makRadarFx::MethodCallback< Ret, Param0, T, Method >::operator== ( const Callback< Ret, Param0 > & rhs)
inlinevirtual

Equality comparison operator.

Parameters
rhsThe right-hand side callback to compare with
Returns
True if both callbacks reference the same object and method

Implements makRadarFx::Callback< Ret, Param0 >.

References MethodCallback(), myMethod, and myObject.

Member Data Documentation

◆ myObject

template<typename Ret, typename Param0, typename T, typename Method>
void* makRadarFx::MethodCallback< Ret, Param0, T, Method >::myObject
private

Pointer to the object instance.

Referenced by clone(), invoke(), MethodCallback(), MethodCallback(), and operator==().

◆ myMethod

template<typename Ret, typename Param0, typename T, typename Method>
Method makRadarFx::MethodCallback< Ret, Param0, T, Method >::myMethod
private

Pointer to the member function.

Referenced by clone(), invoke(), MethodCallback(), MethodCallback(), and operator==().


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