Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

hippodraw::Observer Class Reference

#include <Observer.h>

Inheritance diagram for hippodraw::Observer:

Inheritance graph
[legend]
List of all members.

Detailed Description

Part of an implementation of the Observable Observer pattern based on the example implementation in the GOF Patterns text.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>
Note:
Giulio Eulisse <giulio.eulisse@cern.ch> put this class in namespace hippodraw so that it wouldn't clash with a Corbra Observer and contributed all the code that needed changing.

Definition at line 33 of file Observer.h.

Public Member Functions

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.

Protected Member Functions

 Observer ()
 The default constructor.


Constructor & Destructor Documentation

hippodraw::Observer::Observer  )  [protected]
 

The default constructor.

Definition at line 13 of file Observer.cxx.

hippodraw::Observer::~Observer  )  [virtual]
 

The destructor.

Definition at line 18 of file Observer.cxx.


Member Function Documentation

virtual void hippodraw::Observer::update const Observable  )  [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 DataRep, FunctionRep, FunctionRep, DataSourceController, EpsView, ViewBase, OpenGLView, CutPlotter, PlotterBase, BinningProjector, DyHist1DProjector, DyHist2DProjector, NTupleProjector, Profile2DProjector, ProfileProjector, ProjectorBase, ObserverWrap, QtView, QtViewImp, and QtViewWidget.

Referenced by Observable::notifyObservers().

void hippodraw::Observer::willDelete const Observable  )  [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 FunctionRep, DataSourceController, CutPlotter, TextPlotter, BinningProjector, DyHist1DProjector, DyHist2DProjector, NTupleProjector, Profile2DProjector, and ProfileProjector.

Definition at line 25 of file Observer.cxx.

Referenced by DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3