class Graph

This class is a container for nodes and links. On destruction, all of them will get deleted.


std::set<Node*> V
the set of nodes (vertices)
std::set<Link*> E
the set of links (edges)


destructor: will call cleanup()
void cleanup()
deletes all nodes and links present in the above two sets, and empties said sets.


ostream& operator<<(ostream &o,const Graph &n)
Writes a representation of the graph to the given stream. Uses writeNodes<>() and writeLinks<>().
istream& operator>>(istream &i,Graph &n)
Reads back a representation of a graph from the given stream. Uses readNodes<>() and readLinks<>(), with NodeInserter and LinkInserter.