# Poco

# template < class TArgs, class TDelegate >

# class DefaultStrategy

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

## Description

Default notification strategy.

Internally, a std::vector<> is used to store delegate objects. Delegates are invoked in the order in which they have been registered.

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

### DefaultStrategy

DefaultStrategy() = default;

### DefaultStrategy

DefaultStrategy(
const DefaultStrategy & s
);

## Destructor

### ~DefaultStrategy

~DefaultStrategy() = 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 =

DefaultStrategy & operator = (
const DefaultStrategy & s
);

### remove

void remove(
const TDelegate & delegate
);

### remove

void remove(
DelegateHandle delegateHandle
);

## Variables

### _delegates

Delegates _delegates;