ADTF
Loading...
Searching...
No Matches
a_util::experimental::NullaryDelegate< ReturnType > Class Template Reference

#include <delegate_decl.h>

Inherits detail::DelegateBase< detail::delegates::DelegateInterface< ReturnType > >.

Public Member Functions

 NullaryDelegate (ReturnType(*Function)())
 
template<typename Method, typename Instance>
 NullaryDelegate (Method method, Instance &instance)
 
ReturnType operator() ()
 

Detailed Description

template<typename ReturnType>
class a_util::experimental::NullaryDelegate< ReturnType >

General delegate template: encapsulates a function or a method without a parameter

Template Parameters
ReturnTypeReturn type of the function to delegate

Constructor & Destructor Documentation

◆ NullaryDelegate() [1/2]

template<typename ReturnType>
a_util::experimental::NullaryDelegate< ReturnType >::NullaryDelegate ( ReturnType(* Function )())
inline

CTOR to delegate a function

Parameters
[in]FunctionPointer to the function to delegate

◆ NullaryDelegate() [2/2]

template<typename ReturnType>
template<typename Method, typename Instance>
a_util::experimental::NullaryDelegate< ReturnType >::NullaryDelegate ( Method method,
Instance & instance )
inline

CTOR to delegate a class method

Template Parameters
MethodPointer to the method
InstanceClass the method shall be invoked from
Parameters
[in]methodPointer to the method to delegate
[in]instanceReference to the class instance the method is member of

Member Function Documentation

◆ operator()()

template<typename ReturnType>
ReturnType a_util::experimental::NullaryDelegate< ReturnType >::operator() ( )
inline

Invocation operator - invokes the delegated method or function

Returns
Return value of the invoked function or method

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