Gromacs
2021-beta2-UNCHECKED
|
#include <gromacs/utility/mdmodulenotification-impl.h>
Inherits MdModuleNotificationBase.
Subscribe and trigger notification functions.
Extends MdModuleNotificationBase with new notification function and routine to subscribe new listeners.
To create a class of this type that provides callbacks, e.g., for events EventA, and EventB use registerMdModuleNotification<EventA, EventB>::type.
CallParameter | of the function to be notified |
MdModuleNotificationBase | class to be extended with a notification with CallParameter |
Public Member Functions | |
void | notify (CallParameter callParameter) const |
Trigger the subscribed notifications. More... | |
void | subscribe (std::function< void(CallParameter)> callBackFunction) |
Add callback function to be called when notification is triggered. More... | |
|
inline |
Trigger the subscribed notifications.
[in] | callParameter | of the function to be called back |
|
inline |
Add callback function to be called when notification is triggered.
Notifications are distinguished by their call signature.
[in] | callBackFunction | to be called from this class |