diff --git a/lemon/lgf_writer.h b/lemon/lgf_writer.h --- a/lemon/lgf_writer.h +++ b/lemon/lgf_writer.h @@ -351,17 +351,38 @@ template class DigraphWriter; + /// \brief Return a \ref DigraphWriter class + /// + /// This function just returns a \ref DigraphWriter class. + /// \relates DigraphWriter template DigraphWriter digraphWriter(const Digraph& digraph, - std::ostream& os = std::cout); + std::ostream& os = std::cout) { + DigraphWriter tmp(digraph, os); + return tmp; + } + /// \brief Return a \ref DigraphWriter class + /// + /// This function just returns a \ref DigraphWriter class. + /// \relates DigraphWriter template DigraphWriter digraphWriter(const Digraph& digraph, - const std::string& fn); + const std::string& fn) { + DigraphWriter tmp(digraph, fn); + return tmp; + } + /// \brief Return a \ref DigraphWriter class + /// + /// This function just returns a \ref DigraphWriter class. + /// \relates DigraphWriter template DigraphWriter digraphWriter(const Digraph& digraph, - const char *fn); + const char* fn) { + DigraphWriter tmp(digraph, fn); + return tmp; + } /// \ingroup lemon_io /// @@ -913,52 +934,40 @@ /// @} }; - /// \brief Return a \ref DigraphWriter class + template + class GraphWriter; + + /// \brief Return a \ref GraphWriter class /// - /// This function just returns a \ref DigraphWriter class. - /// \relates DigraphWriter - template - DigraphWriter digraphWriter(const Digraph& digraph, - std::ostream& os = std::cout) { - DigraphWriter tmp(digraph, os); + /// This function just returns a \ref GraphWriter class. + /// \relates GraphWriter + template + GraphWriter graphWriter(const Graph& graph, + std::ostream& os = std::cout) { + GraphWriter tmp(graph, os); return tmp; } - /// \brief Return a \ref DigraphWriter class + /// \brief Return a \ref GraphWriter class /// - /// This function just returns a \ref DigraphWriter class. - /// \relates DigraphWriter - template - DigraphWriter digraphWriter(const Digraph& digraph, - const std::string& fn) { - DigraphWriter tmp(digraph, fn); + /// This function just returns a \ref GraphWriter class. + /// \relates GraphWriter + template + GraphWriter graphWriter(const Graph& graph, const std::string& fn) { + GraphWriter tmp(graph, fn); return tmp; } - /// \brief Return a \ref DigraphWriter class + /// \brief Return a \ref GraphWriter class /// - /// This function just returns a \ref DigraphWriter class. - /// \relates DigraphWriter - template - DigraphWriter digraphWriter(const Digraph& digraph, - const char* fn) { - DigraphWriter tmp(digraph, fn); + /// This function just returns a \ref GraphWriter class. + /// \relates GraphWriter + template + GraphWriter graphWriter(const Graph& graph, const char* fn) { + GraphWriter tmp(graph, fn); return tmp; } - template - class GraphWriter; - - template - GraphWriter graphWriter(const Graph& graph, - std::ostream& os = std::cout); - - template - GraphWriter graphWriter(const Graph& graph, const std::string& fn); - - template - GraphWriter graphWriter(const Graph& graph, const char *fn); - /// \ingroup lemon_io /// /// \brief \ref lgf-format "LGF" writer for directed graphs @@ -1526,37 +1535,6 @@ /// @} }; - /// \brief Return a \ref GraphWriter class - /// - /// This function just returns a \ref GraphWriter class. - /// \relates GraphWriter - template - GraphWriter graphWriter(const Graph& graph, - std::ostream& os = std::cout) { - GraphWriter tmp(graph, os); - return tmp; - } - - /// \brief Return a \ref GraphWriter class - /// - /// This function just returns a \ref GraphWriter class. - /// \relates GraphWriter - template - GraphWriter graphWriter(const Graph& graph, const std::string& fn) { - GraphWriter tmp(graph, fn); - return tmp; - } - - /// \brief Return a \ref GraphWriter class - /// - /// This function just returns a \ref GraphWriter class. - /// \relates GraphWriter - template - GraphWriter graphWriter(const Graph& graph, const char* fn) { - GraphWriter tmp(graph, fn); - return tmp; - } - class SectionWriter; SectionWriter sectionWriter(std::istream& is);