AlterationNotifier::ObserverBase Class Reference
#include <lemon/bits/alteration_notifier.h>
Inherited by ArrayMap, InDegMap [protected]
, ListGraph::SnapShot [protected]
, ListGraph::SnapShot [protected]
, OutDegMap [protected]
, and VectorMap.
Inheritance diagram for AlterationNotifier::ObserverBase:
[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 built from an empty container or is cleared to an empty container.
- Author:
- Balazs Dezso
|
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 | add (const std::vector< Item > &items) |
| The member function to notificate the observer about simulitem 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 built.
|
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.
|
Registry * | getRegistry () 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
Member Function Documentation
void detach |
( |
|
) |
[inline, protected] |
|
Registry* getRegistry |
( |
|
) |
const [inline, protected] |
|
|
This function gives back a pointer to the registry what the map attached into. |
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.
Implemented in ArrayMap, and VectorMap. |
virtual void add |
( |
const std::vector< Item > & |
items |
) |
[inline, 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.
Implemented in ArrayMap, and VectorMap. |
virtual void build |
( |
|
) |
[pure virtual] |
|
|
The build() member function notificates the observer about the container is built from an empty container. It have to be overrided in the subclasses.
Implemented in ListGraph::SnapShot, and VectorMap. |
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 ListGraph::SnapShot, and VectorMap. |
The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:16:14 2005 for LEMON by
1.4.4