# HG changeset patch # User Akos Ladanyi # Date 2008-10-08 12:59:06 # Node ID a3a69f5bba6286dbccfe90e3211a66534772f75b # Parent 907446600ca9618c543cd9ba27d594bf79fe2dba Fix compilation with Visual Studio 2005. 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); 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);