ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
Public Member Functions | Protected Member Functions | List of all members
DataHandling::AtSubject Class Reference

#include <AtDataSubject.h>

Inheritance diagram for DataHandling::AtSubject:
Inheritance graph
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AtSubject()

DataHandling::AtSubject::AtSubject ( )
protecteddefault

◆ ~AtSubject()

virtual DataHandling::AtSubject::~AtSubject ( )
virtualdefault

Member Function Documentation

◆ Attach()

void AtSubject::Attach ( AtObserver observer)

Attach an observer to get notified when this subject changes.

Definition at line 12 of file AtDataSubject.cxx.

◆ Detach()

void DataHandling::AtSubject::Detach ( AtObserver observer)
inline

Detach an observer to stop getting notified when this subject changes.

Definition at line 37 of file AtDataSubject.h.

◆ Notify()

void AtSubject::Notify ( )

Notify all attached subjects that something changed.

Definition at line 7 of file AtDataSubject.cxx.


The documentation for this class was generated from the following files: