CMvcModel Class
class CMvcModel: public ISubject
A model is a kind of subject that serves as a base class for your application-specific models. There are generally two types of models: system-models and presentation-models. This distinction is purely conceptual. System-models are models that simulate or model some real world process or object. The system-model, in this case, is somewhat like a proxy or stand-in for the real thing. An presentation model is a model that represents application or presentation data and functionality.Defined in: MvcModel.h
Class Members
Construct a model
virtual ~CMvcModel()
Destroys the model
ObserverVector m_observers
Array of observers
ULONG STDMETHODCALLTYPE AddRef()
Add a reference to this object.
ULONG STDMETHODCALLTYPE Release()
Release a reference to this object.
virtual void AddObserver(IObserver* pObserver)
Adds an observer to the list of dependents
virtual void RemoveObserver(IObserver* pObserver)
Removes an observer from the list of dependents
virtual void UpdateAllObservers(IObserver* pSender = NULL, IMessage* pMsg = NULL)
Broadcast a notification of change to all observers
virtual BOOL IsModified() const
Tests whether this model has been modified since its creation
virtual void Reset()
Reset the state of the model to its initial state