ISubject Class

class ISubject

ISubject is an interface that can be mixed into any object through multiple inheritance. An object that incorporates this interface can be observed by any object that incorporates the IObserver interface. All observers of a subject are notified of changes to the subject state via a change notification protocol. This notification can be any object whose class mixes in the IMessage interface.

NOTE: the ISubject interface implements the subject part of the Observer design pattern. See the book "Design Patterns: Elements of reusable Object-oriented software."

Defined in: SubjectObserver.h

Class Members

virtual void  AddObserver(IObserver* pObserver)

Adds a observer to the list of dependents on this object. When a change in state occurs, all observers are notified.

virtual void  RemoveObserver(IObserver* pObserver)

The dependent identified by the argument is removed from this objects list of dependents

virtual void  UpdateAllObservers(IObserver* pSender, IMessage* pMsg)

All objects dependent on this object are sent a notification indicating what aspect of this object has changed