Base module
ConstClassDelegate
The
ConstClassDelegate contains a pointer to a const class member.#include <icy/delegate.h>
template<class Class, typename RT, typename... Args>
struct ConstClassDelegateDefined in src/base/include/icy/delegate.h:116
- Inherits
AbstractDelegate< RT, Args... >
The ConstClassDelegate contains a pointer to a const 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 |
ConstClassDelegate | 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:118
method
RT(Class::* method)(Args...) constDefined in src/base/include/icy/delegate.h:119
Public Methods
| Return | Name | Description |
|---|---|---|
ConstClassDelegate inline | ||
RT | operator() virtual const inline override | Calls the const member function on instance. |
bool | operator== virtual const inline override |
ConstClassDelegate
inline
inline ConstClassDelegate(Class * instance, RT(Class::*)(Args...) const method)Defined in src/base/include/icy/delegate.h:123
Parameters
| Parameter | Type | Description |
|---|---|---|
instance | Class * | Object on which to invoke the const member function. |
method | RT(Class::*)(Args...) const | Pointer to the const member function to wrap. |
operator()
virtual const inline override
virtual inline RT operator()(Args... args) const overrideDefined in src/base/include/icy/delegate.h:132
Calls the const 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:139
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. |
