33 #ifndef DART_COMMON_OBSERVER_HPP_
34 #define DART_COMMON_OBSERVER_HPP_
The Observer class should be inherited by any class that wants to respond in a customized way to the ...
Definition: Observer.hpp:52
std::set< const Subject * > mSubjects
List of current Subjects for this Observer.
Definition: Observer.hpp:81
virtual void handleDestructionNotification(const Subject *_subject)
Called by receiveDestructionNotification().
Definition: Observer.cpp:58
void addSubject(const Subject *_subject)
Add a Subject for this Observer.
Definition: Observer.cpp:64
void removeAllSubjects()
Remove all Subjects from this Observer.
Definition: Observer.cpp:90
void receiveDestructionNotification(const Subject *_subject)
Called whenever a Subject is destroyed (or sends out a destruction notification).
Definition: Observer.cpp:51
void removeSubject(const Subject *_subject)
Remove a Subject from this Observer.
Definition: Observer.cpp:77
virtual ~Observer()
Destructor will notify all Subjects that it is destructing.
Definition: Observer.cpp:40
The Subject class is a base class for any object that wants to report when it gets destroyed.
Definition: Subject.hpp:58
Definition: BulletCollisionDetector.cpp:63