Implementation of the ObserverInterface. More...
#include <Observer.hpp>
Inherits ObserverInterface< Event >.
Public Member Functions | |
template<class N , REQUIRES(std::is_base_of_v< Notifier< Event >, N >) > | |
Observer (N const ¬ifier) | |
template<class N , REQUIRES(not std::is_base_of_v< Notifier< Event >, N >) > | |
Observer (N const ¬ifier) | |
virtual | ~Observer () |
Destructor, detaches from the notifier. | |
Observer (Observer const &other) | |
Copy constructor. Attaches this to the copied notifier. | |
Observer & | operator= (Observer const &other) |
Copy-assignment operator, copies the notifier and attaches this. | |
void | unset () final |
void | update (Event e) final |
virtual void | update (Event e)=0 |
virtual void | unset ()=0 |
Protected Member Functions | |
virtual void | updateImpl (Event e, Tags...)=0 |
Implementation of the update method in derived class. | |
Implementation of the ObserverInterface.
|
inlinefinalvirtual |
Set the Notifier* to nullptr. Used by the Notifier to avoid segfaults when destruction occurs out of order.
Implements ObserverInterface< Event >.
|
inlinefinalvirtual |
Implementation of the interface method ObserverInterface::update. Redirects to the updateImpl method with additional Tags parameters
Implements ObserverInterface< Event >.
References Observer< Event, Tags >::updateImpl().