tlp::Observer Class Reference#include <Observable.h>
List of all members.
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.
Public Member Functions
Constructor & Destructor Documentation
tlp::Observer::Observer |
( |
bool |
manageObservables = true |
) |
[inline] |
|
virtual tlp::Observer::~Observer |
( |
|
) |
[virtual] |
|
Member Function Documentation
void tlp::Observer::addObservable |
( |
Observable * |
|
) |
|
|
|
This method is call when this observer is add to an observable |
virtual void tlp::Observer::observableDestroyed |
( |
Observable * |
|
) |
[pure virtual] |
|
|
Methods called when an observable has been deleted. holdObservers and unHoldObservers function have no effects on this function. |
void tlp::Observer::removeObservable |
( |
Observable * |
|
) |
|
|
|
This method is call when this observer is remove from an observable |
virtual void tlp::Observer::update |
( |
std::set< Observable * >::iterator |
begin, |
|
|
std::set< Observable * >::iterator |
end |
|
) |
[pure virtual] |
|
|
Methods called when a change occur in the observed objects Due to the possibility to differs notificatiosn several objects can send a notify events simultaneously. The iterators given in parameter enable to iterate all these objects. |
|