Base module
ClassDelegate
The
ClassDelegate contains a pointer to a class member.#include <icy/delegate.h>
template<class Class, typename RT, typename... Args>
struct ClassDelegateDefined in src/base/include/icy/delegate.h:79
- Inherits
AbstractDelegate< RT, Args... >
The ClassDelegate contains a pointer to a class member.
This class implements fast delegates and function comparison.
List of all members
| Name | Kind | Owner |
|---|---|---|
instance | variable | Declared here |
method | variable | Declared here |
ClassDelegate | function | Declared here |
operator() | function | Declared here |
operator== | function | Declared here |
~AbstractDelegate | function | Inherited from AbstractDelegate |
operator() | function | Inherited from AbstractDelegate |
operator== | function | Inherited from AbstractDelegate |
Inherited from AbstractDelegate
| Kind | Name | Description |
|---|---|---|
function | ~AbstractDelegate virtual inline | |
function | operator() virtual const | Invokes the underlying callable with the supplied arguments. |
function | operator== virtual const | Compares two delegates for equality (same target function and instance). |
Public Attributes
instance
Class * instanceDefined in src/base/include/icy/delegate.h:81
method
RT(Class::* method)(Args...)Defined in src/base/include/icy/delegate.h:82
Public Methods
| Return | Name | Description |
|---|---|---|
ClassDelegate inline | ||
RT | operator() virtual const inline override | Calls the member function on instance. |
bool | operator== virtual const inline override |
ClassDelegate
inline
inline ClassDelegate(Class * instance, RT(Class::*)(Args...) method)Defined in src/base/include/icy/delegate.h:86
Parameters
| Parameter | Type | Description |
|---|---|---|
instance | Class * | Object on which to invoke the member function. |
method | RT(Class::*)(Args...) | Pointer to the member function to wrap. |
operator()
virtual const inline override
virtual inline RT operator()(Args... args) const overrideDefined in src/base/include/icy/delegate.h:95
Calls the member function on instance.
Returns
Method result.
Reimplements
Parameters
| Parameter | Type | Description |
|---|---|---|
args | Args... | Arguments forwarded to the method. |
operator==
virtual const inline override
virtual inline bool operator==(const AbstractDelegate< RT, Args... > & that) const overrideDefined in src/base/include/icy/delegate.h:102
Returns
True if both delegates wrap the same instance/method pair.
Reimplements
Parameters
| Parameter | Type | Description |
|---|---|---|
that | const AbstractDelegate< RT, Args... > & | Other delegate to compare. |
