ULIS  dev4.0.7
Utility Library for Imaging Systems
Public Types | Public Member Functions | List of all members
TCallback< R, Ts > Class Template Reference

Public Types

typedef R(* tFptr) (Ts ..., void *)
 

Public Member Functions

 TCallback ()
 
 TCallback (tFptr iFptr, void *iInfo=nullptr)
 
Execute (Ts ... args) const
 
void ExecuteIfBound (Ts ... args) const
 

Member Typedef Documentation

◆ tFptr

template<typename R, typename ... Ts>
typedef R(* TCallback< R, Ts >::tFptr) (Ts ..., void *)

Typedef tFptr for the internal function pointer type.

Constructor & Destructor Documentation

◆ TCallback() [1/2]

template<typename R, typename ... Ts>
TCallback< R, Ts >::TCallback ( )
inline

Default null constructor.

◆ TCallback() [2/2]

template<typename R, typename ... Ts>
TCallback< R, Ts >::TCallback ( tFptr  iFptr,
void *  iInfo = nullptr 
)
inline

Constructor from function pointer and optional extra info.

Member Function Documentation

◆ Execute()

template<typename R, typename ... Ts>
R TCallback< R, Ts >::Execute ( Ts ...  args) const
inline

Call the function pointer without checking if it is set.

◆ ExecuteIfBound()

template<typename R, typename ... Ts>
void TCallback< R, Ts >::ExecuteIfBound ( Ts ...  args) const
inline

Call the function pointer only if set. No return value because we can't ensure a generic default return value if not bound.