AlterationNotifier Class Template Reference

#include <lemon/bits/alteration_notifier.h>

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.

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


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 &item)
 Notifies all the registered observers about an Item added to the container.
void add (const std::vector< Item > &items)
 Notifies all the registered observers about more Item added to the container.
void erase (const Item &key)
 Notifies all the registered observers about an Item erased from the container.
void erase (const std::vector< Item > &items)
 Notifies all the registered observers about more Item erased from the container.
void build ()
 Notifies all the registered observers about the container is built.
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.

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.

~AlterationNotifier  )  [inline]
 

Destructor of the AlterationNotifier.


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.

void add const Item &  item  )  [inline]
 

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

void add const std::vector< Item > &  items  )  [inline]
 

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

void erase const Item &  key  )  [inline]
 

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

void erase const std::vector< Item > &  items  )  [inline]
 

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

void build  )  [inline]
 

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

void clear  )  [inline]
 

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


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:42:43 2006 for LEMON by  doxygen 1.4.6