Base module

ClassDelegate

The [ClassDelegate]({#ref structicy_1_1ClassDelegate #}) contains a pointer to a class member.

ClassDelegate

#include <icy/delegate.h>

Inherits: AbstractDelegate< RT, Args... >

The [ClassDelegate](#classdelegate) contains a pointer to a class member.

This class implements fast delegates and function comparison.

Public Attributes

ReturnNameDescription
Class *instance
RT(Class::*method

instance

Class * instance

method

RT(Class::* method

Public Methods

ReturnNameDescription
ClassDelegate inline#### Parameters
RToperator() virtual const inlineCalls the member function on instance.
booloperator== virtual const inline#### Parameters

ClassDelegate

inline

inline ClassDelegate(Class * instance, RT(Class::*)(Args...) method)

Parameters

  • instance Object on which to invoke the member function.

  • method Pointer to the member function to wrap.


operator()

virtual const inline

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

Calls the member function on instance.

Parameters

  • args Arguments forwarded to the method.

Returns

Method result.


operator==

virtual const inline

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

Parameters

  • that Other delegate to compare.

Returns

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