1.1 --- a/lemon/lgf_reader.h Wed Oct 08 13:16:04 2008 +0100
1.2 +++ b/lemon/lgf_reader.h Wed Oct 08 13:18:33 2008 +0100
1.3 @@ -391,15 +391,37 @@
1.4 template <typename Digraph>
1.5 class DigraphReader;
1.6
1.7 + /// \brief Return a \ref DigraphReader class
1.8 + ///
1.9 + /// This function just returns a \ref DigraphReader class.
1.10 + /// \relates DigraphReader
1.11 template <typename Digraph>
1.12 DigraphReader<Digraph> digraphReader(Digraph& digraph,
1.13 - std::istream& is = std::cin);
1.14 -
1.15 + std::istream& is = std::cin) {
1.16 + DigraphReader<Digraph> tmp(digraph, is);
1.17 + return tmp;
1.18 + }
1.19 +
1.20 + /// \brief Return a \ref DigraphReader class
1.21 + ///
1.22 + /// This function just returns a \ref DigraphReader class.
1.23 + /// \relates DigraphReader
1.24 template <typename Digraph>
1.25 - DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn);
1.26 -
1.27 + DigraphReader<Digraph> digraphReader(Digraph& digraph,
1.28 + const std::string& fn) {
1.29 + DigraphReader<Digraph> tmp(digraph, fn);
1.30 + return tmp;
1.31 + }
1.32 +
1.33 + /// \brief Return a \ref DigraphReader class
1.34 + ///
1.35 + /// This function just returns a \ref DigraphReader class.
1.36 + /// \relates DigraphReader
1.37 template <typename Digraph>
1.38 - DigraphReader<Digraph> digraphReader(Digraph& digraph, const char *fn);
1.39 + DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
1.40 + DigraphReader<Digraph> tmp(digraph, fn);
1.41 + return tmp;
1.42 + }
1.43
1.44 /// \ingroup lemon_io
1.45 ///
1.46 @@ -1189,51 +1211,39 @@
1.47
1.48 };
1.49
1.50 - /// \brief Return a \ref DigraphReader class
1.51 + template <typename Graph>
1.52 + class GraphReader;
1.53 +
1.54 + /// \brief Return a \ref GraphReader class
1.55 ///
1.56 - /// This function just returns a \ref DigraphReader class.
1.57 - /// \relates DigraphReader
1.58 - template <typename Digraph>
1.59 - DigraphReader<Digraph> digraphReader(Digraph& digraph,
1.60 - std::istream& is = std::cin) {
1.61 - DigraphReader<Digraph> tmp(digraph, is);
1.62 + /// This function just returns a \ref GraphReader class.
1.63 + /// \relates GraphReader
1.64 + template <typename Graph>
1.65 + GraphReader<Graph> graphReader(Graph& graph, std::istream& is = std::cin) {
1.66 + GraphReader<Graph> tmp(graph, is);
1.67 return tmp;
1.68 }
1.69
1.70 - /// \brief Return a \ref DigraphReader class
1.71 + /// \brief Return a \ref GraphReader class
1.72 ///
1.73 - /// This function just returns a \ref DigraphReader class.
1.74 - /// \relates DigraphReader
1.75 - template <typename Digraph>
1.76 - DigraphReader<Digraph> digraphReader(Digraph& digraph,
1.77 - const std::string& fn) {
1.78 - DigraphReader<Digraph> tmp(digraph, fn);
1.79 + /// This function just returns a \ref GraphReader class.
1.80 + /// \relates GraphReader
1.81 + template <typename Graph>
1.82 + GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
1.83 + GraphReader<Graph> tmp(graph, fn);
1.84 return tmp;
1.85 }
1.86
1.87 - /// \brief Return a \ref DigraphReader class
1.88 + /// \brief Return a \ref GraphReader class
1.89 ///
1.90 - /// This function just returns a \ref DigraphReader class.
1.91 - /// \relates DigraphReader
1.92 - template <typename Digraph>
1.93 - DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
1.94 - DigraphReader<Digraph> tmp(digraph, fn);
1.95 + /// This function just returns a \ref GraphReader class.
1.96 + /// \relates GraphReader
1.97 + template <typename Graph>
1.98 + GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
1.99 + GraphReader<Graph> tmp(graph, fn);
1.100 return tmp;
1.101 }
1.102
1.103 - template <typename Graph>
1.104 - class GraphReader;
1.105 -
1.106 - template <typename Graph>
1.107 - GraphReader<Graph> graphReader(Graph& graph,
1.108 - std::istream& is = std::cin);
1.109 -
1.110 - template <typename Graph>
1.111 - GraphReader<Graph> graphReader(Graph& graph, const std::string& fn);
1.112 -
1.113 - template <typename Graph>
1.114 - GraphReader<Graph> graphReader(Graph& graph, const char *fn);
1.115 -
1.116 /// \ingroup lemon_io
1.117 ///
1.118 /// \brief \ref lgf-format "LGF" reader for undirected graphs
1.119 @@ -2031,36 +2041,6 @@
1.120
1.121 };
1.122
1.123 - /// \brief Return a \ref GraphReader class
1.124 - ///
1.125 - /// This function just returns a \ref GraphReader class.
1.126 - /// \relates GraphReader
1.127 - template <typename Graph>
1.128 - GraphReader<Graph> graphReader(Graph& graph, std::istream& is = std::cin) {
1.129 - GraphReader<Graph> tmp(graph, is);
1.130 - return tmp;
1.131 - }
1.132 -
1.133 - /// \brief Return a \ref GraphReader class
1.134 - ///
1.135 - /// This function just returns a \ref GraphReader class.
1.136 - /// \relates GraphReader
1.137 - template <typename Graph>
1.138 - GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
1.139 - GraphReader<Graph> tmp(graph, fn);
1.140 - return tmp;
1.141 - }
1.142 -
1.143 - /// \brief Return a \ref GraphReader class
1.144 - ///
1.145 - /// This function just returns a \ref GraphReader class.
1.146 - /// \relates GraphReader
1.147 - template <typename Graph>
1.148 - GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
1.149 - GraphReader<Graph> tmp(graph, fn);
1.150 - return tmp;
1.151 - }
1.152 -
1.153 class SectionReader;
1.154
1.155 SectionReader sectionReader(std::istream& is);