Overview     Modules     Class Hierarchy     Classes     Members  

tlp::Observer Class Reference

#include <Observable.h>

List of all members.

Public Member Functions

Protected Member Functions

Friends


Detailed Description

The Observer pattern is a framework for handling state dependency between observer and observed object. It is described in the lecture notes and pp293-304 of Design Patterns by Gamma, Helm, Johnson, and Vlissides.


Constructor & Destructor Documentation

tlp::Observer::Observer ( bool  manageObservables = true  )  [inline]
virtual tlp::Observer::~Observer (  )  [virtual]

Member Function Documentation

void tlp::Observer::addObservable ( Observable  )  [protected]

This method is called when this observer is added to an observable.

tlp::Iterator<Observable *>* tlp::Observer::getObservables (  )  const [protected]

This method returns the list of observed objects.

Note:
This list is copyied to ensure that an Observer cannot modify its internal Observables list
virtual void tlp::Observer::observableDestroyed ( Observable  )  [pure virtual]

Method called when an observable has been deleted. holdObservers and unHoldObservers have no effects on this function.

void tlp::Observer::removeObservable ( Observable  )  [protected]

This method is called when this observer is removeed from an observable.

virtual void tlp::Observer::update ( std::set< Observable * >::iterator  begin,
std::set< Observable * >::iterator  end 
) [pure virtual]

Method called when a change occur in the observed objects. Due to the possibility to differs notificatiosn several objects can send a notify event simultaneously. The iterators given in parameter enable to iterate all these objects.


Friends And Related Function Documentation

friend class Observable [friend]


Tulip Software by LaBRI Visualization Team    2001 - 2011