Observer Class Reference

#include <Subject_Observer.h>

Inheritance diagram for Observer:

Canvas3D DynControlPanel KinControlPanel List of all members.

Detailed Description

Observer of the Observer design pattern.

This is a base class for any implementation of a Design pattern Observer. The class that is presenting data must be a child of the base class Observer. The role of this class is to define an updating interface for objects that should be notified of changes in a subject.

  class ControlPanel: public Observer
  {
  public:
  
  int i;
  };

Cite_: Reference: Gamma, E., Helm, R. Johnson, R. et Vlissides, J. Design Patterns - Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995, 395 pages.

Definition at line 99 of file Subject_Observer.h.

Public Member Functions

virtual ~Observer ()
 Destructor.
virtual void Update (Subject *theChangedSubject)=0
 Virtual function that must be overloaded to refresh the data displayed properly.

Protected Member Functions

 Observer ()
 Constructor.


Member Function Documentation

void Observer::Update ( Subject theChangedSubject  )  [pure virtual]

Virtual function that must be overloaded to refresh the data displayed properly.

Attention:
Make sure this method is overloaded in your concrete observer.
Parameters:
theChanedSubject a pointer to the Subject that requested the update

Implemented in Canvas3D, KinControlPanel, and DynControlPanel.

Definition at line 86 of file Subject_Observer.cpp.


Generated on Fri Feb 9 08:52:23 2007 for GLroboop An OpenGL Robotics Object Oriented Package in C++ by  doxygen 1.5.1