This file provides the classes for the Observer pattern as described in the book by the GoF. More...
#include "Math3D/BoundingBox.hpp"
#include "Templates/Array.hpp"
#include "Templates/Pointer.hpp"
#include "wx/string.h"
Go to the source code of this file.
Classes | |
class | ObserverT |
class | SubjectT |
Namespaces | |
cf::TypeSys | |
The TypeSys ("type system") namespace provides classes for two related, but entirely independent concepts: | |
Enumerations | |
enum | MapElemModDetailE { MEMD_GENERIC, MEMD_TRANSFORM, MEMD_PRIMITIVE_PROPS_CHANGED, MEMD_SURFACE_INFO_CHANGED, MEMD_ASSIGN_PRIM_TO_ENTITY, MEMD_VISIBILITY } |
enum | EntityModDetailE { EMD_COMPONENTS, EMD_HIERARCHY } |
enum | MapDocOtherDetailT { UPDATE_GRID, UPDATE_POINTFILE, UPDATE_GLOBALOPTIONS } |
This file provides the classes for the Observer pattern as described in the book by the GoF.
Note that implementations of ObserverT normally maintain a pointer to the subject(s) that they observe, e.g. in order to be able to redraw themselves also outside of and independent from the NotifySubjectChanged() method. This however in turn creates problems when the life of the observer begins before or ends after the life of the observed subject(s). In fact, it seems that the observers have to maintain lists of valid, observed subjects as the subjects maintain lists of observers. Fortunately, these possibly tough problems can (and apparently must) be addressed by the concrete implementation classes of observers and subjects, not by the base classes that the Observer pattern describes and provided herein.
enum EntityModDetailE |
enum MapElemModDetailE |