#include <Observer.h>
Inheritance diagram for Observer:
Public Member Functions | |
Observer () | |
Ctor. | |
virtual | ~Observer () |
Dtor. | |
int | numberOfSubjects () const |
Give the number of Subjects that this object is registered with. | |
virtual void | notify () |
This function is called, by a Subject object with which this object is registed, in order to indicate to this object that the Subject has changed. | |
Protected Member Functions | |
void | addSubject (Subject *subject) |
Add a Subject object to watch. | |
void | removeSubject (Subject *subject) |
Remove a Subject object (and, so, stop watching it). | |
Friends | |
class | Subject |
Definition at line 22 of file Observer.h.
Observer::Observer | ( | ) |
Ctor.
virtual Observer::~Observer | ( | ) | [virtual] |
Dtor.
int Observer::numberOfSubjects | ( | ) | const |
Give the number of Subjects that this object is registered with.
virtual void Observer::notify | ( | ) | [virtual] |
This function is called, by a Subject object with which this object is registed, in order to indicate to this object that the Subject has changed.
This function does nothing. Derived functions should take action that is appropiate to that object in the light of a change in the Subject.
Reimplemented in ssMultibeamProcess, ActorRemoveDialog, and CarpetViewer.
void Observer::addSubject | ( | Subject * | subject | ) | [protected] |
void Observer::removeSubject | ( | Subject * | subject | ) | [protected] |
Remove a Subject object (and, so, stop watching it).
subject | The object which to stop watching. |
friend class Subject [friend] |
Definition at line 27 of file Observer.h.