Observer Class Reference
[Common/Observer]

#include <Observer.h>

Inheritance diagram for Observer:

Inheritance graph
[legend]
List of all members.

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

Detailed Description

Definition at line 22 of file Observer.h.


Constructor & Destructor Documentation

Observer::Observer (  ) 

Ctor.

virtual Observer::~Observer (  )  [virtual]

Dtor.


Member Function Documentation

int Observer::numberOfSubjects (  )  const

Give the number of Subjects that this object is registered with.

Returns:
The number registered.

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]

Add a Subject object to watch.

Parameters:
subject The object which to watch.

void Observer::removeSubject ( Subject subject  )  [protected]

Remove a Subject object (and, so, stop watching it).

Parameters:
subject The object which to stop watching.


Friends And Related Function Documentation

friend class Subject [friend]

Definition at line 27 of file Observer.h.


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