Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AlterationNotifier Class Template Reference
[Graphmaps]

#include <lemon/alteration_notifier.h>

Inheritance diagram for AlterationNotifier:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename _Item>
class lemon::AlterationNotifier< _Item >

This class is a registry for the objects which observe the alterations in a container. The alteration observers can be attached to and detached from the registry. The observers have to inherit from the AlterationNotifier::ObserverBase and override the virtual functions in that.

The most important application of the alteration observing is the dynamic map implementation when the observers are observing the alterations in the graph.

Parameters:
_Item The item type what the observers are observing, usually edge or node.
Author:
Balazs Dezso

Definition at line 52 of file alteration_notifier.h.

Public Member Functions

 AlterationNotifier ()
 Default constructor.
 AlterationNotifier (const AlterationNotifier &)
 Copy Constructor of the AlterationNotifier.
AlterationNotifieroperator= (const AlterationNotifier &)
 Assign operator.
 ~AlterationNotifier ()
 Destructor.
void add (const Item &key)
 Notifies all the registered observers about an Item added to the container.
void erase (const Item &key)
 Notifies all the registered observers about an Item erased from the container.
void build ()
 Notifies all the registered observers about the container is builded.
void clear ()
 Notifies all the registered observers about all Items are erased.

Classes

class  ObserverBase
 ObserverBase is the base class for the observers. More...


Constructor & Destructor Documentation

AlterationNotifier  )  [inline]
 

The default constructor of the AlterationNotifier. It creates an empty registry.

Definition at line 183 of file alteration_notifier.h.

AlterationNotifier const AlterationNotifier< _Item > &   )  [inline]
 

Copy constructor of the AlterationNotifier. It creates only an empty registry because the copiable registry's observers have to be registered still into that registry.

Definition at line 190 of file alteration_notifier.h.

~AlterationNotifier  )  [inline]
 

Destructor of the AlterationNotifier.

Definition at line 208 of file alteration_notifier.h.


Member Function Documentation

AlterationNotifier& operator= const AlterationNotifier< _Item > &   )  [inline]
 

Assign operator for the AlterationNotifier. It makes the notifier only empty because the copiable notifier's observers have to be registered still into that registry.

Definition at line 197 of file alteration_notifier.h.

void add const Item &  key  )  [inline]
 

It notifies all the registered observers about an Item added to the container.

Definition at line 237 of file alteration_notifier.h.

void erase const Item &  key  )  [inline]
 

It notifies all the registered observers about an Item erased from the container.

Definition at line 248 of file alteration_notifier.h.

void build  )  [inline]
 

Notifies all the registered observers about the container is builded from an empty container.

Definition at line 260 of file alteration_notifier.h.

void clear  )  [inline]
 

Notifies all the registered observers about all Items are erased from the container.

Definition at line 272 of file alteration_notifier.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:58:47 2005 for LEMON by  doxygen 1.4.1