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

Detailed Description

template<typename Ret, typename Param0>
class makRadarFx::StaticFunctionCallback< Ret, Param0 >
Template Parameters
RetReturn type of the callback function
Param0Type of the single parameter passed to the callback

This class implements the Callback interface for global functions or static class methods that accept a single parameter and return a value

#include <delegate.h>

Inheritance diagram for makRadarFx::StaticFunctionCallback< Ret, Param0 >:
[legend]

Public Member Functions

 StaticFunctionCallback (Ret(*func)(Param0))
 
 StaticFunctionCallback (const StaticFunctionCallback &orig)
 
virtual StaticFunctionCallbackclone ()
 
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

Ret(* myFunction )(Param0)
 

Constructor & Destructor Documentation

◆ StaticFunctionCallback() [1/2]

template<typename Ret, typename Param0>
makRadarFx::StaticFunctionCallback< Ret, Param0 >::StaticFunctionCallback ( Ret(* func )(Param0))
inline

Constructor.

Parameters
funcPointer to the static or global function to bind

References myFunction.

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

◆ StaticFunctionCallback() [2/2]

template<typename Ret, typename Param0>
makRadarFx::StaticFunctionCallback< Ret, Param0 >::StaticFunctionCallback ( const StaticFunctionCallback< Ret, Param0 > & orig)
inline

Copy constructor.

Parameters
origOriginal callback to copy from

References myFunction, and StaticFunctionCallback().

Member Function Documentation

◆ clone()

template<typename Ret, typename Param0>
virtual StaticFunctionCallback * makRadarFx::StaticFunctionCallback< Ret, Param0 >::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 myFunction, and StaticFunctionCallback().

◆ invoke()

template<typename Ret, typename Param0>
virtual Ret makRadarFx::StaticFunctionCallback< Ret, Param0 >::invoke ( Param0 param0)
inlinevirtual

Invokes the bound function with the provided parameter.

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

Implements makRadarFx::Callback< Ret, Param0 >.

References myFunction.

◆ operator==()

template<typename Ret, typename Param0>
virtual bool makRadarFx::StaticFunctionCallback< Ret, Param0 >::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 function

Implements makRadarFx::Callback< Ret, Param0 >.

References myFunction, and StaticFunctionCallback().

Member Data Documentation

◆ myFunction

template<typename Ret, typename Param0>
Ret(* makRadarFx::StaticFunctionCallback< Ret, Param0 >::myFunction) (Param0)
private

Pointer to the static or global function.

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


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