Poco

template < class TArgs >

class AbstractDelegate

Library: Foundation
Package: Events
Header: Poco/AbstractDelegate.h

Description

Interface for Delegate and Expire Very similar to AbstractPriorityDelegate but having two separate files (no inheritance) allows one to have compile-time checks when registering an observer instead of run-time checks.

Member Summary

Member Functions: clone, notify, operator <, target

Constructors

AbstractDelegate inline

AbstractDelegate(
    void * pTarget
);

AbstractDelegate inline

AbstractDelegate(
    const AbstractDelegate & del
);

Destructor

~AbstractDelegate virtual inline

virtual ~AbstractDelegate();

Member Functions

clone virtual

virtual AbstractDelegate * clone() const = 0;

Returns a deep-copy of the AbstractDelegate

notify virtual

virtual bool notify(
    const void * sender,
    TArgs & arguments
) = 0;

Returns false, if the Delegate is no longer valid, thus indicating an expire

operator < inline

bool operator < (
    const AbstractDelegate < TArgs > & other
) const;

For comparing AbstractDelegates in a collection.

target inline

void * target() const;

Variables

_pTarget protected

void * _pTarget;