#include <lemon/bits/alteration_notifier.h>
Inherited by AlterableSplitGraphAdaptor< _Graph, typename enable_if< typename _Graph::NodeNotifier::Notifier >::type, EdgeEnable >::NodeNotifierProxy, AlterableSplitGraphAdaptor< _Graph, typename enable_if< typename _Graph::NodeNotifier::Notifier >::type, typename enable_if< typename _Graph::EdgeNotifier::Notifier >::type >::EdgeNotifierProxy, AlterableSplitGraphAdaptor< _Graph, typename enable_if< typename _Graph::NodeNotifier::Notifier >::type, typename enable_if< typename _Graph::EdgeNotifier::Notifier >::type >::NodeNotifierProxy, AlterableUndirGraphAdaptor< _Graph, typename enable_if< typename _Graph::EdgeNotifier::Notifier >::type >::NotifierProxy, ListBpUGraph::Snapshot::NodeObserverProxy, ListGraph::Snapshot::NodeObserverProxy, and ListUGraph::Snapshot::NodeObserverProxy.
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.
Protected Member Functions | |
ObserverBase () | |
Default constructor. | |
ObserverBase (AlterationNotifier &_notifier) | |
Constructor which attach the observer into notifier. | |
ObserverBase (const ObserverBase ©) | |
Constructor which attach the obserever to the same notifier. | |
virtual | ~ObserverBase () |
Destructor. | |
void | attach (AlterationNotifier &_notifier) |
Attaches the observer into an AlterationNotifier. | |
void | detach () |
Detaches the observer into an AlterationNotifier. | |
Notifier * | getNotifier () const |
Gives back a pointer to the notifier which the map attached into. | |
bool | attached () const |
Gives back true when the observer is attached into a notifier. | |
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 () |
The member function to notificate the observer about the container is built. | |
virtual void | clear () |
The member function to notificate the observer about all items are erased from the container. |
ObserverBase | ( | ) | [inline, protected] |
Default constructor for ObserverBase.
ObserverBase | ( | AlterationNotifier & | _notifier | ) | [inline, protected] |
Constructor which attach the observer into notifier.
ObserverBase | ( | const ObserverBase & | copy | ) | [inline, protected] |
Constructor which attach the obserever to the same notifier as the other observer is attached to.
void attach | ( | AlterationNotifier & | _notifier | ) | [inline, protected] |
This member attaches the observer into an AlterationNotifier.
void detach | ( | ) | [inline, protected] |
This member detaches the observer from an AlterationNotifier.
Notifier* getNotifier | ( | ) | const [inline, protected] |
This function gives back a pointer to the notifier which 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.
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.
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.
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.
virtual void build | ( | ) | [inline, protected, 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.
virtual void clear | ( | ) | [inline, protected, virtual] |
The clear() member function notificates the observer about all items are erased from the container. It have to be overrided in the subclasses.