lemon/graph_writer.h
changeset 1540 7d028a73d7f2
parent 1534 b86aad11f842
child 1744 51d5d41e15b1
equal deleted inserted replaced
2:60a8444ddaca 3:e42449795df4
    35   /// \brief The graph writer class.
    35   /// \brief The graph writer class.
    36   ///
    36   ///
    37   /// The \c GraphWriter class provides the graph output. 
    37   /// The \c GraphWriter class provides the graph output. 
    38   /// Before you read this documentation it might be useful to read the general
    38   /// Before you read this documentation it might be useful to read the general
    39   /// description of  \ref graph-io-page "Graph Input-Output".
    39   /// description of  \ref graph-io-page "Graph Input-Output".
       
    40   ///
    40   /// If you don't need very sophisticated
    41   /// If you don't need very sophisticated
    41   /// behaviour then you can use the versions of the public function
    42   /// behaviour then you can use the versions of the public function
    42   /// \ref writeGraph() to output a graph (or a max flow instance etc).
    43   /// \ref writeGraph() to output a graph (or a max flow instance etc).
    43   ///
    44   ///
    44   /// To write a graph
    45   /// To write a graph
   162     GraphWriter& writeNodeMap(std::string name, const Map& map) {
   163     GraphWriter& writeNodeMap(std::string name, const Map& map) {
   163       nodeset_writer.writeNodeMap(name, map);
   164       nodeset_writer.writeNodeMap(name, map);
   164       return *this;
   165       return *this;
   165     }
   166     }
   166 
   167 
       
   168 
   167     /// \brief Issue a new node map writing command for the writer.
   169     /// \brief Issue a new node map writing command for the writer.
   168     ///
   170     ///
   169    /// This function issues a new <i> node map writing command</i> to the writer.
   171    /// This function issues a new <i> node map writing command</i> to the writer.
   170     template <typename Writer, typename Map>
   172     template <typename Writer, typename Map>
   171     GraphWriter& writeNodeMap(std::string name, const Map& map, 
   173     GraphWriter& writeNodeMap(std::string name, const Map& map, 
   236     /// \brief Conversion operator to LemonWriter.
   238     /// \brief Conversion operator to LemonWriter.
   237     ///
   239     ///
   238     /// Conversion operator to LemonWriter. It makes possible
   240     /// Conversion operator to LemonWriter. It makes possible
   239     /// to access the encapsulated \e LemonWriter, this way
   241     /// to access the encapsulated \e LemonWriter, this way
   240     /// you can attach to this writer new instances of 
   242     /// you can attach to this writer new instances of 
   241     /// \e LemonWriter::SectionWriter.
   243     /// \e LemonWriter::SectionWriter. For more details see
       
   244     /// the \ref rwbackground "Background of Reading and Writing".
   242     operator LemonWriter&() {
   245     operator LemonWriter&() {
   243       return *writer;
   246       return *writer;
   244     }
   247     }
   245 
   248 
   246     /// \brief Executes the writing commands.
   249     /// \brief Executes the writing commands.
   566 
   569 
   567     /// \brief Issue a new undirected edge map writing command to the writer.
   570     /// \brief Issue a new undirected edge map writing command to the writer.
   568     ///
   571     ///
   569     /// This function issues a new <i> undirected edge map writing
   572     /// This function issues a new <i> undirected edge map writing
   570     /// command</i> to the writer.
   573     /// command</i> to the writer.
   571     template <typename Writer, typename Map>
   574    template <typename Writer, typename Map>
   572     UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
   575     UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
   573 					const Writer& writer = Writer()) {
   576 					const Writer& writer = Writer()) {
   574       undir_edgeset_writer.writeUndirEdgeMap(name, map, writer);
   577       undir_edgeset_writer.writeUndirEdgeMap(name, map, writer);
   575       return *this;
   578       return *this;
   576     }
   579     }