diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h --- a/lemon/lgf_reader.h +++ b/lemon/lgf_reader.h @@ -391,15 +391,37 @@ template class DigraphReader; + /// \brief Return a \ref DigraphReader class + /// + /// This function just returns a \ref DigraphReader class. + /// \relates DigraphReader template DigraphReader digraphReader(Digraph& digraph, - std::istream& is = std::cin); - + std::istream& is = std::cin) { + DigraphReader tmp(digraph, is); + return tmp; + } + + /// \brief Return a \ref DigraphReader class + /// + /// This function just returns a \ref DigraphReader class. + /// \relates DigraphReader template - DigraphReader digraphReader(Digraph& digraph, const std::string& fn); - + DigraphReader digraphReader(Digraph& digraph, + const std::string& fn) { + DigraphReader tmp(digraph, fn); + return tmp; + } + + /// \brief Return a \ref DigraphReader class + /// + /// This function just returns a \ref DigraphReader class. + /// \relates DigraphReader template - DigraphReader digraphReader(Digraph& digraph, const char *fn); + DigraphReader digraphReader(Digraph& digraph, const char* fn) { + DigraphReader tmp(digraph, fn); + return tmp; + } /// \ingroup lemon_io /// @@ -1189,51 +1211,39 @@ }; - /// \brief Return a \ref DigraphReader class + template + class GraphReader; + + /// \brief Return a \ref GraphReader class /// - /// This function just returns a \ref DigraphReader class. - /// \relates DigraphReader - template - DigraphReader digraphReader(Digraph& digraph, - std::istream& is = std::cin) { - DigraphReader tmp(digraph, is); + /// This function just returns a \ref GraphReader class. + /// \relates GraphReader + template + GraphReader graphReader(Graph& graph, std::istream& is = std::cin) { + GraphReader tmp(graph, is); return tmp; } - /// \brief Return a \ref DigraphReader class + /// \brief Return a \ref GraphReader class /// - /// This function just returns a \ref DigraphReader class. - /// \relates DigraphReader - template - DigraphReader digraphReader(Digraph& digraph, - const std::string& fn) { - DigraphReader tmp(digraph, fn); + /// This function just returns a \ref GraphReader class. + /// \relates GraphReader + template + GraphReader graphReader(Graph& graph, const std::string& fn) { + GraphReader tmp(graph, fn); return tmp; } - /// \brief Return a \ref DigraphReader class + /// \brief Return a \ref GraphReader class /// - /// This function just returns a \ref DigraphReader class. - /// \relates DigraphReader - template - DigraphReader digraphReader(Digraph& digraph, const char* fn) { - DigraphReader tmp(digraph, fn); + /// This function just returns a \ref GraphReader class. + /// \relates GraphReader + template + GraphReader graphReader(Graph& graph, const char* fn) { + GraphReader tmp(graph, fn); return tmp; } - template - class GraphReader; - - template - GraphReader graphReader(Graph& graph, - std::istream& is = std::cin); - - template - GraphReader graphReader(Graph& graph, const std::string& fn); - - template - GraphReader graphReader(Graph& graph, const char *fn); - /// \ingroup lemon_io /// /// \brief \ref lgf-format "LGF" reader for undirected graphs @@ -2031,36 +2041,6 @@ }; - /// \brief Return a \ref GraphReader class - /// - /// This function just returns a \ref GraphReader class. - /// \relates GraphReader - template - GraphReader graphReader(Graph& graph, std::istream& is = std::cin) { - GraphReader tmp(graph, is); - return tmp; - } - - /// \brief Return a \ref GraphReader class - /// - /// This function just returns a \ref GraphReader class. - /// \relates GraphReader - template - GraphReader graphReader(Graph& graph, const std::string& fn) { - GraphReader tmp(graph, fn); - return tmp; - } - - /// \brief Return a \ref GraphReader class - /// - /// This function just returns a \ref GraphReader class. - /// \relates GraphReader - template - GraphReader graphReader(Graph& graph, const char* fn) { - GraphReader tmp(graph, fn); - return tmp; - } - class SectionReader; SectionReader sectionReader(std::istream& is);