This class enables a listener pattern. More...
#include <Common.h>
Public Types | |
using | Callback = std::function< void(T *)> |
Public Member Functions | |
Callback * | registerDestructorCallback (Callback fn) |
Callback * | registerNotificationCallback (Callback fn) |
void | deleteCallback (std::list< Callback > &callbackList, Callback *toDelete) |
void | deleteDestructorCallback (Callback *c) |
void | deleteNotificationCallback (Callback *c) |
void | notify () |
Notifies all listeners (registerNotificationCallback users) of an update. More... | |
This class enables a listener pattern.
It is to be used with a "curious recursive pattern" i.e. Derived : public Notifier<Derived> {}