1.1 --- a/src/work/deba/edge_map_registry.h Fri Apr 16 13:26:15 2004 +0000
1.2 +++ b/src/work/deba/edge_map_registry.h Fri Apr 16 13:42:03 2004 +0000
1.3 @@ -3,20 +3,22 @@
1.4
1.5 #include <vector>
1.6
1.7 +#include "edge_map_base.h"
1.8 +
1.9 template <typename G, typename E>
1.10 class EdgeMapRegistry {
1.11 public:
1.12 typedef G Graph;
1.13 typedef E Edge
1.14
1.15 - typedef EdgeMapBase<Graph, Edge> EdgeMapBase;
1.16 + typedef EdgeMapBase<Graph, Edge> MapBase;
1.17
1.18 protected:
1.19 typedef std::vector<EdgeMapBase*> Container;
1.20
1.21 Container container;
1.22
1.23 - void add(EdgeMapBase& map_base) {
1.24 + void add(MapBase& map_base) {
1.25 if (map_base.graph) {
1.26 map_base.graph->edge_maps.erase(map_base);
1.27 }
1.28 @@ -25,7 +27,7 @@
1.29 map_base.graph_index = container.size()-1;
1.30 }
1.31
1.32 - void erase(EdgeMapBase& map_base) {
1.33 + void erase(MapBase& map_base) {
1.34 if (map_base.graph != this) return;
1.35 container.back()->graph_index = map_base.graph_index;
1.36 container[map_base.graph_index] = container.back();
1.37 @@ -33,21 +35,21 @@
1.38 map_base.graph = 0;
1.39 }
1.40
1.41 - void addEdge(Edge& edge) {
1.42 + void add(Edge& edge) {
1.43 typename Container::iterator it;
1.44 for (it = container.begin(); it != container.end(); ++it) {
1.45 (*it)->add(edge);
1.46 }
1.47 }
1.48
1.49 - void eraseEdge(Edge& edge) {
1.50 + void erase(Edge& edge) {
1.51 typename Container::iterator it;
1.52 for (it = container.begin(); it != container.end(); ++it) {
1.53 (*it)->erase(edge);
1.54 }
1.55 }
1.56
1.57 - friend class EdgeMapBase;
1.58 + friend class MapBase;
1.59 };
1.60
1.61 #endif