diff -r 2edd8cd06eaf -r f0c48d7fa73d src/lemon/graph_reader.h --- a/src/lemon/graph_reader.h Wed Apr 27 10:42:58 2005 +0000 +++ b/src/lemon/graph_reader.h Wed Apr 27 10:44:58 2005 +0000 @@ -200,38 +200,38 @@ /// GraphReader reader(std::cin, graph); /// \endcode /// - /// The \c addNodeMap() function reads a map from the \c \@nodeset section. + /// The \c readNodeMap() function reads a map from the \c \@nodeset section. /// If there is a map that you do not want to read from the file and there is /// whitespace in the string represenation of the values then you should /// call the \c skipNodeMap() template member function with proper /// parameters. /// /// \code - /// reader.addNodeMap("x-coord", xCoordMap); - /// reader.addNodeMap("y-coord", yCoordMap); + /// reader.readNodeMap("x-coord", xCoordMap); + /// reader.readNodeMap("y-coord", yCoordMap); /// - /// reader.addNodeMap("label", labelMap); + /// reader.readNodeMap("label", labelMap); /// reader.skipNodeMap("description"); /// - /// reader.addNodeMap("color", colorMap); + /// reader.readNodeMap("color", colorMap); /// \endcode /// - /// With the \c addEdgeMap() member function you can give an edge map + /// With the \c readEdgeMap() member function you can give an edge map /// reading command similar to the NodeMaps. /// /// \code - /// reader.addEdgeMap("weight", weightMap); - /// reader.addEdgeMap("label", labelMap); + /// reader.readEdgeMap("weight", weightMap); + /// reader.readEdgeMap("label", labelMap); /// \endcode /// - /// With \c addNode() and \c addEdge() functions you can read labeled Nodes + /// With \c readNode() and \c readEdge() functions you can read labeled Nodes /// and Edges. /// /// \code - /// reader.addNode("source", sourceNode); - /// reader.addNode("target", targetNode); + /// reader.readNode("source", sourceNode); + /// reader.readNode("target", targetNode); /// - /// reader.addEdge("observed", edge); + /// reader.readEdge("observed", edge); /// \endcode /// /// After you give all read commands you must call the \c run() member @@ -285,8 +285,8 @@ /// /// Add a new node map reader command for the reader. template - GraphReader& addNodeMap(std::string name, Map& map) { - return addNodeMap, Map>(name, map); } @@ -294,7 +294,7 @@ /// /// Add a new node map reader command for the reader. template - GraphReader& addNodeMap(std::string name, Map& map, + GraphReader& readNodeMap(std::string name, Map& map, const Reader& reader = Reader()) { if (node_map_readers.find(name) != node_map_readers.end()) { ErrorMessage msg; @@ -326,8 +326,8 @@ /// /// Add a new edge map reader command for the reader. template - GraphReader& addEdgeMap(std::string name, Map& map) { - return addEdgeMap, Map>(name, map); } @@ -336,7 +336,7 @@ /// /// Add a new edge map reader command for the reader. template - GraphReader& addEdgeMap(std::string name, Map& map, + GraphReader& readEdgeMap(std::string name, Map& map, const Reader& reader = Reader()) { if (edge_map_readers.find(name) != edge_map_readers.end()) { ErrorMessage msg; @@ -367,7 +367,7 @@ /// \brief Add a new labeled node reader for the reader. /// /// Add a new labeled node reader for the reader. - GraphReader& addNode(std::string name, Node& node) { + GraphReader& readNode(std::string name, Node& node) { if (node_readers.find(name) != node_readers.end()) { ErrorMessage msg; msg << "Multiple read rule for node: " << name; @@ -380,7 +380,7 @@ /// \brief Add a new labeled edge reader for the reader. /// /// Add a new labeled edge reader for the reader. - GraphReader& addEdge(std::string name, Edge& edge) { + GraphReader& readEdge(std::string name, Edge& edge) { if (edge_readers.find(name) != edge_readers.end()) { ErrorMessage msg; msg << "Multiple read rule for edge: " << name; @@ -754,10 +754,10 @@ typename Graph::Node &s, typename Graph::Node &t, CostMap& cost) { GraphReader reader(is, g); - reader.addEdgeMap("capacity", capacity); - reader.addEdgeMap("cost", cost); - reader.addNode("source", s); - reader.addNode("target", t); + reader.readEdgeMap("capacity", capacity); + reader.readEdgeMap("cost", cost); + reader.readNode("source", s); + reader.readNode("target", t); reader.run(); } @@ -773,9 +773,9 @@ void readGraph(std::istream& is, Graph &g, CapacityMap& capacity, typename Graph::Node &s, typename Graph::Node &t) { GraphReader reader(is, g); - reader.addEdgeMap("capacity", capacity); - reader.addNode("source", s); - reader.addNode("target", t); + reader.readEdgeMap("capacity", capacity); + reader.readNode("source", s); + reader.readNode("target", t); reader.run(); } @@ -790,8 +790,8 @@ void readGraph(std::istream& is, Graph &g, CapacityMap& capacity, typename Graph::Node &s) { GraphReader reader(is, g); - reader.addEdgeMap("capacity", capacity); - reader.addNode("source", s); + reader.readEdgeMap("capacity", capacity); + reader.readNode("source", s); reader.run(); } @@ -804,7 +804,7 @@ template void readGraph(std::istream& is, Graph &g, CapacityMap& capacity) { GraphReader reader(is, g); - reader.addEdgeMap("capacity", capacity); + reader.readEdgeMap("capacity", capacity); reader.run(); }