SPH
|
Wrapper of callable objects. More...
#include <Function.h>
Public Member Functions | |
Function ()=default | |
template<typename TFunctor , typename = std::enable_if_t<IsCallable<TFunctor, TArgs...>::value>> | |
Function (TFunctor functor) | |
Creates a function given a callable object. More... | |
Function (const Function &other) | |
Function (Function &&other) | |
Function (std::nullptr_t) | |
template<typename TFunctor > | |
Function & | operator= (TFunctor functor) |
Function & | operator= (const Function &other) |
Function & | operator= (Function &&other) |
Function & | operator= (std::nullptr_t) |
template<typename... Ts> | |
TReturn | operator() (Ts &&... args) const |
Calls the function, given argument list. More... | |
template<typename... Ts> | |
void | callIfNotNull (Ts &&... args) const |
Calls the function is set, otherwise it does nothing. More... | |
INLINE | operator bool () const |
Wrapper of callable objects.
Function is copyable, having a pointer semantics. Copied object reference the same callable.
Definition at line 31 of file Function.h.
|
inline |
Creates a function given a callable object.
The functor is passed by value on purpose, we do not want to store references in the function. It also helps avoiding calling this constructor instead of copy/move constructors.
Definition at line 57 of file Function.h.
|
inline |
Definition at line 60 of file Function.h.
|
inline |
Definition at line 63 of file Function.h.
|
inline |
Definition at line 66 of file Function.h.
|
inline |
Calls the function is set, otherwise it does nothing.
Definition at line 99 of file Function.h.
|
inlineexplicit |
Definition at line 105 of file Function.h.
|
inline |
Calls the function, given argument list.
Definition at line 92 of file Function.h.
|
inline |
Definition at line 75 of file Function.h.
|
inline |
Definition at line 80 of file Function.h.
|
inline |
Definition at line 85 of file Function.h.
|
inline |
Definition at line 70 of file Function.h.