# Poco

# template < class TArgs, class TDelegate >

# class PriorityStrategy

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

## Description

NotificationStrategy for PriorityEvent.

Delegates are kept in a std::vector<>, ordered by their priority.

## Inheritance

Direct Base Classes: NotificationStrategy < TArgs, TDelegate >

All Base Classes: NotificationStrategy < TArgs, TDelegate >

## Member Summary

Member Functions: add, clear, empty, notify, operator =, remove

## Types

### DelegatePtr

typedef SharedPtr < TDelegate > DelegatePtr;

### Delegates

typedef std::vector < DelegatePtr > Delegates;

### Iterator

typedef typename Delegates::iterator Iterator;

## Constructors

### PriorityStrategy

PriorityStrategy();

### PriorityStrategy

PriorityStrategy(
const PriorityStrategy & s
);

## Destructor

### ~PriorityStrategy

~PriorityStrategy();

## Member Functions

### add

void add(
const TDelegate & delegate
);

### clear

void clear();

### empty

bool empty() const;

### notify

void notify(
const void * sender,
TArgs & arguments
);

### operator =

PriorityStrategy & operator = (
const PriorityStrategy & s
);

### remove

void remove(
const TDelegate & delegate
);

## Variables

### _delegates

Delegates _delegates;