Home
Base module

ConstClassDelegate

The ConstClassDelegate contains a pointer to a const class member.

ConstClassDelegate

#include <icy/delegate.h>
template<class Class, typename RT, typename... Args>
struct ConstClassDelegate

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

Inherits: AbstractDelegate< RT, Args... >

The [ConstClassDelegate](#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

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

  • instance Object on which to invoke the const member function.

  • method Pointer 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.

Parameters

  • args Arguments forwarded to the method.

Returns

Method result.

Reimplements

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

Parameters

  • that Other delegate to compare.

Returns

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

Reimplements