#include <icy/delegate.h>Inherits:
AbstractDelegate< RT, IT & >
Polymorphic function delegate.
Theis class contains a pointer to a class member that receices a derived subclass (PT) of the base type specified by the IT param.
Class * instanceRT(Class::* method| Return | Name | Description |
|---|---|---|
PolymorphicDelegate inline | #### Parameters | |
RT | operator() virtual const inline | Attempts to cast object to PT; invokes the method if successful. Returns a default-constructed RT if the cast fails (packet type mismatch). |
bool | operator== virtual const inline | #### Parameters |
inline
inline PolymorphicDelegate(Class * instance, RT(Class::*)(PT &) method)instance Object on which to invoke the member function.
method Pointer to the member function accepting a derived PT&.
virtual const inline
virtual inline RT operator()(IT & object) constAttempts to cast object to PT; invokes the method if successful. Returns a default-constructed RT if the cast fails (packet type mismatch).
object Base-type reference; cast to PT before dispatch.Method result, or default RT on cast failure.
virtual const inline
virtual inline bool operator==(const AbstractDelegate< RT, IT & > & that) constthat Other delegate to compare.True if both delegates wrap the same instance/method pair.