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>

Inheritance diagram for ListGraph::SnapShot:

Inheritance graph
[legend]
Collaboration diagram for ListGraph::SnapShot:

Collaboration 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?

Definition at line 404 of file list_graph.h.

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 &)


Constructor & Destructor Documentation

SnapShot  )  [inline]
 

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

Definition at line 455 of file list_graph.h.

SnapShot ListGraph _g  )  [inline]
 

This constructor immediately makes a snapshot of the graph.

Parameters:
_g The graph we make a snapshot of.

Definition at line 460 of file list_graph.h.

~SnapShot  )  [inline]
 

Bug:
Is it necessary?

Definition at line 465 of file list_graph.h.


Member Function Documentation

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

Bug:
Exception...

Definition at line 419 of file list_graph.h.

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

Bug:
Exception...

Definition at line 428 of file list_graph.h.

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.

Definition at line 477 of file list_graph.h.

void restore  )  [inline]
 

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

Todo:
This function might be called undo().

Definition at line 492 of file list_graph.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:58:52 2005 for LEMON by  doxygen 1.4.1