Part of an implementation of the Observable Observer pattern based on the example implementation in the GOF Patterns text. More...
#include <Observer.h>
Public Member Functions | |
Observer () | |
The default constructor. | |
virtual void | update (const Observable *)=0 |
The update method. | |
virtual void | willDelete (const Observable *) |
Notifies this Observer object that one of its Observable objects is about to be deleted. | |
virtual | ~Observer () |
The destructor. |
Part of an implementation of the Observable Observer pattern based on the example implementation in the GOF Patterns text.
Definition at line 34 of file Observer.h.
Observer | ( | ) |
The default constructor.
Definition at line 13 of file Observer.cxx.
|
virtual |
The destructor.
Does nothing but keep compiler warning messages away.
Definition at line 18 of file Observer.cxx.
|
pure virtual |
The update method.
This member function is called by the observed Observable when its state has changed The Command argument is optional and may be a null pointer.
Implemented in ProjectorBase, CutPlotter, PlotterBase, DataRep, EpsView, BinningProjector, QtView, NTupleProjector, Profile2DProjector, QtViewWidget, DyHist1DProjector, DyHist2DProjector, ViewBase, ProfileProjector, QtViewImp, ObserverWrap, and OpenGLView.
Referenced by Observable::notifyObservers().
|
virtual |
Notifies this
Observer object that one of its Observable objects is about to be deleted.
Since most Observable objects are owned by its Observer, it is the Observer that issued the delete. Thus the default implementation here does nothing. Derived classes that observe objects owned by another should implement this method to remove the Observable from the list they are observing.
Reimplemented in ViewBase, FunctionRep, BinningProjector, NTupleProjector, Profile2DProjector, DyHist1DProjector, DyHist2DProjector, TextPlotter, CutPlotter, and ProfileProjector.
Definition at line 25 of file Observer.cxx.
Referenced by DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), PlotterBase::~PlotterBase(), RootNTuple::~RootNTuple(), and RTuple::~RTuple().