CatapultServer
v0.5.0.1 (Elephant)
|
A notification observer implementation that wraps a function. More...
Public Member Functions | |
FunctionalNotificationObserverT (const std::string &name, const FunctionType &func) | |
Creates a functional notification observer around func with name. More... | |
const std::string & | name () const override |
Gets the observer name. More... | |
void | notify (const TNotification ¬ification, ObserverContext &context) const override |
Notifies the observer with a notification to process and an observer context. More... | |
Public Member Functions inherited from catapult::observers::NotificationObserverT< TNotification > | |
virtual | ~NotificationObserverT ()=default |
Private Types | |
using | FunctionType = consumer< const TNotification &, ObserverContext & > |
Private Attributes | |
std::string | m_name |
FunctionType | m_func |
Additional Inherited Members | |
Public Types inherited from catapult::observers::NotificationObserverT< TNotification > | |
using | NotificationType = TNotification |
Notification type. More... | |
A notification observer implementation that wraps a function.
|
private |
|
inlineexplicit |
Creates a functional notification observer around func with name.
|
inlineoverridevirtual |
Gets the observer name.
Implements catapult::observers::NotificationObserverT< TNotification >.
|
inlineoverridevirtual |
Notifies the observer with a notification to process and an observer context.
Implements catapult::observers::NotificationObserverT< TNotification >.
|
private |
|
private |