Observer Base class for Observer-Design-Pattern within Guiliani. More...
#include <GUIObserver.h>
Public Member Functions | |
CGUIObserver () | |
Default constructor. | |
virtual | ~CGUIObserver () |
Default destructor. Notifies all subjects of destruction. | |
const eC_TListDoubleLinked< CGUISubject * > & | GetSubjectList () const |
virtual void | OnNotification () |
Called by CGUISubject whenever an observed object triggers an update. More... | |
virtual void | OnNotification (const CGUIObject *const pkUpdatedObject) |
virtual void | OnNotification (const CGUIValue &kObservedValue, const CGUIObject *const pkUpdatedObject, const eC_UInt uiX=0, const eC_UInt uiY=0) |
virtual void | OnNotification (const eC_String &kMessage) |
void | SetAutoDelete (const eC_Bool bAutoDelete) |
Protected Member Functions | |
virtual void | AddSubject (CGUISubject *pSubjectToAdd) |
virtual void | RemoveSubject (CGUISubject *pSubjectToRemove) |
Friends | |
class | CGUISubject |
Observer Base class for Observer-Design-Pattern within Guiliani.
Use this base class if you wish to follow the observer-design-pattern within your application. Simply derive the class that you want to act as an observer from CGUIObserver, and implement the desired functionality within OnNotification(). This method will be called whenever an observed subject changes.
|
protectedvirtual |
Called by the subject when the Observer is added. ATTENTION: Call base implementation when deriving from this method.
pSubjectToAdd | The Subject that shall be added to the internal list. |
|
inline |
|
inlinevirtual |
Called by CGUISubject whenever an observed object triggers an update.
Reimplemented in CGUICalendar, CGUIRichText, CGUIText, and CGUIColorPropertyObserver.
|
inlinevirtual |
Called by a subject whenever the observed object triggers update.
pkUpdatedObject | The observed object (can be NULL) |
|
inlinevirtual |
Called by a subject whenever the observed value changes.
kObservedValue | The updated observed value. |
pkUpdatedObject | The observed object (can be NULL) |
uiX | X-Index Additional X-Index in case the updated value is part of a multidimensional array |
uiY | Y-Index Additional Y-Index in case the updated value is part of a multidimensional array |
Reimplemented in CGUIComboBox, CGUIScrollBar, and CDataPoolEntry.
|
inlinevirtual |
Called by CGUISubject whenever an observed object triggers an update.
kMessage | The updated string value. |
|
protectedvirtual |
Called on destruction of the subject to reset the internal Subject pointer. ATTENTION: Call base implementation when deriving from this method.
pSubjectToRemove | The Subject that shall be removed from the internal list. |
|
inline |
Specifies if this observer will automatically delete itself when the number of observed subjects reaches zero.
bAutoDelete | If True, this observer will delete itself when RemoveSubject() is called for the last observed subject. |
|
friend |