Base module
ClassDelegate
The
ClassDelegate contains a pointer to a class member.ClassDelegate
#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](#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::* methodDefined 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
instanceObject on which to invoke the member function.methodPointer 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.
Parameters
argsArguments forwarded to the method.
Returns
Method result.
Reimplements
operator==
virtual const inline override
virtual inline bool operator==(const AbstractDelegate< RT, Args... > & that) const overrideDefined in src/base/include/icy/delegate.h:102
Parameters
thatOther delegate to compare.
Returns
True if both delegates wrap the same instance/method pair.
