0
3
0
... | ... |
@@ -751,6 +751,9 @@ |
751 | 751 |
/// |
752 | 752 |
/// This function undos the changes until the last snapshot |
753 | 753 |
/// created by save() or Snapshot(ListDigraph&). |
754 |
/// |
|
755 |
/// \warning This method invalidates the snapshot, i.e. repeated |
|
756 |
/// restoring is not supported unless you call save() again. |
|
754 | 757 |
void restore() { |
755 | 758 |
detach(); |
756 | 759 |
for(std::list<Arc>::iterator it = added_arcs.begin(); |
... | ... |
@@ -1550,6 +1553,9 @@ |
1550 | 1553 |
/// |
1551 | 1554 |
/// This function undos the changes until the last snapshot |
1552 | 1555 |
/// created by save() or Snapshot(ListGraph&). |
1556 |
/// |
|
1557 |
/// \warning This method invalidates the snapshot, i.e. repeated |
|
1558 |
/// restoring is not supported unless you call save() again. |
|
1553 | 1559 |
void restore() { |
1554 | 1560 |
detach(); |
1555 | 1561 |
for(std::list<Edge>::iterator it = added_edges.begin(); |
... | ... |
@@ -286,6 +286,14 @@ |
286 | 286 |
G.addArc(G.addNode(), G.addNode()); |
287 | 287 |
|
288 | 288 |
snapshot.restore(); |
289 |
snapshot.save(G); |
|
290 |
|
|
291 |
checkGraphNodeList(G, 4); |
|
292 |
checkGraphArcList(G, 4); |
|
293 |
|
|
294 |
G.addArc(G.addNode(), G.addNode()); |
|
295 |
|
|
296 |
snapshot.restore(); |
|
289 | 297 |
|
290 | 298 |
checkGraphNodeList(G, 4); |
291 | 299 |
checkGraphArcList(G, 4); |
... | ... |
@@ -259,6 +259,15 @@ |
259 | 259 |
G.addEdge(G.addNode(), G.addNode()); |
260 | 260 |
|
261 | 261 |
snapshot.restore(); |
262 |
snapshot.save(G); |
|
263 |
|
|
264 |
checkGraphNodeList(G, 4); |
|
265 |
checkGraphEdgeList(G, 3); |
|
266 |
checkGraphArcList(G, 6); |
|
267 |
|
|
268 |
G.addEdge(G.addNode(), G.addNode()); |
|
269 |
|
|
270 |
snapshot.restore(); |
|
262 | 271 |
|
263 | 272 |
checkGraphNodeList(G, 4); |
264 | 273 |
checkGraphEdgeList(G, 3); |
0 comments (0 inline)