More about the Observer/Observable model?
This is the subject class. The user should create a class that inherits the properties of this class and should call the notify() method.
This is the observer class. Like the subject class, this class is not to be instantiated directly but should be inherited by a user defined class. The pure virtual function update() should be implemented by the class.
The observer_sample.cxx uses two classes Player and Watcher which inherit
the properties of the super classes mentioned above. Player1 and
Player2 are two subjects to whom a 'Watcher1' gets attached using the attach()
method. When either player calls the notify(), the watcher calls it's update()
method.
for more information email : cavern@evl.uic.edu