OpenLexocad
27.0
|
#include <Observer.h>
Public Member Functions | |
Observer () | |
virtual | ~Observer () |
virtual void | onChange (Subject< _MessageType > *rCaller, _MessageType rcReason)=0 |
virtual void | onDestroy (Subject< _MessageType > &) |
virtual const char * | name (void) |
void | setObserverPriority (int priority) |
int | getObserverPriority () const |
void | setAttached (Subject< _MessageType > *t) |
void | setDetached (Subject< _MessageType > *t) |
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.
|
inline |
A constructor. No special function so far.
|
inlinevirtual |
A destructor. No special function so far.
|
inline |
|
inlinevirtual |
|
pure virtual |
This method need to be reimplemented from the concrete Observer and get called by the observed class
pCaller | a reference to the calling object |
|
inlinevirtual |
This method need to be reimplemented from the concrete Observer and get called by the observed class
pCaller | a reference to the calling object |
|
inline |
|
inline |
|
inline |
Observers with higher priority will be called first. Default priority is 1.