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. | |
Observer () | |
A constructor. | |
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. | |
virtual void | OnDestroy (Subject< _MessageType > &rCaller) |
This method need to be reimplemented from the concrete Observer and get called by the observed class. | |
virtual | ~Observer () |
A destructor. |
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.
Definition at line 51 of file Observer.h.
Base::Observer< _MessageType >::Observer | ( | ) | [inline] |
virtual Base::Observer< _MessageType >::~Observer | ( | ) | [inline, virtual] |
virtual const char* Base::Observer< _MessageType >::Name | ( | void | ) | [inline, virtual] |
This method can be reimplemented from the concrete Observer and returns the name of the observer.
Needed to use the Get Method of the Subject.
Definition at line 88 of file Observer.h.
virtual void Base::Observer< _MessageType >::OnChange | ( | Subject< _MessageType > & | rCaller, | |
_MessageType | rcReason | |||
) | [pure virtual] |
This method need to be reimplemented from the concrete Observer and get called by the observed class.
rCaller | a reference to the calling object | |
rcReason |
Implemented in Gui::MacroManager, InspectionGui::ViewProviderInspection, and MeshGui::ViewProviderMeshCurvature.
virtual void Base::Observer< _MessageType >::OnDestroy | ( | Subject< _MessageType > & | rCaller | ) | [inline, virtual] |
This method need to be reimplemented from the concrete Observer and get called by the observed class.
rCaller | a reference to the calling object |
Definition at line 81 of file Observer.h.