CatapultServer  v0.5.0.1 (Elephant)
NotificationObserver.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "ObserverContext.h"
24 
25 namespace catapult { namespace observers {
26 
28  template<typename TNotification>
30  public:
32  using NotificationType = TNotification;
33 
34  public:
35  virtual ~NotificationObserverT() = default;
36 
37  public:
39  virtual const std::string& name() const = 0;
40 
42  virtual void notify(const TNotification& notification, ObserverContext& context) const = 0;
43  };
44 }}
catapult::observers::ObserverContext
Context passed to all the observers.
Definition: ObserverContext.h:78
catapult::observers::NotificationObserverT::notify
virtual void notify(const TNotification &notification, ObserverContext &context) const =0
Notifies the observer with a notification to process and an observer context.
ObserverContext.h
Notifications.h
catapult::observers::NotificationObserverT
A strongly typed notification observer.
Definition: NotificationObserver.h:29
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::observers::NotificationObserverT::name
virtual const std::string & name() const =0
Gets the observer name.
catapult::observers::NotificationObserverT::NotificationType
TNotification NotificationType
Notification type.
Definition: NotificationObserver.h:32
catapult::observers::NotificationObserverT::~NotificationObserverT
virtual ~NotificationObserverT()=default