SmartBpUGraph::Snapshot Class Reference

#include <lemon/smart_graph.h>

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 one Snapshot instance.
Warning:
If you do not use correctly the snapshot that can cause either broken program, invalid state of the graph, valid but not the restored graph or no change. Because the runtime performance the validity of the snapshot is not stored.


Public Member Functions

 Snapshot ()
 Default constructor.
 Snapshot (SmartBpUGraph &_g)
 Constructor that immediately makes a snapshot.
void save (SmartBpUGraph &_g)
 Make a snapshot.
void restore ()
 Undo the changes until a snapshot.


Constructor & Destructor Documentation

Snapshot (  )  [inline]

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

Snapshot ( SmartBpUGraph _g  )  [inline]

This constructor immediately makes a snapshot of the graph.

Parameters:
_g The graph we make a snapshot of.


Member Function Documentation

void save ( SmartBpUGraph _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 a snapshot created 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().


The documentation for this class was generated from the following file:
Generated on Tue Oct 31 09:51:21 2006 for LEMON by  doxygen 1.5.1