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

AlterationNotifier::ObserverBase Class Reference

#include <lemon/alteration_notifier.h>

Inheritance diagram for AlterationNotifier::ObserverBase:

Inheritance graph
[legend]
Collaboration diagram for AlterationNotifier::ObserverBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

ObserverBase is the abstract base class for the observers. It will be notified about an item was inserted into or erased from the graph.

The observer interface contains some pure virtual functions to override. The add() and erase() functions are to notify the oberver when one item is added or erased.

The build() and clear() members are to notify the observer about the container is builded from an empty container or is cleared to an empty container.

Author:
Balazs Dezso

Definition at line 73 of file alteration_notifier.h.

Public Member Functions

virtual void add (const Item &)=0
 The member function to notificate the observer about an item is added to the container.
virtual void erase (const Item &)=0
 The member function to notificate the observer about an item is erased from the container.
virtual void build ()=0
 The member function to notificate the observer about the container is builded.
virtual void clear ()=0
 The member function to notificate the observer about all items are erased from the container.

Protected Member Functions

 ObserverBase ()
 Default constructor.
void attach (AlterationNotifier &r)
 Attaches the observer into an AlterationNotifier.
void detach ()
 Detaches the observer into an AlterationNotifier.
RegistrygetRegistry () const
 Gives back a pointer to the registry what the map attached into.
bool attached () const
 Gives back true when the observer is attached into a registry.


Constructor & Destructor Documentation

ObserverBase  )  [inline, protected]
 

Default constructor for ObserverBase.

Definition at line 83 of file alteration_notifier.h.


Member Function Documentation

void attach AlterationNotifier r  )  [inline, protected]
 

This member attaches the observer into an AlterationNotifier.

Definition at line 91 of file alteration_notifier.h.

Here is the call graph for this function:

void detach  )  [inline, protected]
 

This member detaches the observer from an AlterationNotifier.

Definition at line 100 of file alteration_notifier.h.

Here is the call graph for this function:

Registry* getRegistry  )  const [inline, protected]
 

This function gives back a pointer to the registry what the map attached into.

Definition at line 112 of file alteration_notifier.h.

virtual void add const Item &   )  [pure virtual]
 

The add() member function notificates the observer about an item is added to the container. It have to be overrided in the subclasses.

virtual void erase const Item &   )  [pure virtual]
 

The erase() member function notificates the observer about an item is erased from the container. It have to be overrided in the subclasses.

virtual void build  )  [pure virtual]
 

The build() member function notificates the observer about the container is builded from an empty container. It have to be overrided in the subclasses.

Implemented in VectorMap, VectorMap< Graph, Edge, _Value >, and VectorMap< Graph, Node, _Value >.

virtual void clear  )  [pure virtual]
 

The clear() member function notificates the observer about all items are erased from the container. It have to be overrided in the subclasses.

Implemented in VectorMap, VectorMap< Graph, Edge, _Value >, and VectorMap< Graph, Node, _Value >.


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