CatapultServer  v0.5.0.1 (Elephant)
ObserverTypes.h File Reference
Include dependency graph for ObserverTypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 catapult
 
 catapult::observers
 

Macros

#define DECLARE_OBSERVER(NAME, NOTIFICATION_TYPE)   observers::NotificationObserverPointerT<NOTIFICATION_TYPE> Create##NAME##Observer
 Declares an observer with NAME for notifications of type NOTIFICATION_TYPE. More...
 
#define MAKE_OBSERVER(NAME, NOTIFICATION_TYPE, HANDLER)   std::make_unique<observers::FunctionalNotificationObserverT<NOTIFICATION_TYPE>>(#NAME "Observer", HANDLER);
 Makes a functional observer with NAME for notifications of type NOTIFICATION_TYPE around HANDLER. More...
 
#define DEFINE_OBSERVER(NAME, NOTIFICATION_TYPE, HANDLER)
 Defines a functional observer with NAME for notifications of type NOTIFICATION_TYPE around HANDLER. More...
 

Typedefs

using catapult::observers::NotificationObserver = NotificationObserverT< model::Notification >
 A notification observer for processing a generic Notification. More...
 
template<typename TNotification >
using catapult::observers::NotificationObserverPointerT = std::unique_ptr< const NotificationObserverT< TNotification > >
 A notification observer (unique) pointer. More...
 
using catapult::observers::AggregateNotificationObserver = AggregateNotificationObserverT< model::Notification >
 An aggregate notification observer for processing a generic Notification. More...
 
template<typename TNotification >
using catapult::observers::AggregateNotificationObserverPointerT = std::unique_ptr< const AggregateNotificationObserverT< TNotification > >
 An aggregate notification observer (unique) pointer. More...
 

Macro Definition Documentation

◆ DECLARE_OBSERVER

#define DECLARE_OBSERVER (   NAME,
  NOTIFICATION_TYPE 
)    observers::NotificationObserverPointerT<NOTIFICATION_TYPE> Create##NAME##Observer

Declares an observer with NAME for notifications of type NOTIFICATION_TYPE.

◆ DEFINE_OBSERVER

#define DEFINE_OBSERVER (   NAME,
  NOTIFICATION_TYPE,
  HANDLER 
)
Value:
DECLARE_OBSERVER(NAME, NOTIFICATION_TYPE)() { \
return MAKE_OBSERVER(NAME, NOTIFICATION_TYPE, HANDLER); \
}

Defines a functional observer with NAME for notifications of type NOTIFICATION_TYPE around HANDLER.

◆ MAKE_OBSERVER

#define MAKE_OBSERVER (   NAME,
  NOTIFICATION_TYPE,
  HANDLER 
)    std::make_unique<observers::FunctionalNotificationObserverT<NOTIFICATION_TYPE>>(#NAME "Observer", HANDLER);

Makes a functional observer with NAME for notifications of type NOTIFICATION_TYPE around HANDLER.

MAKE_OBSERVER
#define MAKE_OBSERVER(NAME, NOTIFICATION_TYPE, HANDLER)
Makes a functional observer with NAME for notifications of type NOTIFICATION_TYPE around HANDLER.
Definition: ObserverTypes.h:47
DECLARE_OBSERVER
#define DECLARE_OBSERVER(NAME, NOTIFICATION_TYPE)
Declares an observer with NAME for notifications of type NOTIFICATION_TYPE.
Definition: ObserverTypes.h:44