CatapultServer  v0.5.0.1 (Elephant)
ProcessingUndoNotificationSubscriber.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace chain {
26 
29  public:
32 
33  public:
35  void undo();
36 
37  public:
38  void notify(const model::Notification& notification) override;
39 
40  private:
41  void observe(const model::Notification& notification);
42 
43  private:
46 
47  std::vector<std::vector<uint8_t>> m_notificationBuffers;
48  };
49 }}
m_observer
const NotificationObserver & m_observer
Definition: NotificationObserverAdapter.cpp:44
catapult::observers::ObserverContext::Cache
cache::CatapultCacheDelta & Cache
Catapult cache.
Definition: ObserverContext.h:86
catapult::observers::ObserverContext
Context passed to all the observers.
Definition: ObserverContext.h:78
catapult::model::NotificationSubscriber
A notification subscriber.
Definition: NotificationSubscriber.h:27
catapult::model::NotificationChannel::Observer
Publish notification on observer channel.
catapult::model::IsSet
constexpr bool IsSet(NotificationType type, NotificationChannel channel)
Checks if type has channel set.
Definition: NotificationType.h:61
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.
NotificationSubscriber.h
ObserverTypes.h
catapult::chain::ProcessingUndoNotificationSubscriber::m_observer
const observers::NotificationObserver & m_observer
Definition: ProcessingUndoNotificationSubscriber.h:44
catapult::chain::ProcessingUndoNotificationSubscriber
A notification subscriber that captures notifications and allows them to be undone.
Definition: ProcessingUndoNotificationSubscriber.h:28
catapult::model::Notification::Type
NotificationType Type
Notification type.
Definition: Notifications.h:46
catapult::observers::ObserverContext::Resolvers
const model::ResolverContext Resolvers
Alias resolvers.
Definition: ObserverContext.h:98
catapult::chain::ProcessingUndoNotificationSubscriber::m_notificationBuffers
std::vector< std::vector< uint8_t > > m_notificationBuffers
Definition: ProcessingUndoNotificationSubscriber.h:47
catapult::chain::ProcessingUndoNotificationSubscriber::notify
void notify(const model::Notification &notification) override
Notifies the subscriber of notification.
Definition: ProcessingUndoNotificationSubscriber.cpp:49
catapult::chain::ProcessingUndoNotificationSubscriber::ProcessingUndoNotificationSubscriber
ProcessingUndoNotificationSubscriber(const observers::NotificationObserver &observer, observers::ObserverContext &observerContext)
Creates a subscriber around observer and observerContext.
Definition: ProcessingUndoNotificationSubscriber.cpp:25
catapult::chain::ProcessingUndoNotificationSubscriber::m_observerContext
observers::ObserverContext & m_observerContext
Definition: ProcessingUndoNotificationSubscriber.h:45
catapult::observers::NotificationObserverT
A strongly typed notification observer.
Definition: NotificationObserver.h:29
catapult::chain::ProcessingUndoNotificationSubscriber::observe
void observe(const model::Notification &notification)
Definition: ProcessingUndoNotificationSubscriber.cpp:56
catapult::observers::ObserverContext::Mode
const NotifyMode Mode
Notification mode.
Definition: ObserverContext.h:95
catapult::model::Notification
A basic notification.
Definition: Notifications.h:36
CATAPULT_THROW_INVALID_ARGUMENT
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::Notification::Size
size_t Size
Notification size.
Definition: Notifications.h:49
catapult::observers::ObserverContext::Height
const catapult::Height Height
Current height.
Definition: ObserverContext.h:92
catapult::observers::ObserverContext::State
state::CatapultState & State
Catapult state.
Definition: ObserverContext.h:89
catapult::chain::ProcessingUndoNotificationSubscriber::undo
void undo()
Undoes all executions.
Definition: ProcessingUndoNotificationSubscriber.cpp:32
ProcessingUndoNotificationSubscriber.h