MEL
Microthread & Execution library
mel::core::Callback< TRet, VARIABLE_ARGS > Class Template Reference

create Callback from callable More...

#include <Callback_Impl.h>

Public Member Functions

TRet operator() (VARIABLE_ARGS_IMPL)
 
template<class T >
 Callback (T &&functor, const use_functor_t &c)
 
template<class T >
 Callback (T &&functor, const use_function_t &c)
 
 Callback (const Callback< TRet, VARIABLE_ARGS_DECL > &ev2)
 
Callback< TRet, VARIABLE_ARGS_DECL > * clone () const
 

Detailed Description

template<class TRet, VARIABLE_ARGS>
class mel::core::Callback< TRet, VARIABLE_ARGS >

create Callback from callable

Remarks
this class dates back to the early 2000s, when no C++11 existed at all. This class is a kind of std::function. But can't be replaced because the operator == is used intensively, but is deleted in the standard for some deep reason that are not applicable here. This operator is neccesary in order to be able to compare two Callback instances, used as a base tool for unsubscribing in mel::core::CallbackSubscriptor

Constructor & Destructor Documentation

◆ Callback()

template<class TRet , VARIABLE_ARGS >
template<class T >
mel::core::Callback< TRet, VARIABLE_ARGS >::Callback ( T &&  functor,
const use_functor_t c 
)
inline

contructor from functor

Remarks
second parameter only is used to distinguish from copy constructor

Member Function Documentation

◆ operator()()

template<class TRet , VARIABLE_ARGS >
TRet mel::core::Callback< TRet, VARIABLE_ARGS >::operator() ( VARIABLE_ARGS_IMPL  )
inline

execute event. The number of agruments is variable and can't be propperly documented following doxygen standards


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