1.1 --- a/src/work/alpar/list_graph.h Mon May 03 14:43:49 2004 +0000
1.2 +++ b/src/work/alpar/list_graph.h Mon May 03 17:06:38 2004 +0000
1.3 @@ -63,8 +63,8 @@
1.4 protected:
1.5 const ListGraph* G;
1.6 public:
1.7 - virtual void add(const Key k) = NULL;
1.8 - virtual void erase(const Key k) = NULL;
1.9 + virtual void add(const Key k) = 0;
1.10 + virtual void erase(const Key k) = 0;
1.11 DynMapBase(const ListGraph &_G) : G(&_G) {}
1.12 virtual ~DynMapBase() {}
1.13 friend class ListGraph;
1.14 @@ -763,8 +763,8 @@
1.15 protected:
1.16 const NodeSet* G;
1.17 public:
1.18 - virtual void add(const Key k) = NULL;
1.19 - virtual void erase(const Key k) = NULL;
1.20 + virtual void add(const Key k) = 0;
1.21 + virtual void erase(const Key k) = 0;
1.22 DynMapBase(const NodeSet &_G) : G(&_G) {}
1.23 virtual ~DynMapBase() {}
1.24 friend class NodeSet;
1.25 @@ -1152,8 +1152,10 @@
1.26
1.27 NodeGraphType &G;
1.28
1.29 + public:
1.30 class Node;
1.31 -
1.32 +
1.33 + private:
1.34 //Edges are double linked.
1.35 //The free edges are only single linked using the "next_in" field.
1.36 struct NodeT
1.37 @@ -1170,7 +1172,7 @@
1.38 };
1.39
1.40
1.41 - typename NodeGraphType::NodeMap<NodeT> nodes;
1.42 + typename NodeGraphType::template NodeMap<NodeT> nodes;
1.43
1.44 std::vector<EdgeT> edges;
1.45 //The first free edge
1.46 @@ -1183,8 +1185,8 @@
1.47 protected:
1.48 const EdgeSet* G;
1.49 public:
1.50 - virtual void add(const Key k) = NULL;
1.51 - virtual void erase(const Key k) = NULL;
1.52 + virtual void add(const Key k) = 0;
1.53 + virtual void erase(const Key k) = 0;
1.54 DynMapBase(const EdgeSet &_G) : G(&_G) {}
1.55 virtual ~DynMapBase() {}
1.56 friend class EdgeSet;
1.57 @@ -1449,13 +1451,14 @@
1.58 NodeIt m;
1.59 for(G.first(m);
1.60 G.valid(m) && G.nodes[m].first_in == -1; G.next(m));
1.61 - n = G.valid(m)?-1:G.nodes[m].first_in;
1.62 + //AJJAJ! This is a non sense!!!!!!!
1.63 + this->n = G.valid(m)?-1:G.nodes[m].first_in;
1.64 }
1.65 EdgeIt (Invalid i) : Edge(i) { }
1.66 EdgeIt() : Edge() { }
1.67 ///\bug This is a workaround until somebody tells me how to
1.68 ///make class \c SymEdgeSet::SymEdgeMap friend of Edge
1.69 - int &idref() {return n;}
1.70 + int &idref() {return this->n;}
1.71 };
1.72
1.73 class OutEdgeIt : public Edge {
1.74 @@ -1475,22 +1478,23 @@
1.75 InEdgeIt(const EdgeSet& G,Node v) :Edge(nodes[v].first_in) { }
1.76 };
1.77
1.78 - template <typename T> class NodeMap : public NodeGraphType::NodeMap<T>
1.79 + template <typename T> class NodeMap :
1.80 + public NodeGraphType::template NodeMap<T>
1.81 {
1.82 public:
1.83 NodeMap(const EdgeSet &_G) :
1.84 - NodeGraphType::NodeMap<T>(_G.G) { }
1.85 + NodeGraphType::NodeMap(_G.G) { } //AJAJJ <T> would be wrong!!!
1.86 NodeMap(const EdgeSet &_G,const T &t) :
1.87 - NodeGraphType::NodeMap<T>(_G.G,t) { }
1.88 + NodeGraphType::NodeMap(_G.G,t) { }
1.89 //It is unnecessary
1.90 - NodeMap(const typename NodeGraphType::NodeMap<T> &m)
1.91 - : NodeGraphType::NodeMap<T>(m) { }
1.92 + NodeMap(const typename NodeGraphType::template NodeMap<T> &m) :
1.93 + NodeGraphType::NodeMap(m) { }
1.94
1.95 ///\todo It can copy between different types.
1.96 ///
1.97 template<typename TT>
1.98 - NodeMap(const typename NodeGraphType::NodeMap<TT> &m)
1.99 - : NodeGraphType::NodeMap<T>(m) { }
1.100 + NodeMap(const typename NodeGraphType::template NodeMap<TT> &m)
1.101 + : NodeGraphType::NodeMap(m) { }
1.102 };
1.103
1.104 template <typename T> class EdgeMap : public DynMapBase<Edge>