Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

CModel Class Reference

#include <ccomponent.h>

Inheritance diagram for CModel:

Inheritance graph
[legend]
Collaboration diagram for CModel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void attach (IObserver *o)
virtual void detach (IObserver *o)
virtual void notify ()

Protected Attributes

std::list< IObserver * > observers

Detailed Description

Mixin class for a model in a model-view-controller architectural pattern. This class and the IObserver class effectively implement a simple publish-subscribe framework.

Definition at line 45 of file ccomponent.h.


Member Function Documentation

virtual void CModel::attach IObserver o  )  [inline, virtual]
 

Attach an observer to the model.

Definition at line 52 of file ccomponent.h.

References observers, and IObserver::update().

Here is the call graph for this function:

virtual void CModel::detach IObserver o  )  [inline, virtual]
 

Detach an observer from the model.

Definition at line 55 of file ccomponent.h.

References observers.

virtual void CModel::notify  )  [inline, virtual]
 

Notify the model's observers that the model has changed.

Definition at line 58 of file ccomponent.h.

References observers.


Member Data Documentation

std::list<IObserver *> CModel::observers [protected]
 

List of the model's observers (subscribers).

Definition at line 48 of file ccomponent.h.


The documentation for this class was generated from the following file:
Generated on Wed Aug 27 11:58:55 2003 for GFW by doxygen 1.3.3