# 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 Aliases

### DelegateHandle

using DelegateHandle = TDelegate *;

### DelegatePtr

using DelegatePtr = SharedPtr < TDelegate >;

### Delegates

using Delegates = std::vector < DelegatePtr >;

### Iterator

using Iterator = typename Delegates::iterator;

## Constructors

### PriorityStrategy

PriorityStrategy() = default;

### PriorityStrategy

PriorityStrategy(
const PriorityStrategy & s
) = default;

### PriorityStrategy

PriorityStrategy(
PriorityStrategy && s
) = default;

## Destructor

### ~PriorityStrategy

~PriorityStrategy() = default;

## Member Functions

### add

DelegateHandle 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
);

### remove

void remove(
DelegateHandle delegateHandle
);

## Variables

### _delegates

Delegates _delegates;