# Poco

# template < class TArgs, class TDelegate >

# class NotificationStrategy

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

## Description

The interface that all notification strategies must implement.

## Member Summary

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

## Constructors

### NotificationStrategy

NotificationStrategy();

## Destructor

### ~NotificationStrategy

virtual ~NotificationStrategy();

## Member Functions

### add

virtual void add(
const TDelegate & pDelegate
) = 0;

Adds a delegate to the strategy, if the delegate is not yet present

### clear

virtual void clear() = 0;

Removes all delegates from the strategy.

### empty

virtual bool empty() const = 0;

Returns false if the strategy contains at least one delegate.

### notify

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

Sends a notification to all registered delegates,

### remove

virtual void remove(
const TDelegate & pDelegate
) = 0;

Removes a delegate from the strategy if found.