Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::NotificationStrategy< TArgs, TDelegate > Class Template Referenceabstract

#include <NotificationStrategy.h>

+ Inheritance diagram for Poco::NotificationStrategy< TArgs, TDelegate >:

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.
 

Detailed Description

template<class TArgs, class TDelegate>
class Poco::NotificationStrategy< TArgs, TDelegate >

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.

Member Typedef Documentation

◆ DelegateHandle

template<class TArgs , class TDelegate >
using Poco::NotificationStrategy< TArgs, TDelegate >::DelegateHandle = TDelegate*

Definition at line 36 of file NotificationStrategy.h.

Constructor & Destructor Documentation

◆ NotificationStrategy()

template<class TArgs , class TDelegate >
Poco::NotificationStrategy< TArgs, TDelegate >::NotificationStrategy ( )
inline

Definition at line 38 of file NotificationStrategy.h.

◆ ~NotificationStrategy()

template<class TArgs , class TDelegate >
virtual Poco::NotificationStrategy< TArgs, TDelegate >::~NotificationStrategy ( )
inlinevirtual

Definition at line 42 of file NotificationStrategy.h.

Member Function Documentation

◆ add()

template<class TArgs , class TDelegate >
virtual DelegateHandle Poco::NotificationStrategy< TArgs, TDelegate >::add ( const TDelegate & delegate)
pure virtual

Sends a notification to all registered delegates.

Implemented in Poco::DefaultStrategy< TArgs, TDelegate >.

◆ clear()

◆ empty()

◆ notify()

template<class TArgs , class TDelegate >
virtual void Poco::NotificationStrategy< TArgs, TDelegate >::notify ( const void * sender,
TArgs & arguments )
pure virtual

◆ remove() [1/2]

template<class TArgs , class TDelegate >
virtual void Poco::NotificationStrategy< TArgs, TDelegate >::remove ( const TDelegate & delegate)
pure virtual

Adds a delegate to the strategy.

Implemented in Poco::DefaultStrategy< TArgs, TDelegate >.

◆ remove() [2/2]

template<class TArgs , class TDelegate >
virtual void Poco::NotificationStrategy< TArgs, TDelegate >::remove ( DelegateHandle delegateHandle)
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 >.


The documentation for this class was generated from the following file: