Class to make a snapshot of the digraph and to restore it later.
The newly added nodes and arcs can be removed using the restore() function. This is the only way for deleting nodes and/or arcs from a SmartDigraph structure.
#include <lemon/smart_graph.h>
Public Member Functions | |
Snapshot () | |
Default constructor. | |
Snapshot (SmartDigraph &gr) | |
Constructor that immediately makes a snapshot. | |
void | save (SmartDigraph &gr) |
Make a snapshot. | |
void | restore () |
Undo the changes until a snapshot. |
Snapshot | ( | SmartDigraph & | gr | ) | [inline] |
This constructor immediately makes a snapshot of the given digraph.
void save | ( | SmartDigraph & | gr | ) | [inline] |
This function makes a snapshot of the given digraph. It can be called more than once. In case of a repeated call, the previous snapshot gets lost.
void restore | ( | ) | [inline] |
This function undos the changes until the last snapshot created by save() or Snapshot(SmartDigraph&).