author | athos |
Mon, 05 Apr 2004 14:56:32 +0000 | |
changeset 299 | 54e8905344ba |
child 336 | 8ff3b3e05478 |
permissions | -rw-r--r-- |
1 #ifndef EDGE_MAP_BASE_H
2 #define EDGE_MAP_BASE_H
4 template <class G, class K>
5 class EdgeMapBase {
6 public:
7 typedef G Graph;
8 typedef K KeyType;
11 MapBase() : graph(0) {}
12 MapBase(Graph& g) : graph(&g) {graph.edge_maps.add(*this);}
14 virtual ~MapBase() {graph.edge_maps.erase(*this);}
16 protected:
18 Graph* graph;
20 int graph_index;
23 virtual void add(const KeyType&) = 0;
24 virtual void erase(const KeyType&) = 0;
26 friend class Graph;
27 };
29 #endif