diff -r 1b41ebb5fee5 -r 769f31e9f7b0 src/include/skeletons/graph.h --- a/src/include/skeletons/graph.h Fri Apr 30 19:02:40 2004 +0000 +++ b/src/include/skeletons/graph.h Mon May 03 07:27:29 2004 +0000 @@ -1,6 +1,6 @@ // -*- c++ -*- -#ifndef HUGO_GRAPH_H -#define HUGO_GRAPH_H +#ifndef HUGO_SKELETON_GRAPH_H +#define HUGO_SKELETON_GRAPH_H ///\file ///\brief Declaration of GraphSkeleton. @@ -58,13 +58,13 @@ /// Two iterators are equal if and only if they point to the /// same object or both are invalid. - bool operator==(Node n) const { return true; } + bool operator==(Node) const { return true; } /// \sa \ref operator==(Node n) /// - bool operator!=(Node n) const { return true; } + bool operator!=(Node) const { return true; } - bool operator<(Node n) const { return true; } + bool operator<(Node) const { return true; } }; /// This iterator goes through each node. @@ -90,7 +90,7 @@ NodeIt(const GraphSkeleton &G) {} /// @warning The default constructor sets the iterator /// to an undefined value. - NodeIt(const NodeIt &) {} + NodeIt(const NodeIt &n) : Node(n) {} }; @@ -104,9 +104,9 @@ Edge(Invalid) {} /// Two iterators are equal if and only if they point to the /// same object or both are invalid. - bool operator==(Edge n) const { return true; } - bool operator!=(Edge n) const { return true; } - bool operator<(Edge n) const { return true; } + bool operator==(Edge) const { return true; } + bool operator!=(Edge) const { return true; } + bool operator<(Edge) const { return true; } }; /// This iterator goes trough the outgoing edges of a node. @@ -187,9 +187,9 @@ NodeIt &first(NodeIt &i) const { return i;} /// The first incoming edge. - InEdgeIt &first(InEdgeIt &i, Node n) const { return i;} + InEdgeIt &first(InEdgeIt &i, Node) const { return i;} /// The first outgoing edge. - OutEdgeIt &first(OutEdgeIt &i, Node n) const { return i;} + OutEdgeIt &first(OutEdgeIt &i, Node) const { return i;} // SymEdgeIt &first(SymEdgeIt &, Node) const { return i;} /// The first edge of the Graph. EdgeIt &first(EdgeIt &i) const { return i;} @@ -258,7 +258,7 @@ ///Add a new edge to the graph with tail node \c tail ///and head node \c head. ///\return the new edge. - Edge addEdge(Node tail, Node head) { return INVALID;} + Edge addEdge(Node, Node) { return INVALID;} /// Resets the graph. @@ -294,11 +294,11 @@ /// Sets the value associated with node \c i to the value \c t. /// - void set(Node i, T t) {} - /// Gets the value of a node. - T get(Node i) const {return *(T*)0;} //FIXME: Is it necessary - T &operator[](Node i) {return *(T*)0;} - const T &operator[](Node i) const {return *(T*)0;} + void set(Node, T) {} + // Gets the value of a node. + //T get(Node i) const {return *(T*)0;} //FIXME: Is it necessary? + T &operator[](Node) {return *(T*)0;} + const T &operator[](Node) const {return *(T*)0;} /// Updates the map if the graph has been changed @@ -326,9 +326,14 @@ EdgeMap(const GraphSkeleton &G) {} EdgeMap(const GraphSkeleton &G, T t) {} - void set(Edge i, T t) {} - T get(Edge i) const {return *(T*)0;} - T &operator[](Edge i) {return *(T*)0;} + ///\todo It can copy between different types. + /// + template EdgeMap(const EdgeMap &m) {} + + void set(Edge, T) {} + //T get(Edge) const {return *(T*)0;} + T &operator[](Edge) {return *(T*)0;} + const T &operator[](Edge) const {return *(T*)0;} void update() {} void update(T a) {} //FIXME: Is it necessary @@ -391,4 +396,4 @@ // } -#endif // HUGO_GRAPH_H +#endif // HUGO_SKELETON_GRAPH_H