7 #ifndef CAFU_MODELEDITOR_OBSERVER_PATTERN_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_OBSERVER_PATTERN_HPP_INCLUDED
19 #include "ElementTypes.hpp"
20 #include "Templates/Array.hpp"
119 void UpdateAllObservers_JointChanged(
unsigned int JointNr);
120 void UpdateAllObservers_MeshChanged(
unsigned int MeshNr);
121 void UpdateAllObservers_SkinChanged(
unsigned int SkinNr);
122 void UpdateAllObservers_GuiFixtureChanged(
unsigned int GuiFixtureNr);
123 void UpdateAllObservers_AnimChanged(
unsigned int AnimNr);
124 void UpdateAllObservers_ChannelChanged(
unsigned int ChannelNr);
125 void UpdateAllObservers_SubmodelsChanged();
126 void UpdateAllObservers_AnimStateChanged();
void UnregisterObserver(ObserverT *Obs)
Unregisters the observer Obs from further notification on updates of this class.
Definition: ObserverPattern.cpp:39
virtual void Notify_Created(SubjectT *Subject, ModelElementTypeT Type, const ArrayT< unsigned int > &Indices)
This method is called when new elements have been created and were added to the model.
Definition: ObserverPattern.hpp:43
virtual void Notify_MeshChanged(SubjectT *Subject, unsigned int MeshNr)
Notifies the observer that a mesh has changed.
Definition: ObserverPattern.hpp:59
ObserverT()
The constructor. It is protected so that only derived classes can create instances of this class...
Definition: ObserverPattern.cpp:13
virtual void Notify_Deleted(SubjectT *Subject, ModelElementTypeT Type, const ArrayT< unsigned int > &Indices)
This method is called when new elements were deleted from the model.
Definition: ObserverPattern.hpp:49
virtual void Notify_AnimStateChanged(SubjectT *Subject)
Notifies the observer that the animation state has changed.
Definition: ObserverPattern.hpp:87
virtual ~ObserverT()
The virtual destructor.
Definition: ObserverPattern.cpp:18
void RegisterObserver(ObserverT *Obs)
Registers the observer Obs for notification on updates of this class.
Definition: ObserverPattern.cpp:28
virtual void Notify_AnimChanged(SubjectT *Subject, unsigned int AnimNr)
Notifies the observer that an animation sequence has changed.
Definition: ObserverPattern.hpp:74
Definition: ObserverPattern.hpp:104
virtual void Notify_GuiFixtureChanged(SubjectT *Subject, unsigned int GuiFixtureNr)
Notifies the observer that a GUI fixture has changed.
Definition: ObserverPattern.hpp:69
virtual void Notify_SubjectDies(SubjectT *dyingSubject)=0
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: ObserverPattern.hpp:158
SubjectT()
The constructor. It is protected so that only derived classes can create instances of this class...
Definition: ObserverPattern.cpp:23
virtual ~SubjectT()
The virtual destructor.
Definition: ObserverPattern.cpp:124
virtual void Notify_JointChanged(SubjectT *Subject, unsigned int JointNr)
Notifies the observer that a joint has changed.
Definition: ObserverPattern.hpp:54
virtual void Notify_ChannelChanged(SubjectT *Subject, unsigned int ChannelNr)
Notifies the observer that an animation channel has changed.
Definition: ObserverPattern.hpp:79
virtual void Notify_SubmodelsChanged(SubjectT *Subject)
Notifies the observer that the list of submodels has changed.
Definition: ObserverPattern.hpp:83
virtual void Notify_SkinChanged(SubjectT *Subject, unsigned int SkinNr)
Notifies the observer that a skin has changed.
Definition: ObserverPattern.hpp:64
Definition: ObserverPattern.hpp:28
virtual void Notify_SelectionChanged(SubjectT *Subject, ModelElementTypeT Type, const ArrayT< unsigned int > &OldSel, const ArrayT< unsigned int > &NewSel)
This method is called whenever the selection of a model changed.
Definition: ObserverPattern.hpp:37