1.1 --- a/src/lemon/graph_writer.h Thu May 19 11:46:42 2005 +0000
1.2 +++ b/src/lemon/graph_writer.h Thu May 19 11:49:42 2005 +0000
1.3 @@ -238,6 +238,22 @@
1.4 writer->run();
1.5 }
1.6
1.7 + /// \brief Write the id of the given node.
1.8 + ///
1.9 + /// It writes the id of the given node. If there was written an "id"
1.10 + /// named node map then it will write the map value belongs to the node.
1.11 + void writeId(std::ostream& os, const Node& item) const {
1.12 + nodeset_writer.writeId(os, item);
1.13 + }
1.14 +
1.15 + /// \brief Write the id of the given edge.
1.16 + ///
1.17 + /// It writes the id of the given edge. If there was written an "id"
1.18 + /// named edge map then it will write the map value belongs to the edge.
1.19 + void writeId(std::ostream& os, const Edge& item) const {
1.20 + edgeset_writer.writeId(os, item);
1.21 + }
1.22 +
1.23 private:
1.24
1.25 LemonWriter* writer;
1.26 @@ -547,6 +563,13 @@
1.27 /// \brief Add a new labeled edge writer for the writer.
1.28 ///
1.29 /// Add a new labeled edge writer for the writer.
1.30 + UndirGraphWriter& writeEdge(std::string name, const Edge& edge) {
1.31 + undir_edge_writer.writeEdge(name, edge);
1.32 + }
1.33 +
1.34 + /// \brief Add a new labeled undirected edge writer for the writer.
1.35 + ///
1.36 + /// Add a new labeled undirected edge writer for the writer.
1.37 UndirGraphWriter& writeUndirEdge(std::string name, const UndirEdge& edge) {
1.38 undir_edge_writer.writeUndirEdge(name, edge);
1.39 }
1.40 @@ -587,6 +610,32 @@
1.41 writer->run();
1.42 }
1.43
1.44 + /// \brief Write the id of the given node.
1.45 + ///
1.46 + /// It writes the id of the given node. If there was written an "id"
1.47 + /// named node map then it will write the map value belongs to the node.
1.48 + void writeId(std::ostream& os, const Node& item) const {
1.49 + nodeset_writer.writeId(os, item);
1.50 + }
1.51 +
1.52 + /// \brief Write the id of the given edge.
1.53 + ///
1.54 + /// It writes the id of the given edge. If there was written an "id"
1.55 + /// named edge map then it will write the map value belongs to the edge.
1.56 + void writeId(std::ostream& os, const Edge& item) const {
1.57 + undir_edgeset_writer.writeId(os, item);
1.58 + }
1.59 +
1.60 + /// \brief Write the id of the given undirected edge.
1.61 + ///
1.62 + /// It writes the id of the given undirected edge. If there was written
1.63 + /// an "id" named edge map then it will write the map value belongs to
1.64 + /// the edge.
1.65 + void writeId(std::ostream& os, const UndirEdge& item) const {
1.66 + undir_edgeset_writer.writeId(os, item);
1.67 + }
1.68 +
1.69 +
1.70 private:
1.71
1.72 LemonWriter* writer;