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 inline

NotificationStrategy();

Destructor

~NotificationStrategy virtual inline

virtual ~NotificationStrategy();

Member Functions

add virtual

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

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

clear virtual

virtual void clear() = 0;

Removes all delegates from the strategy.

empty virtual

virtual bool empty() const = 0;

Returns false if the strategy contains at least one delegate.

notify virtual

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

Sends a notification to all registered delegates,

remove virtual

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

Removes a delegate from the strategy if found.