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< void, TDelegate > | |
using | DelegateHandle = TDelegate* |
Public Member Functions | |
DefaultStrategy () | |
DefaultStrategy (const DefaultStrategy &s) | |
~DefaultStrategy () | |
void | notify (const void *sender) |
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< void, 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 127 of file DefaultStrategy.h.
using Poco::DefaultStrategy< void, TDelegate >::DelegateHandle = TDelegate* |
Definition at line 135 of file DefaultStrategy.h.
using Poco::DefaultStrategy< void, TDelegate >::DelegatePtr = SharedPtr<TDelegate> |
Definition at line 136 of file DefaultStrategy.h.
using Poco::DefaultStrategy< void, TDelegate >::Delegates = std::vector<DelegatePtr> |
Definition at line 137 of file DefaultStrategy.h.
using Poco::DefaultStrategy< void, TDelegate >::Iterator = typename Delegates::iterator |
Definition at line 138 of file DefaultStrategy.h.
|
inline |
Definition at line 141 of file DefaultStrategy.h.
|
inline |
Definition at line 145 of file DefaultStrategy.h.
|
inline |
Definition at line 150 of file DefaultStrategy.h.
|
inlinevirtual |
Sends a notification to all registered delegates.
Implements Poco::NotificationStrategy< void, TDelegate >.
Definition at line 162 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< void, TDelegate >.
Definition at line 204 of file DefaultStrategy.h.
|
inlinevirtual |
Removes all delegates from the strategy.
Implements Poco::NotificationStrategy< void, TDelegate >.
Definition at line 213 of file DefaultStrategy.h.
|
inlinevirtual |
Implements Poco::NotificationStrategy< void, TDelegate >.
Definition at line 154 of file DefaultStrategy.h.
|
inline |
Definition at line 195 of file DefaultStrategy.h.
|
inlinevirtual |
Adds a delegate to the strategy.
Implements Poco::NotificationStrategy< void, TDelegate >.
Definition at line 169 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< void, TDelegate >.
Definition at line 182 of file DefaultStrategy.h.
|
protected |
Definition at line 219 of file DefaultStrategy.h.