# Poco

# template < class TArgs >

# class AbstractPriorityDelegate

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

## Description

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

## Member Summary

Member Functions: clone, notify, operator <, priority, target

## Constructors

### AbstractPriorityDelegate

AbstractPriorityDelegate(
const AbstractPriorityDelegate & del
);

### AbstractPriorityDelegate

AbstractPriorityDelegate(
void * pTarget,
int prio
);

## Destructor

### ~AbstractPriorityDelegate

virtual ~AbstractPriorityDelegate();

## Member Functions

### clone

virtual AbstractPriorityDelegate * clone() const = 0;

### 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 AbstractPriorityDelegate < TArgs > & other
) const;

Operator used for comparing AbstractPriorityDelegates in a collection.

### priority

int priority() const;

### target

void * target() const;

## Variables

### _pTarget

void * _pTarget;

### _priority

int _priority;