Base module
AbstractDelegate
Abstract delegate interface.
#include <icy/delegate.h>
template<typename RT, typename... Args>
struct AbstractDelegateDefined in src/base/include/icy/delegate.h:29
The Delegate class contains a pointer to a function. This wrapper class is used instead of std::function since it is interchangable with fast delegates and also provides an equality operator for comparing the underlying function where supported.
Public Methods
| Return | Name | Description |
|---|---|---|
~AbstractDelegate virtual inline | ||
RT | operator() virtual const | Invokes the underlying callable with the supplied arguments. |
bool | operator== virtual const | Compares two delegates for equality (same target function and instance). |
~AbstractDelegate
virtual inline
virtual inline ~AbstractDelegate()Defined in src/base/include/icy/delegate.h:31
operator()
virtual const
virtual RT operator()(Args... args) constDefined in src/base/include/icy/delegate.h:36
Invokes the underlying callable with the supplied arguments.
Returns
Result of the wrapped function call.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
args | Args... | Arguments forwarded to the wrapped function. |
operator==
virtual const
virtual bool operator==(const AbstractDelegate< RT, Args... > & that) constDefined in src/base/include/icy/delegate.h:41
Compares two delegates for equality (same target function and instance).
Returns
True if both delegates refer to the same callable target.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
that | const AbstractDelegate< RT, Args... > & | Other delegate to compare against. |
