Home
Base module

FunctionDelegate

The FunctionDelegate contains a std::function.

FunctionDelegate

#include <icy/delegate.h>
template<typename RT, typename... Args>
struct FunctionDelegate

Defined in src/base/include/icy/delegate.h:48

Inherits: AbstractDelegate< RT, Args... >

The [FunctionDelegate](#functiondelegate) contains a std::function.

List of all members

NameKindOwner
funcvariableDeclared here
FunctionDelegatefunctionDeclared here
operator()functionDeclared here
operator==functionDeclared here
~AbstractDelegatefunctionInherited from AbstractDelegate
operator()functionInherited from AbstractDelegate
operator==functionInherited from AbstractDelegate

Inherited from AbstractDelegate

KindNameDescription
function~AbstractDelegate virtual inline
functionoperator() virtual constInvokes the underlying callable with the supplied arguments.
functionoperator== virtual constCompares two delegates for equality (same target function and instance).

Public Attributes

ReturnNameDescription
std::function< RT(Args...)>func

func

std::function< RT(Args...)> func

Defined in src/base/include/icy/delegate.h:50

Public Methods

ReturnNameDescription
FunctionDelegate inline
RToperator() virtual const inline overrideCalls the wrapped std::function.
booloperator== virtual const inline overrideAlways returns false; std::function targets cannot be compared for equality.

FunctionDelegate

inline

inline FunctionDelegate(std::function< RT(Args...)> func)

Defined in src/base/include/icy/delegate.h:53

Parameters

  • func std::function to wrap.

operator()

virtual const inline override

virtual inline RT operator()(Args... args) const override

Defined in src/base/include/icy/delegate.h:61

Calls the wrapped std::function.

Parameters

  • args Arguments forwarded to the function.

Returns

Function result.

Reimplements

operator==

virtual const inline override

virtual inline bool operator==(const AbstractDelegate< RT, Args... > &) const override

Defined in src/base/include/icy/delegate.h:67

Always returns false; std::function targets cannot be compared for equality.

Reimplements