| 
    PLCnext API Documentation
    20.6.0.30321
    
   | 
 
Proxy class for an subscriber of notifications More...
#include <NotificationSubscriber.hpp>

Public Member Functions | |
| NotificationSubscriber ()=default | |
| Creates an empty subscriber More... | |
| NotificationSubscriber (const String ¬ificationName, INotificationReceiving ¬ificationReceiving) | |
| Create a proxy and subscribe to a Notification More... | |
| NotificationSubscriber (const String ¬ificationName) | |
| Create a proxy and subscribe to a Notification More... | |
| NotificationSubscriber (NotificationSubscriber &&other) | |
| NotificationSubscriber & | operator= (NotificationSubscriber &&other) | 
| NotificationSubscriber (const NotificationSubscriber &)=delete | |
| NotificationSubscriber & | operator= (const NotificationSubscriber &)=delete | 
| void | Dispose () noexcept | 
| Unsubscribe and release alll resources More... | |
| void | Notify (const Notification ¬ification) override | 
| Called by the NotificationManager when a Notification is dipatched More... | |
| const String | GetNotificationName () const | 
| Returns the NotificationName More... | |
| const NotificationNameIdType | GetNotificationNameId () const | 
| Returns the NotificationNameId More... | |
Public Attributes | |
| Arp::event< const Notification & > | OnNotification | 
| Event to be fired on a Notification More... | |
Proxy class for an subscriber of notifications
This class supports move semantics. It can be default constructed (e.g. in a component) and initialized by assigning an object with parameters.
When Notify is called while a move operation takes place there could be a race condition in the list of OnNotification (Arp::event). Therefore this object contains a mutex. Before any move operation the mutexes on this and the moved from object are locked.
      
  | 
  default | 
Creates an empty subscriber
This object is not subscribed to anything. Use move semantics to transfer subscriptions from another object.
| Arp::System::Nm::NotificationSubscriber::NotificationSubscriber | ( | const String & | notificationName, | 
| INotificationReceiving & | notificationReceiving | ||
| ) | 
Create a proxy and subscribe to a Notification
| notificationName | Name of the Notification to subscribe to | 
| notificationReceiving | Reference to the NotificationManager | 
      
  | 
  explicit | 
Create a proxy and subscribe to a Notification
| notificationName | Name of the Notification to subscribe to | 
Uses the NotificationManager singleton
      
  | 
  noexcept | 
Unsubscribe and release alll resources
| const String Arp::System::Nm::NotificationSubscriber::GetNotificationName | ( | ) | const | 
Returns the NotificationName
| const NotificationNameIdType Arp::System::Nm::NotificationSubscriber::GetNotificationNameId | ( | ) | const | 
Returns the NotificationNameId
      
  | 
  overridevirtual | 
Called by the NotificationManager when a Notification is dipatched
Override this funtion to implemet custom behavior.
Implements Arp::System::Nm::INotificationSubscriber.
| Arp::event<const Notification&> Arp::System::Nm::NotificationSubscriber::OnNotification | 
Event to be fired on a Notification
Use += and make_delegate to register a callback.
 1.8.13