APM:Libraries
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Functor< RetType, Args > Class Template Reference

#include <functor.h>

Public Member Functions

constexpr Functor (void *obj, RetType(*method)(void *obj, Args...))
 
constexpr Functor (decltype(nullptr))
 
constexpr Functor ()
 
RetType operator() (Args... args) const
 
bool operator== (const Functor< RetType, Args... > &rhs)
 
 operator bool () const
 

Static Public Member Functions

template<class T , RetType(T::*)(Args...) method>
static constexpr Functor bind (T *obj)
 

Static Private Member Functions

template<class T , RetType(T::*)(Args...) method>
static RetType method_wrapper (void *obj, Args... args)
 

Private Attributes

void * _obj
 
RetType(* _method )(void *obj, Args...)
 

Detailed Description

template<class RetType, class... Args>
class Functor< RetType, Args >

Definition at line 35 of file functor.h.

Constructor & Destructor Documentation

◆ Functor() [1/3]

template<class RetType, class... Args>
constexpr Functor< RetType, Args >::Functor ( void *  obj,
RetType(*)(void *obj, Args...)  method 
)
inline

Definition at line 38 of file functor.h.

◆ Functor() [2/3]

template<class RetType, class... Args>
constexpr Functor< RetType, Args >::Functor ( decltype(nullptr)  )
inline

Definition at line 45 of file functor.h.

◆ Functor() [3/3]

template<class RetType, class... Args>
constexpr Functor< RetType, Args >::Functor ( )
inline

Definition at line 48 of file functor.h.

Member Function Documentation

◆ bind()

template<class RetType, class... Args>
template<class T , RetType(T::*)(Args...) method>
static constexpr Functor Functor< RetType, Args >::bind ( T *  obj)
inlinestatic

Definition at line 71 of file functor.h.

◆ method_wrapper()

template<class RetType, class... Args>
template<class T , RetType(T::*)(Args...) method>
static RetType Functor< RetType, Args >::method_wrapper ( void *  obj,
Args...  args 
)
inlinestaticprivate

Definition at line 81 of file functor.h.

◆ operator bool()

template<class RetType, class... Args>
Functor< RetType, Args >::operator bool ( ) const
inlineexplicit

Definition at line 65 of file functor.h.

◆ operator()()

template<class RetType, class... Args>
RetType Functor< RetType, Args >::operator() ( Args...  args) const
inline

Definition at line 52 of file functor.h.

◆ operator==()

template<class RetType, class... Args>
bool Functor< RetType, Args >::operator== ( const Functor< RetType, Args... > &  rhs)
inline

Definition at line 59 of file functor.h.

Member Data Documentation

◆ _method

template<class RetType, class... Args>
RetType(* Functor< RetType, Args >::_method) (void *obj, Args...)
private

◆ _obj

template<class RetType, class... Args>
void* Functor< RetType, Args >::_obj
private

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