diff -r 8f589de42c76 -r 7d028a73d7f2 lemon/graph_reader.h --- a/lemon/graph_reader.h Mon Jul 04 17:51:07 2005 +0000 +++ b/lemon/graph_reader.h Tue Jul 05 14:36:10 2005 +0000 @@ -36,19 +36,21 @@ /// The \c GraphReader class provides the graph input. /// Before you read this documentation it might be useful to read the general /// description of \ref graph-io-page "Graph Input-Output". + /// /// If you don't need very sophisticated /// behaviour then you can use the versions of the public function /// \ref readGraph() to read a graph (or a max flow instance etc). /// - /// The given file format may contain several maps and labeled nodes or + /// The file to be read may contain several maps and labeled nodes or /// edges. /// /// If you read a graph you need not read all the maps and items just those /// that you need. The interface of the \c GraphReader is very similar to /// the GraphWriter but the reading method does not depend on the order the - /// given commands. + /// given commands (i.e. you don't have to insist on the order in which the + /// maps are given in the file). /// - /// The reader object suppose that each not readed value does not contain + /// The reader object assumes that not readed values do not contain /// whitespaces, therefore it has some extra possibilities to control how /// it should skip the values when the string representation contains spaces. /// @@ -90,11 +92,11 @@ /// \endcode /// /// With the \c readAttribute() functions you can read an attribute - /// in a variable. You can specify the reader for the attribute as + /// into a variable. You can specify the reader for the attribute as /// the nodemaps. /// /// After you give all read commands you must call the \c run() member - /// function, which execute all the commands. + /// function, which executes all the commands. /// /// \code /// reader.run(); @@ -119,7 +121,7 @@ /// \brief Construct a new GraphReader. /// /// Construct a new GraphReader. It reads into the given graph - /// and it use the given reader as the default skipper. + /// and it uses the given reader as the default skipper. GraphReader(std::istream& _is, typename SmartParameter::Type _graph, const DefaultSkipper& _skipper = DefaultSkipper()) @@ -134,7 +136,7 @@ /// \brief Construct a new GraphReader. /// /// Construct a new GraphReader. It reads into the given graph - /// and it use the given reader as the default skipper. + /// and it uses the given reader as the default skipper. GraphReader(const std::string& _filename, typename SmartParameter::Type _graph, const DefaultSkipper& _skipper = DefaultSkipper()) @@ -150,7 +152,7 @@ /// \brief Construct a new GraphReader. /// /// Construct a new GraphReader. It reads into the given graph - /// and it use the given reader as the default skipper. + /// and it uses the given reader as the default skipper. GraphReader(LemonReader& _reader, typename SmartParameter::Type _graph, const DefaultSkipper& _skipper = DefaultSkipper()) @@ -170,9 +172,9 @@ delete reader; } - /// \brief Add a new node map reader command for the reader. + /// \brief Give a new node map reading command to the reader. /// - /// Add a new node map reader command for the reader. + /// Give a new node map reading command to the reader. template GraphReader& readNodeMap(std::string name, Map& map) { nodeset_reader.readNodeMap(name, map); @@ -185,9 +187,9 @@ return *this; } - /// \brief Add a new node map reader command for the reader. + /// \brief Give a new node map reading command to the reader. /// - /// Add a new node map reader command for the reader. + /// Give a new node map reading command to the reader. template GraphReader& readNodeMap(std::string name, Map& map, const Reader& reader = Reader()) { @@ -202,9 +204,9 @@ return *this; } - /// \brief Add a new node map skipper command for the reader. + /// \brief Give a new node map skipping command to the reader. /// - /// Add a new node map skipper command for the reader. + /// Give a new node map skipping command to the reader. template GraphReader& skipNodeMap(std::string name, const Reader& reader = Reader()) { @@ -212,9 +214,9 @@ return *this; } - /// \brief Add a new edge map reader command for the reader. + /// \brief Give a new edge map reading command to the reader. /// - /// Add a new edge map reader command for the reader. + /// Give a new edge map reading command to the reader. template GraphReader& readEdgeMap(std::string name, Map& map) { edgeset_reader.readEdgeMap(name, map); @@ -228,9 +230,9 @@ } - /// \brief Add a new edge map reader command for the reader. + /// \brief Give a new edge map reading command to the reader. /// - /// Add a new edge map reader command for the reader. + /// Give a new edge map reading command to the reader. template GraphReader& readEdgeMap(std::string name, Map& map, const Reader& reader = Reader()) { @@ -245,9 +247,9 @@ return *this; } - /// \brief Add a new edge map skipper command for the reader. + /// \brief Give a new edge map skipping command to the reader. /// - /// Add a new edge map skipper command for the reader. + /// Give a new edge map skipping command to the reader. template GraphReader& skipEdgeMap(std::string name, const Reader& reader = Reader()) { @@ -255,34 +257,34 @@ return *this; } - /// \brief Add a new labeled node reader for the reader. + /// \brief Give a new labeled node reading command to the reader. /// - /// Add a new labeled node reader for the reader. + /// Give a new labeled node reading command to the reader. GraphReader& readNode(std::string name, Node& node) { node_reader.readNode(name, node); return *this; } - /// \brief Add a new labeled edge reader for the reader. + /// \brief Give a new labeled edge reading command to the reader. /// - /// Add a new labeled edge reader for the reader. + /// Give a new labeled edge reading command to the reader. GraphReader& readEdge(std::string name, Edge& edge) { edge_reader.readEdge(name, edge); return *this; } - /// \brief Add a new attribute reader command. + /// \brief Give a new attribute reading command. /// - /// Add a new attribute reader command. + /// Give a new attribute reading command. template GraphReader& readAttribute(std::string name, Value& value) { attribute_reader.readAttribute(name, value); return *this; } - /// \brief Add a new attribute reader command. + /// \brief Give a new attribute reading command. /// - /// Add a new attribute reader command. + /// Give a new attribute reading command. template GraphReader& readAttribute(std::string name, Value& value, const Reader& reader) { @@ -292,17 +294,17 @@ /// \brief Conversion operator to LemonReader. /// - /// Conversion operator to LemonReader. It make possible - /// to access the encapsulated \e LemonReader, this way - /// you can attach to this reader new instances of - /// \e LemonReader::SectionReader. + /// Conversion operator to LemonReader. It makes possible to access the + /// encapsulated \e LemonReader, this way you can attach to this reader + /// new instances of \e LemonReader::SectionReader. For more details see + /// the \ref rwbackground "Background of Reading and Writing". operator LemonReader&() { return *reader; } - /// \brief Executes the reader commands. + /// \brief Executes the reading commands. /// - /// Executes the reader commands. + /// Executes the reading commands. void run() { reader->run(); } @@ -432,13 +434,21 @@ /// \brief The undir graph reader class. /// + /// The \c UndirGraphReader class provides the graph input. + /// Before you read this documentation it might be useful to read the general + /// description of \ref graph-io-page "Graph Input-Output". + /// + /// If you don't need very sophisticated + /// behaviour then you can use the versions of the public function + /// \ref readGraph() to read a graph (or a max flow instance etc). + /// /// The given file format may contain several maps and labeled nodes or /// edges. /// /// If you read a graph you need not read all the maps and items just those - /// that you need. The interface of the \c GraphReader is very similar to - /// the GraphWriter but the reading method does not depend on the order the - /// given commands. + /// that you need. The interface of the \c UndirGraphReader is very similar + /// to the UndirGraphWriter but the reading method does not depend on the + /// order of the given commands. /// /// The reader object suppose that each not readed value does not contain /// whitespaces, therefore it has some extra possibilities to control how @@ -569,9 +579,9 @@ delete reader; } - /// \brief Add a new node map reader command for the reader. + /// \brief Give a new node map reading command to the reader. /// - /// Add a new node map reader command for the reader. + /// Give a new node map reading command to the reader. template UndirGraphReader& readNodeMap(std::string name, Map& map) { nodeset_reader.readNodeMap(name, map); @@ -584,9 +594,9 @@ return *this; } - /// \brief Add a new node map reader command for the reader. + /// \brief Give a new node map reading command to the reader. /// - /// Add a new node map reader command for the reader. + /// Give a new node map reading command to the reader. template UndirGraphReader& readNodeMap(std::string name, Map& map, const Reader& reader = Reader()) { @@ -601,9 +611,9 @@ return *this; } - /// \brief Add a new node map skipper command for the reader. + /// \brief Give a new node map skipping command to the reader. /// - /// Add a new node map skipper command for the reader. + /// Give a new node map skipping command to the reader. template UndirGraphReader& skipNodeMap(std::string name, const Reader& reader = Reader()) { @@ -611,9 +621,9 @@ return *this; } - /// \brief Add a new undirected edge map reader command for the reader. + /// \brief Give a new undirected edge map reading command to the reader. /// - /// Add a new undirected edge map reader command for the reader. + /// Give a new undirected edge map reading command to the reader. template UndirGraphReader& readUndirEdgeMap(std::string name, Map& map) { undir_edgeset_reader.readUndirEdgeMap(name, map); @@ -627,9 +637,9 @@ } - /// \brief Add a new undirected edge map reader command for the reader. + /// \brief Give a new undirected edge map reading command to the reader. /// - /// Add a new undirected edge map reader command for the reader. + /// Give a new undirected edge map reading command to the reader. template UndirGraphReader& readUndirEdgeMap(std::string name, Map& map, const Reader& reader = Reader()) { @@ -644,9 +654,9 @@ return *this; } - /// \brief Add a new undirected edge map skipper command for the reader. + /// \brief Give a new undirected edge map skipping command to the reader. /// - /// Add a new undirected edge map skipper command for the reader. + /// Give a new undirected edge map skipping command to the reader. template UndirGraphReader& skipUndirEdgeMap(std::string name, const Reader& reader = Reader()) { @@ -655,9 +665,9 @@ } - /// \brief Add a new edge map reader command for the reader. + /// \brief Give a new edge map reading command to the reader. /// - /// Add a new edge map reader command for the reader. + /// Give a new edge map reading command to the reader. template UndirGraphReader& readEdgeMap(std::string name, Map& map) { undir_edgeset_reader.readEdgeMap(name, map); @@ -671,9 +681,9 @@ } - /// \brief Add a new edge map reader command for the reader. + /// \brief Give a new edge map reading command to the reader. /// - /// Add a new edge map reader command for the reader. + /// Give a new edge map reading command to the reader. template UndirGraphReader& readEdgeMap(std::string name, Map& map, const Reader& reader = Reader()) { @@ -688,9 +698,9 @@ return *this; } - /// \brief Add a new edge map skipper command for the reader. + /// \brief Give a new edge map skipping command to the reader. /// - /// Add a new edge map skipper command for the reader. + /// Give a new edge map skipping command to the reader. template UndirGraphReader& skipEdgeMap(std::string name, const Reader& reader = Reader()) { @@ -698,40 +708,41 @@ return *this; } - /// \brief Add a new labeled node reader for the reader. + /// \brief Give a new labeled node reading command to the reader. /// - /// Add a new labeled node reader for the reader. + /// Give a new labeled node reading command to the reader. UndirGraphReader& readNode(std::string name, Node& node) { node_reader.readNode(name, node); return *this; } - /// \brief Add a new labeled edge reader for the reader. + /// \brief Give a new labeled edge reading command to the reader. /// - /// Add a new labeled edge reader for the reader. + /// Give a new labeled edge reading command to the reader. UndirGraphReader& readEdge(std::string name, Edge& edge) { undir_edge_reader.readEdge(name, edge); } - /// \brief Add a new labeled undirected edge reader for the reader. + /// \brief Give a new labeled undirected edge reading command to the + /// reader. /// - /// Add a new labeled undirected edge reader for the reader. + /// Give a new labeled undirected edge reading command to the reader. UndirGraphReader& readUndirEdge(std::string name, UndirEdge& edge) { undir_edge_reader.readUndirEdge(name, edge); } - /// \brief Add a new attribute reader command. + /// \brief Give a new attribute reading command. /// - /// Add a new attribute reader command. + /// Give a new attribute reading command. template UndirGraphReader& readAttribute(std::string name, Value& value) { attribute_reader.readAttribute(name, value); return *this; } - /// \brief Add a new attribute reader command. + /// \brief Give a new attribute reading command. /// - /// Add a new attribute reader command. + /// Give a new attribute reading command. template UndirGraphReader& readAttribute(std::string name, Value& value, const Reader& reader) { @@ -749,9 +760,9 @@ return *reader; } - /// \brief Executes the reader commands. + /// \brief Executes the reading commands. /// - /// Executes the reader commands. + /// Executes the reading commands. void run() { reader->run(); }