# Changeset 2200:2f2ac1b1ca1e in lemon-0.x

Ignore:
Timestamp:
09/06/06 12:01:15 (13 years ago)
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2925
Message:

An easy avoiding of a bug

The functional interfaces are removed.
Better solution could be a reference counted core of the io interfaces

Now it is huge work so just write that:

Location:
lemon
Files:
2 edited

Unmodified
Removed

• ## lemon/graph_writer.h

 r2083 /// \brief The graph writer class. /// /// The \c GraphWriter class provides the graph output. /// Before you read this documentation it might be useful to read the general /// description of  \ref graph-io-page "Graph Input-Output". /// /// To write a graph /// you should first give writing commands to the writer. You can declare /// write commands as \c NodeMap or \c EdgeMap writing and labeled Node and /// Edge writing. /// The \c GraphWriter class provides the graph output.  Before you /// read this documentation it might be useful to read the general /// description of \ref graph-io-page "Graph Input-Output". /// /// To write a graph you should first give writing commands to the /// writer. You can declare write commands as \c NodeMap or \c /// EdgeMap writing and labeled Node and Edge writing. /// ///\code ///\endcode /// /// The \c writeNodeMap() function declares a \c NodeMap writing /// command in the \c GraphWriter. You should give as parameter /// the name of the map and the map object. The NodeMap writing /// command with name "label" should write a unique map because it /// is regarded as label map (such a map is essential if the graph has edges). /// The \c writeNodeMap() function declares a \c NodeMap writing /// command in the \c GraphWriter. You should give as parameter the /// name of the map and the map object. The NodeMap writing command /// with name "label" should write a unique map because it is /// regarded as label map (such a map is essential if the graph has /// edges). /// ///\code }; /// \brief Write a graph to the output. /// /// It is a helper function to write a graph to the given output /// stream. It gives back a GraphWriter object and this object /// can write more maps, labeled nodes and edges and attributes. /// \warning Do not forget to call the \c run() function. /// /// \param os The output stream. /// \param g The graph. template GraphWriter graphWriter(std::ostream& os, const Graph &g) { return GraphWriter(os, g); } /// \brief Write a graph to the output. /// /// It is a helper function to write a graph to the given output /// file. It gives back a GraphWriter object and this object /// can write more maps, labeled nodes and edges and attributes. /// \warning Do not forget to call the \c run() function. /// /// \param fn The filename. /// \param g The graph. template GraphWriter graphWriter(const std::string& fn, const Graph &g) { return GraphWriter(fn, g); } /// \brief The undirected graph writer class. /// \brief Issue a new node map writing command to the writer. /// /// This function issues a new node map writing command to the writer. /// This function issues a new node map writing command to /// the writer. template UGraphWriter& writeNodeMap(std::string name, const Map& map) { /// \brief Issue a new node map writing command to the writer. /// /// This function issues a new node map writing command to the writer. /// This function issues a new node map writing command to /// the writer. template UGraphWriter& writeNodeMap(std::string name, const Map& map, /// \brief Issue a new edge map writing command to the writer. /// /// This function issues a new edge map writing command to the writer. /// This function issues a new edge map writing command to /// the writer. template UGraphWriter& writeEdgeMap(std::string name, const Map& map) { /// \brief Issue a new edge map writing command to the writer. /// /// This function issues a new edge map writing command to the writer. /// This function issues a new edge map writing command to /// the writer. template UGraphWriter& writeEdgeMap(std::string name, const Map& map, /// \brief Write the label of the given undirected edge. /// /// It writes the label of the given undirected edge. If there was written /// an "label" named edge map then it will write the map value belonging to /// the edge. /// It writes the label of the given undirected edge. If there was /// written an "label" named edge map then it will write the map /// value belonging to the edge. void writeLabel(std::ostream& os, const UEdge& item) const { u_edgeset_writer.writeLabel(os, item); }; /// \brief Write an undirected graph to the output. /// /// It is a helper function to write an undirected graph to the given output /// stream. It gives back an UGraphWriter object and this object /// can write more maps, labeled nodes and edges and attributes. /// \warning Do not forget to call the \c run() function. /// /// \param os The output stream. /// \param g The graph. template UGraphWriter uGraphWriter(std::ostream& os, const Graph &g) { return UGraphWriter(os, g); } /// \brief Write an undirected graph to the output. /// /// It is a helper function to write an undirected graph to the given output /// file. It gives back an UGraphWriter object and this object /// can write more maps, labeled nodes, edges, undirected edges and /// attributes. /// /// \warning Do not forget to call the \c run() function. /// /// \param fn The output file. /// \param g The graph. template UGraphWriter uGraphWriter(const std::string& fn, const Graph &g) { return UGraphWriter(fn, g); } /// @}
Note: See TracChangeset for help on using the changeset viewer.