Poco

template < class TArgs, class TDelegate >

class DefaultStrategy

File Information

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 inline

DefaultStrategy();

DefaultStrategy inline

DefaultStrategy(
    const DefaultStrategy & s
);

Destructor

~DefaultStrategy inline

~DefaultStrategy();

Member Functions

add inline

DelegateHandle add(
    const TDelegate & delegate
);

clear inline

void clear();

empty inline

bool empty() const;

notify inline

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

operator = inline

DefaultStrategy & operator = (
    const DefaultStrategy & s
);

remove inline

void remove(
    const TDelegate & delegate
);

remove inline

void remove(
    DelegateHandle delegateHandle
);

Variables

_delegates protected

Delegates _delegates;