Ark Server API (ASE) - Wiki
|
#include <NotificationStrategy.h>
Public Types | |
using | DelegateHandle = TDelegate* |
Public Member Functions | |
NotificationStrategy () | |
virtual | ~NotificationStrategy () |
virtual void | notify (const void *sender, TArgs &arguments)=0 |
virtual DelegateHandle | add (const TDelegate &delegate)=0 |
Sends a notification to all registered delegates. | |
virtual void | remove (const TDelegate &delegate)=0 |
Adds a delegate to the strategy. | |
virtual void | remove (DelegateHandle delegateHandle)=0 |
virtual void | clear ()=0 |
virtual bool | empty () const =0 |
Removes all delegates from the strategy. | |
The interface that all notification strategies must implement.
Note: Event is based on policy-driven design, so every strategy implementation must provide all the methods from this interface (otherwise: compile errors) but does not need to inherit from NotificationStrategy.
Definition at line 28 of file NotificationStrategy.h.
using Poco::NotificationStrategy< TArgs, TDelegate >::DelegateHandle = TDelegate* |
Definition at line 36 of file NotificationStrategy.h.
|
inline |
Definition at line 38 of file NotificationStrategy.h.
|
inlinevirtual |
Definition at line 42 of file NotificationStrategy.h.
|
pure virtual |
Sends a notification to all registered delegates.
Implemented in Poco::DefaultStrategy< TArgs, TDelegate >.
|
pure virtual |
Removes a delegate from the strategy, if found. Does nothing if the delegate has not been added.
Implemented in Poco::DefaultStrategy< TArgs, TDelegate >, Poco::DefaultStrategy< bool, AbstractDelegate< bool > >, Poco::DefaultStrategy< const Poco::Util::AbstractConfiguration::KeyValue, AbstractDelegate< const Poco::Util::AbstractConfiguration::KeyValue > >, Poco::DefaultStrategy< const std::string, AbstractDelegate< const std::string > >, Poco::DefaultStrategy< Poco::Net::VerificationErrorArgs, AbstractDelegate< Poco::Net::VerificationErrorArgs > >, Poco::DefaultStrategy< Poco::Util::AbstractConfiguration::KeyValue, AbstractDelegate< Poco::Util::AbstractConfiguration::KeyValue > >, Poco::DefaultStrategy< std::string, AbstractDelegate< std::string > >, and Poco::DefaultStrategy< TArgs, AbstractDelegate< TArgs > >.
|
pure virtual |
Removes all delegates from the strategy.
Implemented in Poco::DefaultStrategy< TArgs, TDelegate >, Poco::DefaultStrategy< bool, AbstractDelegate< bool > >, Poco::DefaultStrategy< const Poco::Util::AbstractConfiguration::KeyValue, AbstractDelegate< const Poco::Util::AbstractConfiguration::KeyValue > >, Poco::DefaultStrategy< const std::string, AbstractDelegate< const std::string > >, Poco::DefaultStrategy< Poco::Net::VerificationErrorArgs, AbstractDelegate< Poco::Net::VerificationErrorArgs > >, Poco::DefaultStrategy< Poco::Util::AbstractConfiguration::KeyValue, AbstractDelegate< Poco::Util::AbstractConfiguration::KeyValue > >, Poco::DefaultStrategy< std::string, AbstractDelegate< std::string > >, and Poco::DefaultStrategy< TArgs, AbstractDelegate< TArgs > >.
|
pure virtual |
|
pure virtual |
Adds a delegate to the strategy.
Implemented in Poco::DefaultStrategy< TArgs, TDelegate >.
|
pure virtual |
Removes a delegate from the strategy, if found. Does nothing if the delegate has not been added.
Implemented in Poco::DefaultStrategy< TArgs, TDelegate >.