Cafu Engine
ObserverT Class Referenceabstract
Inheritance diagram for ObserverT:

Public Member Functions

virtual void NotifySubjectChanged (SubjectT *Subject, MapDocOtherDetailT OtherDetail)
 Notifies the observer that some other detail than those specifically addressed below has changed. More...
 
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. More...
 
virtual void NotifySubjectChanged_Groups (SubjectT *Subject)
 Notifies the observer that the groups in the current subject have been changed (new group added, group deleted, visibility changed, anything). More...
 
virtual void NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
 Notifies the observer that one or more entities have been created. More...
 
virtual void NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
 Notifies the observer that one or more map primitives have been created. More...
 
virtual void NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
 Notifies the observer that one or more entities have been deleted. More...
 
virtual void NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
 Notifies the observer that one or more map primitives have been deleted. More...
 
virtual void NotifySubjectDies (SubjectT *dyingSubject)=0
 This method is called whenever a subject is about the be destroyed (and become unavailable). More...
 
virtual ~ObserverT ()
 The virtual destructor. More...
 
Modification notification method and overloads.

These methods notify the observer that one or more map elements have been modified.

The first 3 parameters are common to all of these methods since they are the basic information needed to communicate an object modification.

virtual void NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail)
 
virtual void NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail, const ArrayT< BoundingBox3fT > &OldBounds)
 
virtual void Notify_EntChanged (SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail)
 
virtual void Notify_VarChanged (SubjectT *Subject, const cf::TypeSys::VarBaseT &Var)
 Notifies the observer that a variable has changed. More...
 

Protected Member Functions

 ObserverT ()
 The constructor. It is protected so that only derived classes can create instances of this class. More...
 

Constructor & Destructor Documentation

ObserverT::~ObserverT ( )
virtual

The virtual destructor.

ObserverT::ObserverT ( )
protected

The constructor. It is protected so that only derived classes can create instances of this class.

Member Function Documentation

virtual void ObserverT::Notify_EntChanged ( SubjectT Subject,
const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &  Entities,
EntityModDetailE  Detail 
)
inlinevirtual
Parameters
SubjectThe map document in which the entities have been modified.
EntitiesList of modified map entities.
DetailInformation about what has been modified.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityHierarchyDialogT, and MapEditor::EntityInspectorDialogT.

virtual void ObserverT::Notify_VarChanged ( SubjectT Subject,
const cf::TypeSys::VarBaseT Var 
)
inlinevirtual

Notifies the observer that a variable has changed.

Parameters
SubjectThe map document in which a variable has changed.
VarThe variable whose value has changed.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityHierarchyDialogT, and MapEditor::EntityInspectorDialogT.

virtual void ObserverT::NotifySubjectChanged ( SubjectT Subject,
MapDocOtherDetailT  OtherDetail 
)
inlinevirtual

Notifies the observer that some other detail than those specifically addressed below has changed.

Reimplemented in ChildFrameT::UpdaterT, and ViewWindow2DT.

virtual void ObserverT::NotifySubjectChanged_Created ( SubjectT Subject,
const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &  Entities 
)
inlinevirtual

Notifies the observer that one or more entities have been created.

Parameters
SubjectThe map document in which the entities have been created.
EntitiesList of created entities.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ViewWindow2DT, and MapEditor::EntityHierarchyDialogT.

virtual void ObserverT::NotifySubjectChanged_Created ( SubjectT Subject,
const ArrayT< MapPrimitiveT * > &  Primitives 
)
inlinevirtual

Notifies the observer that one or more map primitives have been created.

Parameters
SubjectThe map document in which the primitives have been created.
PrimitivesList of created map primitives.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ViewWindow2DT, and MapEditor::EntityHierarchyDialogT.

virtual void ObserverT::NotifySubjectChanged_Deleted ( SubjectT Subject,
const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &  Entities 
)
inlinevirtual

Notifies the observer that one or more entities have been deleted.

Parameters
SubjectThe map document in which the entities have been deleted.
EntitiesList of deleted entities.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityHierarchyDialogT, and MapEditor::EntityInspectorDialogT.

virtual void ObserverT::NotifySubjectChanged_Deleted ( SubjectT Subject,
const ArrayT< MapPrimitiveT * > &  Primitives 
)
inlinevirtual

Notifies the observer that one or more map primitives have been deleted.

Parameters
SubjectThe map document in which the primitives have been deleted.
PrimitivesList of deleted map primitives.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ToolTerrainEditorT, ToolMorphT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityHierarchyDialogT, and InspDlgPrimitivePropsT.

virtual void ObserverT::NotifySubjectChanged_Groups ( SubjectT Subject)
inlinevirtual

Notifies the observer that the groups in the current subject have been changed (new group added, group deleted, visibility changed, anything).

Parameters
SubjectThe map document in which the group inventory has been changed.

Reimplemented in GroupsToolbarT, and MapEditor::EntityHierarchyDialogT.

virtual void ObserverT::NotifySubjectChanged_Modified ( SubjectT Subject,
const ArrayT< MapElementT * > &  MapElements,
MapElemModDetailE  Detail 
)
inlinevirtual
Parameters
SubjectThe map document in which the elements have been modified.
MapElementsList of modified map elements.
DetailInformation about what has been modified: Can be one of MEMD_PRIMITIVE_PROPS_CHANGED, MEMD_GENERIC, MEMD_ASSIGN_PRIM_TO_ENTITY and MEMD_MATERIAL_CHANGED.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ToolTerrainEditorT, ToolMorphT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityHierarchyDialogT, MapEditor::EntityInspectorDialogT, and InspDlgPrimitivePropsT.

virtual void ObserverT::NotifySubjectChanged_Modified ( SubjectT Subject,
const ArrayT< MapElementT * > &  MapElements,
MapElemModDetailE  Detail,
const ArrayT< BoundingBox3fT > &  OldBounds 
)
inlinevirtual
Parameters
SubjectThe map document in which the elements have been modified.
MapElementsList of modified map elements.
DetailInformation about what has been modified: Can be MEMD_TRANSFORM or MEMD_PRIMITIVE_PROPS_CHANGED. In the case of MEMD_PRIMITIVE_PROPS_CHANGED one can assume that only map primitives (no entities) are in the MapElements array.
OldBoundsHolds the bounds of each objects BEFORE the modification (has the same size as MapElements).

Reimplemented in ToolTerrainEditorT, ToolMorphT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityInspectorDialogT, and InspDlgPrimitivePropsT.

virtual void ObserverT::NotifySubjectChanged_Selection ( SubjectT Subject,
const ArrayT< MapElementT * > &  OldSelection,
const ArrayT< MapElementT * > &  NewSelection 
)
inlinevirtual

Notifies the observer that the selection in the current subject has been changed.

Parameters
SubjectThe map document in which the selection has been changed.
OldSelectionArray of the previously selected objects.
NewSelectionArray of the new selected objects.

Reimplemented in MapEditor::EntityHierarchyCtrlT, ChildFrameT::UpdaterT, ToolMorphT, ToolSelectionT, ViewWindow2DT, MapEditor::EntityInspectorDialogT, MapEditor::EntityHierarchyDialogT, InspectorDialogT, and InspDlgPrimitivePropsT.

virtual void ObserverT::NotifySubjectDies ( SubjectT dyingSubject)
pure virtual

This method is called whenever a subject is about the be destroyed (and become unavailable).

Parameters
dyingSubjectThe subject that is being destroyed.

Implemented in MapEditor::EntityHierarchyCtrlT, ChildFrameT::UpdaterT, ToolTerrainEditorT, ToolSelectionT, ToolMorphT, EditSurfacePropsDialogT, ViewWindowT, MapEditor::EntityHierarchyDialogT, MapEditor::EntityInspectorDialogT, GroupsToolbarT, InspDlgPrimitivePropsT, MaterialsToolbarT, and InspectorDialogT.


The documentation for this class was generated from the following files: