AlterationNotifier::ObserverBase Class Reference
#include <lemon/bits/alteration_notifier.h>
Inherited by ArrayMap, DynamicMatrixMap [protected]
, DynamicSymMatrixMap [protected]
, InDegMap [protected]
, ListGraph::Snapshot [protected]
, ListGraph::Snapshot [protected]
, OutDegMap [protected]
, StaticMap, 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
|
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.
|
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 more 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 | erase (const std::vector< Item > &items) |
| The member function to notificate the observer about more 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.
|
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 & |
|
) |
[protected, 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, StaticMap, and VectorMap. |
virtual void add |
( |
const std::vector< Item > & |
items |
) |
[inline, protected, virtual] |
|
|
The add() member function notificates the observer about more item is added to the container. It have to be overrided in the subclasses.
Reimplemented in VectorMap. |
virtual void erase |
( |
const Item & |
|
) |
[protected, 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, StaticMap, and VectorMap. |
virtual void erase |
( |
const std::vector< Item > & |
items |
) |
[inline, protected, virtual] |
|
|
The erase() member function notificates the observer about more item is erased from the container. It have to be overrided in the subclasses.
Reimplemented in VectorMap. |
virtual void build |
( |
|
) |
[protected, pure virtual] |
|
virtual void clear |
( |
|
) |
[protected, pure virtual] |
|
The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:42:44 2006 for LEMON by
1.4.6