Class Poco::PriorityEvent
Author: Applied Informatics Software Engineering GmbH and Contributors
Date: 2009-11-24

# Poco

# template < class TArgs >

# class PriorityEvent

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

## Description

A PriorityEvent uses internally a DefaultStrategy which invokes delegates in a manner determined by the priority field in the PriorityDelegates (lower priorities first). PriorityEvents can only be used together with PriorityDelegates. PriorityDelegates are sorted according to the priority value, when two delegates have the same priority, they are invoked in an arbitrary manner. Note that one object can register several methods as long as they differ in their priority value:

    PriorityEvent<int> tmp;
    MyClass myObject;
    tmp += priorityDelegate(&myObject, &MyClass::myMethod1, 1);
    tmp += priorityDelegate(&myObject, &MyClass::myMethod2, 2);

## Inheritance

Direct Base Classes: AbstractEvent < TArgs, DefaultStrategy < TArgs, AbstractPriorityDelegate < TArgs >, p_less < AbstractPriorityDelegate < TArgs > > >, AbstractPriorityDelegate < TArgs > >

All Base Classes: AbstractEvent < TArgs, DefaultStrategy < TArgs, AbstractPriorityDelegate < TArgs >, p_less < AbstractPriorityDelegate < TArgs > > >, AbstractPriorityDelegate < TArgs > >

## Constructors

### PriorityEvent

PriorityEvent();

## Destructor

### ~PriorityEvent

~PriorityEvent();