author | athos |
Fri, 02 Apr 2004 15:59:17 +0000 | |
changeset 277 | 044f5898b769 |
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