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

SmartGraph::SnapShot Class Reference

#include <lemon/smart_graph.h>

Collaboration diagram for SmartGraph::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.

Note:
After you restore a state, you cannot restore a later state, in other word you cannot add again the edges deleted by restore() using another SnapShot instance.

Definition at line 295 of file smart_graph.h.

Public Member Functions

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


Constructor & Destructor Documentation

SnapShot  )  [inline]
 

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

Definition at line 308 of file smart_graph.h.

SnapShot SmartGraph _g  )  [inline]
 

This constructor immediately makes a snapshot of the graph.

Parameters:
_g The graph we make a snapshot of.

Definition at line 313 of file smart_graph.h.


Member Function Documentation

void save SmartGraph _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 325 of file smart_graph.h.

void restore  )  [inline]
 

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

Parameters:
s an internal stucture given back by save()
Note:
After you restored a state, you cannot restore a later state, in other word you cannot add again the edges deleted by restore().
Todo:
This function might be called undo().

Definition at line 343 of file smart_graph.h.


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