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

ListGraph::SnapShot Class Reference

#include <lemon/list_graph.h>

Inherits AlterationNotifier::ObserverBase, and AlterationNotifier::ObserverBase.

Inheritance diagram for ListGraph::SnapShot:

Inheritance graph
[legend]
List of all members.

Detailed Description

Class to make a snapshot of the graph and to restrore to it later.

The newly added nodes and edges can be removed using the restore() function.

Warning:
Edge and node deletions cannot be restored.

SnapShots cannot be nested.

Todo:
SnapShot or Snapshot?


Public Member Functions

 SnapShot ()
 Default constructur.
 SnapShot (ListGraph &_g)
 Constructor that immediately makes a snapshot.
 ~SnapShot ()
void save (ListGraph &_g)
 Make a snapshot.
void restore ()
 Undo the changes until the last snapshot.

Protected Member Functions

virtual void erase (const Node &)
virtual void erase (const Edge &)
virtual void build ()
virtual void clear ()


Constructor & Destructor Documentation

SnapShot  )  [inline]
 

Default constructur. To actually make a snapshot you must call save().

SnapShot ListGraph _g  )  [inline]
 

This constructor immediately makes a snapshot of the graph.

Parameters:
_g The graph we make a snapshot of.

~SnapShot  )  [inline]
 

Bug:
Is it necessary?


Member Function Documentation

virtual void erase const Node &   )  [inline, protected, virtual]
 

Bug:
Exception...

virtual void erase const Edge &   )  [inline, protected, virtual]
 

Bug:
Exception...

virtual void build  )  [inline, protected, virtual]
 

Bug:
What is this used for?

Implements AlterationNotifier::ObserverBase.

virtual void clear  )  [inline, protected, virtual]
 

Bug:
What is this used for?

Implements AlterationNotifier::ObserverBase.

void save ListGraph _g  )  [inline]
 

Make a snapshot of the graph.

This function can be called more than once. In case of a repeated call, the previous snapshot gets lost.

Parameters:
_g The graph we make the snapshot of.

void restore  )  [inline]
 

Undo the changes until last snapshot created by save().

Todo:
This function might be called undo().


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:16:00 2005 for LEMON by  doxygen 1.4.4