7 #ifndef CAFU_OBSERVER_PATTERN_HPP_INCLUDED
8 #define CAFU_OBSERVER_PATTERN_HPP_INCLUDED
19 #include "Math3D/BoundingBox.hpp"
20 #include "Templates/Array.hpp"
21 #include "Templates/Pointer.hpp"
23 #include "wx/string.h"
26 namespace cf {
namespace GameSys {
class EntityT; } }
27 namespace cf {
namespace TypeSys {
class VarBaseT; } }
28 namespace MapEditor {
class CompMapEntityT; }
53 enum MapDocOtherDetailT
175 void UpdateAllObservers(MapDocOtherDetailT OtherDetail);
177 void UpdateAllObservers_GroupsChanged();
188 void UpdateAllObservers_SubjectDies();
MapElemModDetailE
Definition: ObserverPattern.hpp:37
virtual ~ObserverT()
The virtual destructor.
Definition: ObserverPattern.cpp:19
SubjectT()
The constructor. It is protected so that only derived classes can create instances of this class...
Definition: ObserverPattern.cpp:24
virtual ~SubjectT()
The virtual destructor.
Definition: ObserverPattern.cpp:149
virtual void NotifySubjectChanged_Modified(SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail, const ArrayT< BoundingBox3fT > &OldBounds)
Definition: ObserverPattern.hpp:125
virtual void NotifySubjectChanged_Modified(SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail)
Definition: ObserverPattern.hpp:116
The visibility of a map element has changed.
Definition: ObserverPattern.hpp:44
virtual void Notify_EntChanged(SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail)
Definition: ObserverPattern.hpp:130
virtual void NotifySubjectChanged_Selection(SubjectT *Subject, const ArrayT< MapElementT * > &OldSelection, const ArrayT< MapElementT * > &NewSelection)
Notifies the observer that the selection in the current subject has been changed. ...
Definition: ObserverPattern.hpp:80
Generic change of map elements (useful if the subject doesn't know what exactly has been changed)...
Definition: ObserverPattern.hpp:39
This class adds no functionality of its own, but only exists for proper type separation.
Definition: MapPrimitive.hpp:21
The position of an entity in the entity hierarchy has changed.
Definition: ObserverPattern.hpp:50
virtual void NotifySubjectChanged_Groups(SubjectT *Subject)
Notifies the observer that the groups in the current subject have been changed (new group added...
Definition: ObserverPattern.hpp:84
virtual void NotifySubjectChanged_Created(SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
Notifies the observer that one or more map primitives have been created.
Definition: ObserverPattern.hpp:94
EntityModDetailE
Definition: ObserverPattern.hpp:47
virtual void Notify_VarChanged(SubjectT *Subject, const cf::TypeSys::VarBaseT &Var)
Notifies the observer that a variable has changed.
Definition: ObserverPattern.hpp:135
The surface info of a map element has changed. Note that surface info changes also include the select...
Definition: ObserverPattern.hpp:42
virtual void NotifySubjectChanged_Deleted(SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
Notifies the observer that one or more entities have been deleted.
Definition: ObserverPattern.hpp:99
Definition: ObserverPattern.hpp:64
void UnregisterObserver(ObserverT *Obs)
Unregisters the observer Obs from further notification on updates of this class.
Definition: ObserverPattern.cpp:40
The set of components has changed (e.g. added, deleted, order changed).
Definition: ObserverPattern.hpp:49
The properties of a map primitive have been modified.
Definition: ObserverPattern.hpp:41
virtual void NotifySubjectChanged_Deleted(SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
Notifies the observer that one or more map primitives have been deleted.
Definition: ObserverPattern.hpp:104
virtual void NotifySubjectChanged(SubjectT *Subject, MapDocOtherDetailT OtherDetail)
Notifies the observer that some other detail than those specifically addressed below has changed...
Definition: ObserverPattern.hpp:74
virtual void NotifySubjectDies(SubjectT *dyingSubject)=0
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: ObserverPattern.hpp:158
ObserverT()
The constructor. It is protected so that only derived classes can create instances of this class...
Definition: ObserverPattern.cpp:14
This is the common base class for the VarT classes.
Definition: Variables.hpp:113
void RegisterObserver(ObserverT *Obs)
Registers the observer Obs for notification on updates of this class.
Definition: ObserverPattern.cpp:29
This is the base class for all elements ("objects") that can exist in a map.
Definition: MapElement.hpp:57
virtual void NotifySubjectChanged_Created(SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
Notifies the observer that one or more entities have been created.
Definition: ObserverPattern.hpp:89
A map primitive has been assigned to another entity (the world or any custom entity).
Definition: ObserverPattern.hpp:43
A map element has been transformed.
Definition: ObserverPattern.hpp:40