Snapshot Class Reference


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.
#include <lemon/smart_graph.h>

List of all members.

Public Member Functions

 Snapshot ()
 Default constructor.
 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 constructor. To actually make a snapshot you must call save().

Snapshot ( SmartGraph _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 ( 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.

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().


Generated on Thu Jun 4 04:06:40 2009 for LEMON by  doxygen 1.5.9