Main Page   Class Hierarchy   Data Structures   File List   Data Fields  

Subject Class Reference

#include <Subject.h>

Inheritance diagram for Subject:

Inheritance graph

Public Member Functions

virtual ~Subject ()
virtual void attach (Observer *const)
virtual void detach (Observer *const)
virtual void detachAllObservers ()
virtual void notify () const

Detailed Description

A subject has to be able to register and deregister observers and to be able to notify all observers of a change. The constructor is private to stop any instances of this class being constructed.

Version: 1.1 1999.10.02

Russel Winder, Michael Otto

Definition at line 16 of file Subject.h.

Constructor & Destructor Documentation

Subject::~Subject   [inline, virtual]


Definition at line 36 of file Subject.h.

Member Function Documentation

void Subject::attach Observer   const [inline, virtual]

Register an observer.

Definition at line 43 of file Subject.h.

Referenced by GStockCalc::GStockCalc().

void Subject::detach Observer   const [inline, virtual]

Deregister an observer.

Definition at line 50 of file Subject.h.

Referenced by StockGui::~StockGui().

void Subject::detachAllObservers   [inline, virtual]

Deregister all observers.

Definition at line 57 of file Subject.h.

Referenced by Stock::~Stock().

void Subject::notify   const [inline, virtual]

Notify all registrants that our state has changed.

Definition at line 64 of file Subject.h.

Referenced by StockMarket::addStockContainer(), StockMarketVector::addStockMarket(), StockMarketVector::changeStockMarketPosition(), StockMarket::removeStock(), StockMarketVector::removeStockMarket(), Stock::setAmount(), Stock::setBuyingDate(), Stock::setBuyingRate(), Stock::setCurrentMarketPrice(), Stock::setCurrentMarketPriceDayBefore(), StockMarket::setMarketName(), Stock::setName(), Stock::setPurchaseCost(), and Stock::setWkn().

The documentation for this class was generated from the following file:
Generated on Tue May 27 21:24:05 2003 for gstockcalc by doxygen1.3-rc3