Poco

template < class TArgs, class TDelegate, class TCompare >

class FIFOStrategy

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

Inheritance

Direct Base Classes: NotificationStrategy < TArgs, TDelegate >

All Base Classes: NotificationStrategy < TArgs, TDelegate >

Member Summary

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

Types

ConstIndexIterator

typedef typename DelegateIndex::const_iterator ConstIndexIterator;

ConstIterator

typedef typename Delegates::const_iterator ConstIterator;

DelegateIndex

typedef std::map < TDelegate *, Iterator, TCompare > DelegateIndex;

Delegates

typedef std::list < TDelegate * > Delegates;

IndexIterator

typedef typename DelegateIndex::iterator IndexIterator;

Iterator

typedef typename Delegates::iterator Iterator;

Constructors

FIFOStrategy inline

FIFOStrategy();

FIFOStrategy inline

FIFOStrategy(
    const FIFOStrategy & s
);

Destructor

~FIFOStrategy inline

~FIFOStrategy();

Member Functions

add inline

void add(
    const TDelegate & delegate
);

clear inline

void clear();

empty inline

bool empty() const;

notify inline

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

operator = inline

FIFOStrategy & operator = (
    const FIFOStrategy & s
);

remove inline

void remove(
    const TDelegate & delegate
);

Variables

_observerIndex protected

DelegateIndex _observerIndex;

For faster lookup when add/remove is used.

_observers protected

Delegates _observers;

Stores the delegates in the order they were added.