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 ConstClassDelegate

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

The ConstClassDelegate contains a pointer to a const class member.

This class implements fast delegates and function comparison.

List of all members

NameKindOwner
instancevariableDeclared here
methodvariableDeclared here
ConstClassDelegatefunctionDeclared 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
Class *instance
RT(Class::*method

instance

Class * instance

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


method

RT(Class::* method)(Args...) const

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

Public Methods

ReturnNameDescription
ConstClassDelegate inline
RToperator() virtual const inline overrideCalls the const member function on instance.
booloperator== 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

ParameterTypeDescription
instanceClass *Object on which to invoke the const member function.
methodRT(Class::*)(Args...) constPointer to the const member function to wrap.

operator()

virtual const inline override

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

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

Calls the const member function on instance.

Returns

Method result.

Reimplements

Parameters

ParameterTypeDescription
argsArgs...Arguments forwarded to the method.

operator==

virtual const inline override

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

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

Returns

True if both delegates wrap the same instance/method pair.

Reimplements

Parameters

ParameterTypeDescription
thatconst AbstractDelegate< RT, Args... > &Other delegate to compare.