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

ObserverWrap Class Reference

#include <ObserverWrap.h>

Inheritance diagram for ObserverWrap:

Inheritance graph
[legend]
Collaboration diagram for ObserverWrap:

Collaboration graph
[legend]
List of all members.

Detailed Description

A wrapper class for Observer to allow its pure virtual function to be implemented in Python.

Note:
This class needs Python 2.3 or later to be fully functional.
Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 29 of file ObserverWrap.h.

Public Member Functions

 ObserverWrap (PyObject *self)
 The constructor.
void update (const Observable *)
virtual void willDelete (const Observable *)
 Notifies this Observer object that one of its Observable objects is about to be deleted.

Private Attributes

PyObject * m_self
 The held Python object.


Constructor & Destructor Documentation

ObserverWrap::ObserverWrap PyObject *  self  ) 
 

The constructor.

Definition at line 48 of file ObserverWrap.cxx.


Member Function Documentation

void ObserverWrap::update const Observable obs  )  [virtual]
 

Note:
This function is only available with Python 2.3 or later.

Implements hippodraw::Observer.

Definition at line 58 of file ObserverWrap.cxx.

References m_self.

void hippodraw::Observer::willDelete const Observable  )  [virtual, inherited]
 

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().


Member Data Documentation

PyObject* ObserverWrap::m_self [private]
 

The held Python object.

Definition at line 35 of file ObserverWrap.h.

Referenced by update().


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