Class to make a snapshot of the digraph and restore it later.
The newly added nodes and arcs can be removed using the restore() function.
#include <lemon/list_graph.h>
Public Member Functions | |
| Snapshot () | |
| Default constructor. | |
| Snapshot (ListDigraph &gr) | |
| Constructor that immediately makes a snapshot. | |
| void | save (ListDigraph &gr) |
| Make a snapshot. | |
| void | restore () |
| Undo the changes until the last snapshot. | |
| bool | valid () const |
Returns true if the snapshot is valid. | |
| Snapshot | ( | ListDigraph & | gr | ) | [inline] |
This constructor immediately makes a snapshot of the given digraph.
| void save | ( | ListDigraph & | 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(ListDigraph&).
| bool valid | ( | ) | const [inline] |
This function returns true if the snapshot is valid.
1.7.3