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

Public Types

typedef std::function< R(Ts ...) > tFptr
 

Public Member Functions

 TLambdaCallback ()
 
 TLambdaCallback (tFptr iFptr)
 
Execute (Ts ... args) const
 
void ExecuteIfBound (Ts ... args) const
 

Member Typedef Documentation

◆ tFptr

template<typename R , typename ... Ts>
typedef std::function< R ( Ts ... ) > TLambdaCallback< R, Ts >::tFptr

Typedef tFptr for the internal function pointer type.

Constructor & Destructor Documentation

◆ TLambdaCallback() [1/2]

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

Default null constructor.

◆ TLambdaCallback() [2/2]

template<typename R , typename ... Ts>
TLambdaCallback< R, Ts >::TLambdaCallback ( tFptr  iFptr)
inline

Constructor from function pointer and optional extra info.

Member Function Documentation

◆ Execute()

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

Call the function pointer without checking if it is set.

◆ ExecuteIfBound()

template<typename R , typename ... Ts>
void TLambdaCallback< 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.