ListDigraph::Snapshot Class Reference

#include <lemon/list_graph.h>

List of all members.


Detailed Description

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.

Warning:
Arc and node deletions and other modifications (e.g. contracting, splitting, reversing arcs or nodes) cannot be restored. These events invalidate the snapshot.

Public Member Functions

 Snapshot ()
 Default constructor.
 Snapshot (ListDigraph &_digraph)
 Constructor that immediately makes a snapshot.
void save (ListDigraph &_digraph)
 Make a snapshot.
void restore ()
 Undo the changes until the last snapshot.
bool valid () const
 Gives back true when the snapshot is valid.

Constructor & Destructor Documentation

Snapshot (  )  [inline]

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

Snapshot ( ListDigraph _digraph  )  [inline]

This constructor immediately makes a snapshot of the digraph.

Parameters:
_digraph The digraph we make a snapshot of.


Member Function Documentation

void save ( ListDigraph _digraph  )  [inline]

Make a snapshot of the digraph.

This function can be called more than once. In case of a repeated call, the previous snapshot gets lost.

Parameters:
_digraph The digraph we make the snapshot of.

void restore (  )  [inline]

Undo the changes until the last snapshot created by save().

bool valid (  )  const [inline]

Gives back true when the snapshot is valid.


The documentation for this class was generated from the following file:

Generated on Fri Jan 23 18:15:05 2009 for LEMON by  doxygen 1.5.6