Observer class Implementation of the well known Observer Design Pattern. More...
#include <Observer.h>
Public Member Functions | |
virtual const char * | Name (void) |
This method can be reimplemented from the concrete Observer and returns the name of the observer. More... | |
Observer () | |
A constructor. More... | |
virtual void | OnChange (Subject< _MessageType > &rCaller, _MessageType rcReason)=0 |
This method need to be reimplemented from the concrete Observer and get called by the observed class. More... | |
virtual void | OnDestroy (Subject< _MessageType > &rCaller) |
This method need to be reimplemented from the concrete Observer and get called by the observed class. More... | |
virtual | ~Observer () |
A destructor. More... | |
Detailed Description
template<class _MessageType>
class Base::Observer< _MessageType >
Observer class Implementation of the well known Observer Design Pattern.
The observed object, which inherit FCSubject, will call all its observers in case of changes. A observer class has to Attach itself to the observed object.
- See also
- FCSubject
Constructor & Destructor Documentation
◆ Observer()
Base::Observer< _MessageType >::Observer | ( | ) |
A constructor.
No special function so far.
◆ ~Observer()
|
virtual |
A destructor.
No special function so far.
Member Function Documentation
◆ Name()
|
virtual |
◆ OnChange()
|
pure virtual |
This method need to be reimplemented from the concrete Observer and get called by the observed class.
- Parameters
-
rCaller a reference to the calling object rcReason
Implemented in FemGui::ViewProviderFemPostObject, MeshGui::ViewProviderMeshCurvature, InspectionGui::ViewProviderInspection, and Gui::MacroManager.
◆ OnDestroy()
|
virtual |
This method need to be reimplemented from the concrete Observer and get called by the observed class.
- Parameters
-
rCaller a reference to the calling object
The documentation for this class was generated from the following file:
- src/Base/Observer.h