Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
SObservable Class Reference
#include <SObservable.h>
Inherited by SGanttLog, SJob, SJobArray, SPassiveMachines, SPrecRelation, SPref, SSchedAlgorithm, STaskSystem, STopology, and SVisPrecDAG.
Inheritance diagram for SObservable:
[legend]List of all members.
Detailed Description
The observable part in the classical observer-pattern; a class that can be observed, must be derived from this class. It stores a list of components that observe itself. CAUTION: since the observer-mechanism is somewhat implicit the following policy should be obeyed under allcircumstances in order to avoid confusion: events are generated exactly when the state changes (in the same method where the state of an object changes).
- See also:
-
SObserver
Constructor & Destructor Documentation
SObservable::SObservable |
( |
|
) |
[inline] |
|
SObservable::SObservable |
( |
const SObservable & |
rObs |
) |
[inline] |
|
SObservable::~SObservable |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
void SObservable::addObserver |
( |
SObserver & |
obs |
) |
[inline] |
|
|
Here another component can register himself as observer of this component - Parameters:
-
obs |
observer that wants to be notified of events created by this class |
|
void SObservable::deleteObserver |
( |
SObserver & |
obs |
) |
[inline] |
|
|
Here another component can delete himself from the list of observers of this component - Parameters:
-
obs |
observer that doesn't want to be notified anymore |
|
void SObservable::notifyObservers |
( |
const SEvent & |
event |
) |
[inline] |
|
|
Inform all observers of this component about an event. The Observers will receive this event by their SObserver::update()-method. - Parameters:
-
event |
an event that is sent to all observers of this component |
- See also:
-
SObserver::update()
|
The documentation for this class was generated from the following file:
Generated on Thu May 22 16:50:50 2003 for Sketch-it! by
1.2.18