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

# Poco

# template < class TArgs, class TDelegate, class TCompare >

# class DefaultStrategy

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

## Description

Default notification strategy. Allows one observer to register exactly once. The observer must provide an < (less-than) operator.

## Inheritance

Direct Base Classes: NotificationStrategy < TArgs, TDelegate >

All Base Classes: NotificationStrategy < TArgs, TDelegate >

## Member Summary

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

## Types

### ConstIterator

typedef typename Delegates::const_iterator ConstIterator;

### Delegates

typedef std::set < TDelegate *, TCompare > Delegates;

### Iterator

typedef typename Delegates::iterator Iterator;

## Constructors

### DefaultStrategy

DefaultStrategy();

### DefaultStrategy

DefaultStrategy(
const DefaultStrategy & s
);

## Destructor

### ~DefaultStrategy

~DefaultStrategy();

## Member Functions

### add

void add(
const TDelegate & delegate
);

### clear

void clear();

### empty

bool empty() const;

### notify

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

### operator =

DefaultStrategy & operator = (
const DefaultStrategy & s
);

### remove

void remove(
const TDelegate & delegate
);

## Variables

### _observers

Delegates _observers;