COIN-OR::LEMON - Graph Library

Changeset 517:2b6d5d22bb23 in lemon-main for lemon/lgf_writer.h


Ignore:
Timestamp:
02/20/09 22:37:19 (16 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
495:dab9e610e37d (diff), 499:b1ef32ab39f3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/lgf_writer.h

    r440 r517  
    351351  class DigraphWriter;
    352352
    353   /// \brief Return a \ref DigraphWriter class
    354   ///
    355   /// This function just returns a \ref DigraphWriter class.
    356   /// \relates DigraphWriter
    357353  template <typename Digraph>
    358354  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    359                                        std::ostream& os = std::cout) {
    360     DigraphWriter<Digraph> tmp(digraph, os);
    361     return tmp;
    362   }
    363 
    364   /// \brief Return a \ref DigraphWriter class
    365   ///
    366   /// This function just returns a \ref DigraphWriter class.
    367   /// \relates DigraphWriter
     355                                       std::ostream& os = std::cout);
    368356  template <typename Digraph>
    369357  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    370                                        const std::string& fn) {
    371     DigraphWriter<Digraph> tmp(digraph, fn);
    372     return tmp;
    373   }
    374 
    375   /// \brief Return a \ref DigraphWriter class
    376   ///
    377   /// This function just returns a \ref DigraphWriter class.
    378   /// \relates DigraphWriter
     358                                       const std::string& fn);
     359
    379360  template <typename Digraph>
    380361  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
    381                                        const char* fn) {
    382     DigraphWriter<Digraph> tmp(digraph, fn);
    383     return tmp;
    384   }
     362                                       const char* fn);
     363
    385364
    386365  /// \ingroup lemon_io
     
    527506  private:
    528507
    529     friend DigraphWriter<Digraph> digraphWriter<>(const Digraph& digraph,
    530                                                   std::ostream& os);
    531     friend DigraphWriter<Digraph> digraphWriter<>(const Digraph& digraph,
    532                                                   const std::string& fn);
    533     friend DigraphWriter<Digraph> digraphWriter<>(const Digraph& digraph,
    534                                                   const char *fn);
     508    template <typename DGR>
     509    friend DigraphWriter<DGR> digraphWriter(const DGR& digraph,
     510                                            std::ostream& os);
     511    template <typename DGR>
     512    friend DigraphWriter<DGR> digraphWriter(const DGR& digraph,
     513                                            const std::string& fn);
     514    template <typename DGR>
     515    friend DigraphWriter<DGR> digraphWriter(const DGR& digraph,
     516                                            const char *fn);
    535517
    536518    DigraphWriter(DigraphWriter& other)
     
    934916  };
    935917
     918  /// \brief Return a \ref DigraphWriter class
     919  ///
     920  /// This function just returns a \ref DigraphWriter class.
     921  /// \relates DigraphWriter
     922  template <typename Digraph>
     923  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
     924                                       std::ostream& os) {
     925    DigraphWriter<Digraph> tmp(digraph, os);
     926    return tmp;
     927  }
     928
     929  /// \brief Return a \ref DigraphWriter class
     930  ///
     931  /// This function just returns a \ref DigraphWriter class.
     932  /// \relates DigraphWriter
     933  template <typename Digraph>
     934  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
     935                                       const std::string& fn) {
     936    DigraphWriter<Digraph> tmp(digraph, fn);
     937    return tmp;
     938  }
     939
     940  /// \brief Return a \ref DigraphWriter class
     941  ///
     942  /// This function just returns a \ref DigraphWriter class.
     943  /// \relates DigraphWriter
     944  template <typename Digraph>
     945  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
     946                                       const char* fn) {
     947    DigraphWriter<Digraph> tmp(digraph, fn);
     948    return tmp;
     949  }
     950
    936951  template <typename Graph>
    937952  class GraphWriter;
    938953
    939   /// \brief Return a \ref GraphWriter class
    940   ///
    941   /// This function just returns a \ref GraphWriter class.
    942   /// \relates GraphWriter
    943954  template <typename Graph>
    944955  GraphWriter<Graph> graphWriter(const Graph& graph,
    945                                  std::ostream& os = std::cout) {
    946     GraphWriter<Graph> tmp(graph, os);
    947     return tmp;
    948   }
    949 
    950   /// \brief Return a \ref GraphWriter class
    951   ///
    952   /// This function just returns a \ref GraphWriter class.
    953   /// \relates GraphWriter
     956                                 std::ostream& os = std::cout);
    954957  template <typename Graph>
    955   GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
    956     GraphWriter<Graph> tmp(graph, fn);
    957     return tmp;
    958   }
    959 
    960   /// \brief Return a \ref GraphWriter class
    961   ///
    962   /// This function just returns a \ref GraphWriter class.
    963   /// \relates GraphWriter
     958  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn);
    964959  template <typename Graph>
    965   GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
    966     GraphWriter<Graph> tmp(graph, fn);
    967     return tmp;
    968   }
     960  GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn);
    969961
    970962  /// \ingroup lemon_io
     
    10821074  private:
    10831075
    1084     friend GraphWriter<Graph> graphWriter<>(const Graph& graph,
    1085                                             std::ostream& os);
    1086     friend GraphWriter<Graph> graphWriter<>(const Graph& graph,
    1087                                             const std::string& fn);
    1088     friend GraphWriter<Graph> graphWriter<>(const Graph& graph,
    1089                                             const char *fn);
    1090 
     1076    template <typename GR>
     1077    friend GraphWriter<GR> graphWriter(const GR& graph,
     1078                                       std::ostream& os);
     1079    template <typename GR>
     1080    friend GraphWriter<GR> graphWriter(const GR& graph,
     1081                                       const std::string& fn);
     1082    template <typename GR>
     1083    friend GraphWriter<GR> graphWriter(const GR& graph,
     1084                                       const char *fn);
     1085   
    10911086    GraphWriter(GraphWriter& other)
    10921087      : _os(other._os), local_os(other.local_os), _graph(other._graph),
     
    15341529    /// @}
    15351530  };
     1531
     1532  /// \brief Return a \ref GraphWriter class
     1533  ///
     1534  /// This function just returns a \ref GraphWriter class.
     1535  /// \relates GraphWriter
     1536  template <typename Graph>
     1537  GraphWriter<Graph> graphWriter(const Graph& graph,
     1538                                 std::ostream& os) {
     1539    GraphWriter<Graph> tmp(graph, os);
     1540    return tmp;
     1541  }
     1542
     1543  /// \brief Return a \ref GraphWriter class
     1544  ///
     1545  /// This function just returns a \ref GraphWriter class.
     1546  /// \relates GraphWriter
     1547  template <typename Graph>
     1548  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
     1549    GraphWriter<Graph> tmp(graph, fn);
     1550    return tmp;
     1551  }
     1552
     1553  /// \brief Return a \ref GraphWriter class
     1554  ///
     1555  /// This function just returns a \ref GraphWriter class.
     1556  /// \relates GraphWriter
     1557  template <typename Graph>
     1558  GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
     1559    GraphWriter<Graph> tmp(graph, fn);
     1560    return tmp;
     1561  }
    15361562
    15371563  class SectionWriter;
  • lemon/lgf_writer.h

    r498 r517  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
Note: See TracChangeset for help on using the changeset viewer.