csl::Model Class Reference

Forward declaration. More...

#include <CGestalt.h>

Inheritance diagram for csl::Model:

csl::SpeakerLayout csl::UnitGenerator csl::StereoSpeakerLayout csl::AmbisonicUnitGenerator csl::BlockResizer csl::BufferStream csl::DelayLine csl::Effect csl::Envelope csl::GrainPlayer csl::IFFT csl::Instrument csl::KarplusString csl::LineSegment csl::Lorenz csl::Microphone csl::Mixer csl::Noise csl::Oscillator csl::RemoteStream csl::RingBufferTap csl::RtpReceiver csl::SimpleSine csl::SineAsPhased csl::SineAsScaled csl::SoundCue csl::Spatializer csl::SpatialPanner csl::SpatialSource csl::StaticVariable csl::Window

List of all members.

Public Member Functions

 Model ()
 ~Model ()
 empty constructor
void attachObserver (Observer *)
 (possibly notify obersvers on my death)
void detachObserver (Observer *)
void changed (void *argument)

Private Attributes

std::vector< Observer * > mObservers
 the private vector of observers
bool mHasObservers
 whether there are any observers (for fast checking)


Detailed Description

Forward declaration.

The Model/Observable/Subject class; instances of its subclasses should send themselves, this->changed(some_data); on "relevant" state changes; the code they inherit (from Model) manages updating the list of observer/dependent objects in that they each receive update(some_data); and can access the model-passed data (the model might pass "this").


Constructor & Destructor Documentation

csl::Model::Model (  )  [inline]

csl::Model::~Model (  )  [inline]

empty constructor


Member Function Documentation

void Model::attachObserver ( Observer o  ) 

(possibly notify obersvers on my death)

register/remove observers

References csl::logMsg(), mHasObservers, and mObservers.

Referenced by csl::SpatialPanner::setSpeakerLayout().

void Model::detachObserver ( Observer o  ) 

void Model::changed ( void *  argument  ) 

this is what I send to myself to notify my observers; it's not overridden in general.

References csl::logMsg(), mHasObservers, and mObservers.

Referenced by csl::SpeakerLayout::addSpeaker(), and csl::SpeakerLayout::setDefaultSpeakerLayout().


Member Data Documentation

std::vector<Observer *> csl::Model::mObservers [private]

the private vector of observers

Referenced by attachObserver(), changed(), and detachObserver().

bool csl::Model::mHasObservers [private]

whether there are any observers (for fast checking)

Referenced by attachObserver(), changed(), and detachObserver().


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

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8