App::DocumentObserver Class Reference

The DocumentObserver class simplfies the step to write classes that listen to what happens inside a document. More...

#include <DocumentObserver.h>

Public Member Functions

void attachDocument (Document *)
 Attaches to another document, the old document is not longer observed then. More...
 
void detachDocument ()
 Detaches from the current document, the document is not longer observed then. More...
 
 DocumentObserver ()
 Constructor. More...
 
 DocumentObserver (Document *)
 
virtual ~DocumentObserver ()
 

Protected Member Functions

DocumentgetDocument () const
 

Detailed Description

The DocumentObserver class simplfies the step to write classes that listen to what happens inside a document.

This is very useful for classes that needs to be notified when an observed object has changed.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ DocumentObserver() [1/2]

◆ DocumentObserver() [2/2]

◆ ~DocumentObserver()

DocumentObserver::~DocumentObserver ( )
virtual

References detachDocument().

Member Function Documentation

◆ attachDocument()

◆ detachDocument()

void DocumentObserver::detachDocument ( )

Detaches from the current document, the document is not longer observed then.

Referenced by attachDocument(), and ~DocumentObserver().

◆ getDocument()


The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/App/DocumentObserver.h
  • Sources/FreeCAD/src/App/DocumentObserver.cpp