Mantid
|
Simple observer class (for void functions/slots). More...
#include <ObserverPattern.h>
Public Member Functions | |
void | setSlot (const std::function< void()> &func) |
Sets the function/slot for the oberver. More... | |
void | update () override |
Calls the function/slot. More... | |
VoidObserver () | |
~VoidObserver () | |
Public Member Functions inherited from Observer | |
virtual void | update ()=0 |
virtual | ~Observer () |
Private Attributes | |
std::function< void()> | m_slot |
Simple observer class (for void functions/slots).
This is used to update when a change has been made on an observerable.
Definition at line 56 of file ObserverPattern.h.
|
inline |
Definition at line 58 of file ObserverPattern.h.
|
inline |
Definition at line 59 of file ObserverPattern.h.
|
inline |
Sets the function/slot for the oberver.
func,: | the void function we want to call when the observer sends a notify signal |
Definition at line 65 of file ObserverPattern.h.
References m_slot.
|
inlineoverridevirtual |
Calls the function/slot.
Implements Observer.
Definition at line 69 of file ObserverPattern.h.
References m_slot.
|
private |
Definition at line 72 of file ObserverPattern.h.