#include <CSL_Types.h>
Inheritance diagram for csl::Model:

The Model/Observable/Subject class; instances of its subclasses should send themselves this->changed(some_data) on "relevant" state changes; the code they inherit manages updating the list of observer or client objects.
Public Member Functions | |
| Model () | |
| ~Model () | |
| empty constructor | |
| void | attachObserver (Observer *) |
| (possibly notify obersvers on my death) register/remove observers | |
| void | detachObserver (Observer *) |
| void | changed (void *argument) |
Private Attributes | |
| vector< Observer * > | mObservers |
| the private vector of observers | |
| bool | mHasObservers |
| whether there are any observers (for fast checking) | |
|
|
|
|
|
empty constructor
|
|
|
(possibly notify obersvers on my death) register/remove observers
|
|
|
|
|
|
this is what I send to myself to notify my observers; it's not overridden in general. |
|
|
the private vector of observers
|
|
|
whether there are any observers (for fast checking)
|
1.4.5-20051010