graph.h header file

This file declares the basic facilities to handle graphs: representing them in memory, manipulating them, and streaming them.

Classes:

class Node
represents a generic node, keeping track of related links and changes.
class Link
represents a generic link, keeping track of related nodes.
class Graph
holds a set of nodes and a set of links, deleting them on destruction
class NodeInserter
helper class to load nodes from a stream: inserts nodes into the given set
class LinkInserter
helper class to load links from a stream: inserts links into the given set

Functions:

attach()
utility function, links two nodes with a link
detach()
utility function, unlinks two nodes and a link
writeNodes<>()
template function to write a container of nodes to a stream
writeLinks<>()
template function to write a container of links to a stream
readNodes<>()
template function to read back nodes from a stream
readLinks<>()
template function to read back links from a stream