A class can implement the Observer interface when it wants to be informed of changes in observable objects.
Definition at line 54 of file Observer.h.
virtual void anatomist::Observer::cleanupObserver |
( |
| ) |
|
|
protectedvirtual |
call this function from inherited classes destructors.
Derived classes may have to manually call it, especially if they have overloaded unregisterObservable()
otherwise it may be called by the destructor of a base class which will not be able to access the correct overloaded functions anymore.
It's not an error to call cleanupObserver()
several times: basically each destructor in the inheritance tree of a derived class will call it, but only the first call will have any effect.
virtual void anatomist::Observer::update |
( |
const Observable * |
observable, |
|
|
void * |
arg |
|
) |
| |
|
pure virtual |
This method is called whenever the observed object is changed.
The programmer calls an observable object's notifyObservers method to have all the object's observers notified of the change.
- Parameters
-
observable | the observable object |
Implemented in anatomist::NormalsSettingsPanel, anatomist::NormalsSettingsPanel::NormalsObserver, anatomist::AWindow, anatomist::AVolumeView< T >, anatomist::Slice, anatomist::ATexture, anatomist::ATexSurface, anatomist::TesselatedMesh, anatomist::ANormalsMesh, anatomist::PlanarFusion3D, anatomist::CutMesh, anatomist::AConnectivityMatrix, anatomist::CommandWriter, anatomist::VolRenderShader, anatomist::VolRender, anatomist::AObject, anatomist::ClippedObject, anatomist::MObject, anatomist::Fusion3D, anatomist::Fusion2D, anatomist::AInterpoler, anatomist::PaintActionSharedData, anatomist::RoiLevelSetActionSharedData, anatomist::ReferentialObserver, anatomist::VectorField, anatomist::AMTexture, anatomist::Fusion2DMesh, anatomist::GLMObject, anatomist::RoiManagementActionSharedData, Tools3DWindow, LightModelWindow, FixedPointOfViewWindow, VectorFieldEditionWindow, ChooseReferentialWindow, VolRenderPanel, QTextureWin, QTexturePanel, Fusion3DWindow, Fusion2DWindow, anatomist::ConstraintEditorWindow, RenderingWindow, MaterialWindow, QObjectBrowser, PaintActionView, ALandmarkPicker, GraphLandmarkPicker, QSurfMatchWin, QGraphProperties, QAPaletteWin, ErpWraper, RoiManagementActionView, RoiMorphoMathActionView, RoiLevelSetActionView, RoiHistoPlot, RoiDynSegmentActionView, and anatomist::RoiDynSegmentAction.