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.


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 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 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 Fri Feb 3 18:42:06 2006 for LEMON by  doxygen 1.4.6