Fix compilation with Visual Studio 2005.
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Wed, 08 Oct 2008 11:59:06 +0100
changeset 303a3a69f5bba62
parent 299 907446600ca9
child 304 1e81878b0e54
Fix compilation with Visual Studio 2005.
lemon/lgf_reader.h
lemon/lgf_writer.h
     1.1 --- a/lemon/lgf_reader.h	Tue Oct 07 07:08:45 2008 +0100
     1.2 +++ b/lemon/lgf_reader.h	Wed Oct 08 11:59:06 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);
     2.1 --- a/lemon/lgf_writer.h	Tue Oct 07 07:08:45 2008 +0100
     2.2 +++ b/lemon/lgf_writer.h	Wed Oct 08 11:59:06 2008 +0100
     2.3 @@ -351,17 +351,38 @@
     2.4    template <typename Digraph>
     2.5    class DigraphWriter;
     2.6  
     2.7 +  /// \brief Return a \ref DigraphWriter class
     2.8 +  ///
     2.9 +  /// This function just returns a \ref DigraphWriter class.
    2.10 +  /// \relates DigraphWriter
    2.11    template <typename Digraph>
    2.12    DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    2.13 -                                       std::ostream& os = std::cout);
    2.14 +                                       std::ostream& os = std::cout) {
    2.15 +    DigraphWriter<Digraph> tmp(digraph, os);
    2.16 +    return tmp;
    2.17 +  }
    2.18  
    2.19 +  /// \brief Return a \ref DigraphWriter class
    2.20 +  ///
    2.21 +  /// This function just returns a \ref DigraphWriter class.
    2.22 +  /// \relates DigraphWriter
    2.23    template <typename Digraph>
    2.24    DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    2.25 -                                       const std::string& fn);
    2.26 +                                       const std::string& fn) {
    2.27 +    DigraphWriter<Digraph> tmp(digraph, fn);
    2.28 +    return tmp;
    2.29 +  }
    2.30  
    2.31 +  /// \brief Return a \ref DigraphWriter class
    2.32 +  ///
    2.33 +  /// This function just returns a \ref DigraphWriter class.
    2.34 +  /// \relates DigraphWriter
    2.35    template <typename Digraph>
    2.36    DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    2.37 -                                       const char *fn);
    2.38 +                                       const char* fn) {
    2.39 +    DigraphWriter<Digraph> tmp(digraph, fn);
    2.40 +    return tmp;
    2.41 +  }
    2.42  
    2.43    /// \ingroup lemon_io
    2.44    ///
    2.45 @@ -913,52 +934,40 @@
    2.46      /// @}
    2.47    };
    2.48  
    2.49 -  /// \brief Return a \ref DigraphWriter class
    2.50 +  template <typename Graph>
    2.51 +  class GraphWriter;
    2.52 +
    2.53 +  /// \brief Return a \ref GraphWriter class
    2.54    ///
    2.55 -  /// This function just returns a \ref DigraphWriter class.
    2.56 -  /// \relates DigraphWriter
    2.57 -  template <typename Digraph>
    2.58 -  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    2.59 -                                       std::ostream& os = std::cout) {
    2.60 -    DigraphWriter<Digraph> tmp(digraph, os);
    2.61 +  /// This function just returns a \ref GraphWriter class.
    2.62 +  /// \relates GraphWriter
    2.63 +  template <typename Graph>
    2.64 +  GraphWriter<Graph> graphWriter(const Graph& graph,
    2.65 +                                 std::ostream& os = std::cout) {
    2.66 +    GraphWriter<Graph> tmp(graph, os);
    2.67      return tmp;
    2.68    }
    2.69  
    2.70 -  /// \brief Return a \ref DigraphWriter class
    2.71 +  /// \brief Return a \ref GraphWriter class
    2.72    ///
    2.73 -  /// This function just returns a \ref DigraphWriter class.
    2.74 -  /// \relates DigraphWriter
    2.75 -  template <typename Digraph>
    2.76 -  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    2.77 -                                       const std::string& fn) {
    2.78 -    DigraphWriter<Digraph> tmp(digraph, fn);
    2.79 +  /// This function just returns a \ref GraphWriter class.
    2.80 +  /// \relates GraphWriter
    2.81 +  template <typename Graph>
    2.82 +  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
    2.83 +    GraphWriter<Graph> tmp(graph, fn);
    2.84      return tmp;
    2.85    }
    2.86  
    2.87 -  /// \brief Return a \ref DigraphWriter class
    2.88 +  /// \brief Return a \ref GraphWriter class
    2.89    ///
    2.90 -  /// This function just returns a \ref DigraphWriter class.
    2.91 -  /// \relates DigraphWriter
    2.92 -  template <typename Digraph>
    2.93 -  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    2.94 -                                       const char* fn) {
    2.95 -    DigraphWriter<Digraph> tmp(digraph, fn);
    2.96 +  /// This function just returns a \ref GraphWriter class.
    2.97 +  /// \relates GraphWriter
    2.98 +  template <typename Graph>
    2.99 +  GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
   2.100 +    GraphWriter<Graph> tmp(graph, fn);
   2.101      return tmp;
   2.102    }
   2.103  
   2.104 -  template <typename Graph>
   2.105 -  class GraphWriter;
   2.106 -
   2.107 -  template <typename Graph>
   2.108 -  GraphWriter<Graph> graphWriter(const Graph& graph,
   2.109 -                                 std::ostream& os = std::cout);
   2.110 -
   2.111 -  template <typename Graph>
   2.112 -  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn);
   2.113 -
   2.114 -  template <typename Graph>
   2.115 -  GraphWriter<Graph> graphWriter(const Graph& graph, const char *fn);
   2.116 -
   2.117    /// \ingroup lemon_io
   2.118    ///
   2.119    /// \brief \ref lgf-format "LGF" writer for directed graphs
   2.120 @@ -1526,37 +1535,6 @@
   2.121      /// @}
   2.122    };
   2.123  
   2.124 -  /// \brief Return a \ref GraphWriter class
   2.125 -  ///
   2.126 -  /// This function just returns a \ref GraphWriter class.
   2.127 -  /// \relates GraphWriter
   2.128 -  template <typename Graph>
   2.129 -  GraphWriter<Graph> graphWriter(const Graph& graph,
   2.130 -                                 std::ostream& os = std::cout) {
   2.131 -    GraphWriter<Graph> tmp(graph, os);
   2.132 -    return tmp;
   2.133 -  }
   2.134 -
   2.135 -  /// \brief Return a \ref GraphWriter class
   2.136 -  ///
   2.137 -  /// This function just returns a \ref GraphWriter class.
   2.138 -  /// \relates GraphWriter
   2.139 -  template <typename Graph>
   2.140 -  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
   2.141 -    GraphWriter<Graph> tmp(graph, fn);
   2.142 -    return tmp;
   2.143 -  }
   2.144 -
   2.145 -  /// \brief Return a \ref GraphWriter class
   2.146 -  ///
   2.147 -  /// This function just returns a \ref GraphWriter class.
   2.148 -  /// \relates GraphWriter
   2.149 -  template <typename Graph>
   2.150 -  GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
   2.151 -    GraphWriter<Graph> tmp(graph, fn);
   2.152 -    return tmp;
   2.153 -  }
   2.154 -
   2.155    class SectionWriter;
   2.156  
   2.157    SectionWriter sectionWriter(std::istream& is);