ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
|
#include <AtDataSubject.h>
Public Member Functions | |
virtual | ~AtSubject ()=default |
void | Attach (AtObserver *observer) |
Attach an observer to get notified when this subject changes. More... | |
void | Detach (AtObserver *observer) |
Detach an observer to stop getting notified when this subject changes. More... | |
void | Notify () |
Notify all attached subjects that something changed. More... | |
Protected Member Functions | |
AtSubject ()=default | |
This is the base class for any object that may contain data to send to Observer on an update.
Any Observer may regiter itself with these subjects, and they will be notified when the state of this object changes, then they can retrieve the updated information and act on it.
Definition at line 24 of file AtDataSubject.h.
|
protecteddefault |
|
virtualdefault |
void AtSubject::Attach | ( | AtObserver * | observer | ) |
Attach an observer to get notified when this subject changes.
Definition at line 12 of file AtDataSubject.cxx.
|
inline |
Detach an observer to stop getting notified when this subject changes.
Definition at line 37 of file AtDataSubject.h.
void AtSubject::Notify | ( | ) |
Notify all attached subjects that something changed.
Definition at line 7 of file AtDataSubject.cxx.