lemon/graph_reader.h
changeset 1949 5db4ff8d69de
parent 1935 67b38d699ea7
child 1956 a055123339d5
equal deleted inserted replaced
9:330fe70cb173 10:695552b88599
    52   ///
    52   ///
    53   /// The reader object assumes that not readed values do not contain 
    53   /// The reader object assumes that not readed values do not contain 
    54   /// whitespaces, therefore it has some extra possibilities to control how
    54   /// whitespaces, therefore it has some extra possibilities to control how
    55   /// it should skip the values when the string representation contains spaces.
    55   /// it should skip the values when the string representation contains spaces.
    56   ///
    56   ///
    57   /// \code
    57   ///\code
    58   /// GraphReader<ListGraph> reader(std::cin, graph);
    58   /// GraphReader<ListGraph> reader(std::cin, graph);
    59   /// \endcode
    59   ///\endcode
    60   ///
    60   ///
    61   /// The \c readNodeMap() function reads a map from the \c \@nodeset section.
    61   /// The \c readNodeMap() function reads a map from the \c \@nodeset section.
    62   /// If there is a map that you do not want to read from the file and there is
    62   /// If there is a map that you do not want to read from the file and there is
    63   /// whitespace in the string represenation of the values then you should
    63   /// whitespace in the string represenation of the values then you should
    64   /// call the \c skipNodeMap() template member function with proper 
    64   /// call the \c skipNodeMap() template member function with proper 
    65   /// parameters.
    65   /// parameters.
    66   ///
    66   ///
    67   /// \code
    67   ///\code
    68   /// reader.readNodeMap("coords", coords);
    68   /// reader.readNodeMap("coords", coords);
    69   ///
    69   ///
    70   /// reader.skipNodeMap("description", desc);
    70   /// reader.skipNodeMap("description", desc);
    71   ///
    71   ///
    72   /// reader.readNodeMap("color", colorMap);
    72   /// reader.readNodeMap("color", colorMap);
    73   /// \endcode
    73   ///\endcode
    74   ///
    74   ///
    75   /// With the \c readEdgeMap() member function you can give an edge map
    75   /// With the \c readEdgeMap() member function you can give an edge map
    76   /// reading command similar to the NodeMaps. 
    76   /// reading command similar to the NodeMaps. 
    77   ///
    77   ///
    78   /// \code
    78   ///\code
    79   /// reader.readEdgeMap("weight", weightMap);
    79   /// reader.readEdgeMap("weight", weightMap);
    80   /// reader.readEdgeMap("label", labelMap);
    80   /// reader.readEdgeMap("label", labelMap);
    81   /// \endcode
    81   ///\endcode
    82   ///
    82   ///
    83   /// With \c readNode() and \c readEdge() functions you can read 
    83   /// With \c readNode() and \c readEdge() functions you can read 
    84   /// labeled Nodes and Edges.
    84   /// labeled Nodes and Edges.
    85   ///
    85   ///
    86   /// \code
    86   ///\code
    87   /// reader.readNode("source", sourceNode);
    87   /// reader.readNode("source", sourceNode);
    88   /// reader.readNode("target", targetNode);
    88   /// reader.readNode("target", targetNode);
    89   ///
    89   ///
    90   /// reader.readEdge("observed", edge);
    90   /// reader.readEdge("observed", edge);
    91   /// \endcode
    91   ///\endcode
    92   ///
    92   ///
    93   /// With the \c readAttribute() functions you can read an attribute
    93   /// With the \c readAttribute() functions you can read an attribute
    94   /// into a variable. You can specify the reader for the attribute as
    94   /// into a variable. You can specify the reader for the attribute as
    95   /// the nodemaps.
    95   /// the nodemaps.
    96   ///
    96   ///
    97   /// After you give all read commands you must call the \c run() member
    97   /// After you give all read commands you must call the \c run() member
    98   /// function, which executes all the commands.
    98   /// function, which executes all the commands.
    99   ///
    99   ///
   100   /// \code
   100   ///\code
   101   /// reader.run();
   101   /// reader.run();
   102   /// \endcode
   102   ///\endcode
   103   ///
   103   ///
   104   /// \see DefaultReaderTraits
   104   /// \see DefaultReaderTraits
   105   /// \see QuotedStringReader
   105   /// \see QuotedStringReader
   106   /// \see \ref GraphWriter
   106   /// \see \ref GraphWriter
   107   /// \see \ref graph-io-page
   107   /// \see \ref graph-io-page
   396   ///
   396   ///
   397   /// The reader object suppose that each not readed value does not contain 
   397   /// The reader object suppose that each not readed value does not contain 
   398   /// whitespaces, therefore it has some extra possibilities to control how
   398   /// whitespaces, therefore it has some extra possibilities to control how
   399   /// it should skip the values when the string representation contains spaces.
   399   /// it should skip the values when the string representation contains spaces.
   400   ///
   400   ///
   401   /// \code
   401   ///\code
   402   /// UGraphReader<ListUGraph> reader(std::cin, graph);
   402   /// UGraphReader<ListUGraph> reader(std::cin, graph);
   403   /// \endcode
   403   ///\endcode
   404   ///
   404   ///
   405   /// The \c readNodeMap() function reads a map from the \c \@nodeset section.
   405   /// The \c readNodeMap() function reads a map from the \c \@nodeset section.
   406   /// If there is a map that you do not want to read from the file and there is
   406   /// If there is a map that you do not want to read from the file and there is
   407   /// whitespace in the string represenation of the values then you should
   407   /// whitespace in the string represenation of the values then you should
   408   /// call the \c skipNodeMap() template member function with proper 
   408   /// call the \c skipNodeMap() template member function with proper 
   409   /// parameters.
   409   /// parameters.
   410   ///
   410   ///
   411   /// \code
   411   ///\code
   412   /// reader.readNodeMap("coords", coords);
   412   /// reader.readNodeMap("coords", coords);
   413   ///
   413   ///
   414   /// reader.skipNodeMap("description", desc);
   414   /// reader.skipNodeMap("description", desc);
   415   ///
   415   ///
   416   /// reader.readNodeMap("color", colorMap);
   416   /// reader.readNodeMap("color", colorMap);
   417   /// \endcode
   417   ///\endcode
   418   ///
   418   ///
   419   /// With the \c readUEdgeMap() member function you can give an 
   419   /// With the \c readUEdgeMap() member function you can give an 
   420   /// uedge map reading command similar to the NodeMaps. 
   420   /// uedge map reading command similar to the NodeMaps. 
   421   ///
   421   ///
   422   /// \code
   422   ///\code
   423   /// reader.readUEdgeMap("capacity", capacityMap);
   423   /// reader.readUEdgeMap("capacity", capacityMap);
   424   /// \endcode
   424   ///\endcode
   425   ///
   425   ///
   426   /// The reading of the directed edge maps is just a syntactical sugar.
   426   /// The reading of the directed edge maps is just a syntactical sugar.
   427   /// It reads two undirected edgemaps into a directed edge map. The 
   427   /// It reads two undirected edgemaps into a directed edge map. The 
   428   /// undirected edge maps' name should be start with the \c '+' and the
   428   /// undirected edge maps' name should be start with the \c '+' and the
   429   /// \c '-' character and the same.
   429   /// \c '-' character and the same.
   430   ///
   430   ///
   431   /// \code
   431   ///\code
   432   /// reader.readEdgeMap("flow", flowMap);
   432   /// reader.readEdgeMap("flow", flowMap);
   433   /// \endcode 
   433   ///\endcode 
   434   ///
   434   ///
   435   /// With \c readNode() and \c readUEdge() functions you can read 
   435   /// With \c readNode() and \c readUEdge() functions you can read 
   436   /// labeled Nodes and UEdges.
   436   /// labeled Nodes and UEdges.
   437   ///
   437   ///
   438   /// \code
   438   ///\code
   439   /// reader.readNode("source", sourceNode);
   439   /// reader.readNode("source", sourceNode);
   440   /// reader.readNode("target", targetNode);
   440   /// reader.readNode("target", targetNode);
   441   ///
   441   ///
   442   /// reader.readUEdge("observed", uEdge);
   442   /// reader.readUEdge("observed", uEdge);
   443   /// \endcode
   443   ///\endcode
   444   ///
   444   ///
   445   /// With the \c readAttribute() functions you can read an attribute
   445   /// With the \c readAttribute() functions you can read an attribute
   446   /// in a variable. You can specify the reader for the attribute as
   446   /// in a variable. You can specify the reader for the attribute as
   447   /// the nodemaps.
   447   /// the nodemaps.
   448   ///
   448   ///
   449   /// After you give all read commands you must call the \c run() member
   449   /// After you give all read commands you must call the \c run() member
   450   /// function, which execute all the commands.
   450   /// function, which execute all the commands.
   451   ///
   451   ///
   452   /// \code
   452   ///\code
   453   /// reader.run();
   453   /// reader.run();
   454   /// \endcode
   454   ///\endcode
   455   ///
   455   ///
   456   /// \see GraphReader
   456   /// \see GraphReader
   457   /// \see DefaultReaderTraits
   457   /// \see DefaultReaderTraits
   458   /// \see \ref UGraphWriter
   458   /// \see \ref UGraphWriter
   459   /// \see \ref graph-io-page
   459   /// \see \ref graph-io-page