Ark Server API (ASE) - Wiki
|
#include <DefaultStrategy.h>
Public Types | |
using | DelegateHandle = TDelegate* |
using | DelegatePtr = SharedPtr<TDelegate> |
using | Delegates = std::vector<DelegatePtr> |
using | Iterator = typename Delegates::iterator |
Public Types inherited from Poco::NotificationStrategy< TArgs, TDelegate > | |
using | DelegateHandle = TDelegate* |
Public Member Functions | |
DefaultStrategy () | |
DefaultStrategy (const DefaultStrategy &s) | |
~DefaultStrategy () | |
void | notify (const void *sender, TArgs &arguments) |
DelegateHandle | add (const TDelegate &delegate) |
Sends a notification to all registered delegates. | |
void | remove (const TDelegate &delegate) |
Adds a delegate to the strategy. | |
void | remove (DelegateHandle delegateHandle) |
DefaultStrategy & | operator= (const DefaultStrategy &s) |
void | clear () |
bool | empty () const |
Removes all delegates from the strategy. | |
Public Member Functions inherited from Poco::NotificationStrategy< TArgs, TDelegate > | |
NotificationStrategy () | |
virtual | ~NotificationStrategy () |
Protected Attributes | |
Delegates | _delegates |
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.
Definition at line 30 of file DefaultStrategy.h.
using Poco::DefaultStrategy< TArgs, TDelegate >::DelegateHandle = TDelegate* |
Definition at line 38 of file DefaultStrategy.h.
using Poco::DefaultStrategy< TArgs, TDelegate >::DelegatePtr = SharedPtr<TDelegate> |
Definition at line 39 of file DefaultStrategy.h.
using Poco::DefaultStrategy< TArgs, TDelegate >::Delegates = std::vector<DelegatePtr> |
Definition at line 40 of file DefaultStrategy.h.
using Poco::DefaultStrategy< TArgs, TDelegate >::Iterator = typename Delegates::iterator |
Definition at line 41 of file DefaultStrategy.h.
|
inline |
Definition at line 44 of file DefaultStrategy.h.
|
inline |
Definition at line 48 of file DefaultStrategy.h.
|
inline |
Definition at line 53 of file DefaultStrategy.h.
|
inlinevirtual |
Sends a notification to all registered delegates.
Implements Poco::NotificationStrategy< TArgs, TDelegate >.
Definition at line 65 of file DefaultStrategy.h.
|
inlinevirtual |
Removes a delegate from the strategy, if found. Does nothing if the delegate has not been added.
Implements Poco::NotificationStrategy< TArgs, TDelegate >.
Definition at line 107 of file DefaultStrategy.h.
|
inlinevirtual |
Removes all delegates from the strategy.
Implements Poco::NotificationStrategy< TArgs, TDelegate >.
Definition at line 116 of file DefaultStrategy.h.
|
inlinevirtual |
Implements Poco::NotificationStrategy< TArgs, TDelegate >.
Definition at line 57 of file DefaultStrategy.h.
|
inline |
Definition at line 98 of file DefaultStrategy.h.
|
inlinevirtual |
Adds a delegate to the strategy.
Implements Poco::NotificationStrategy< TArgs, TDelegate >.
Definition at line 72 of file DefaultStrategy.h.
|
inlinevirtual |
Removes a delegate from the strategy, if found. Does nothing if the delegate has not been added.
Implements Poco::NotificationStrategy< TArgs, TDelegate >.
Definition at line 85 of file DefaultStrategy.h.
|
protected |
Definition at line 122 of file DefaultStrategy.h.