# 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

AbstractDelegate(
void * pTarget
);

### AbstractDelegate

AbstractDelegate(
const AbstractDelegate & del
);

## Destructor

### ~AbstractDelegate

virtual ~AbstractDelegate();

## Member Functions

### clone

virtual AbstractDelegate * clone() const = 0;

Returns a deep-copy of the AbstractDelegate

### notify

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

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

### operator <

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

For comparing AbstractDelegates in a collection.

### target

void * target() const;

## Variables

### _pTarget

void * _pTarget;