Changes in lemon/lgf_writer.h [487:afd134142111:319:5e12d7734036] in lemon1.2
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/lgf_writer.h
r487 r319 351 351 class DigraphWriter; 352 352 353 /// \brief Return a \ref DigraphWriter class 354 /// 355 /// This function just returns a \ref DigraphWriter class. 356 /// \relates DigraphWriter 353 357 template <typename Digraph> 354 358 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, 355 std::ostream& os = std::cout); 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 356 368 template <typename Digraph> 357 369 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, 358 const std::string& fn); 359 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 360 379 template <typename Digraph> 361 380 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, 362 const char* fn); 363 381 const char* fn) { 382 DigraphWriter<Digraph> tmp(digraph, fn); 383 return tmp; 384 } 364 385 365 386 /// \ingroup lemon_io … … 506 527 private: 507 528 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); 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); 517 535 518 536 DigraphWriter(DigraphWriter& other) … … 916 934 }; 917 935 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); 936 template <typename Graph> 937 class GraphWriter; 938 939 /// \brief Return a \ref GraphWriter class 940 /// 941 /// This function just returns a \ref GraphWriter class. 942 /// \relates GraphWriter 943 template <typename Graph> 944 GraphWriter<Graph> graphWriter(const Graph& graph, 945 std::ostream& os = std::cout) { 946 GraphWriter<Graph> tmp(graph, os); 926 947 return tmp; 927 948 } 928 949 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); 950 /// \brief Return a \ref GraphWriter class 951 /// 952 /// This function just returns a \ref GraphWriter class. 953 /// \relates GraphWriter 954 template <typename Graph> 955 GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) { 956 GraphWriter<Graph> tmp(graph, fn); 937 957 return tmp; 938 958 } 939 959 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); 960 /// \brief Return a \ref GraphWriter class 961 /// 962 /// This function just returns a \ref GraphWriter class. 963 /// \relates GraphWriter 964 template <typename Graph> 965 GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) { 966 GraphWriter<Graph> tmp(graph, fn); 948 967 return tmp; 949 968 } 950 951 template <typename Graph>952 class GraphWriter;953 954 template <typename Graph>955 GraphWriter<Graph> graphWriter(const Graph& graph,956 std::ostream& os = std::cout);957 template <typename Graph>958 GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn);959 template <typename Graph>960 GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn);961 969 962 970 /// \ingroup lemon_io … … 1074 1082 private: 1075 1083 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 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 1086 1091 GraphWriter(GraphWriter& other) 1087 1092 : _os(other._os), local_os(other.local_os), _graph(other._graph), … … 1529 1534 /// @} 1530 1535 }; 1531 1532 /// \brief Return a \ref GraphWriter class1533 ///1534 /// This function just returns a \ref GraphWriter class.1535 /// \relates GraphWriter1536 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 class1544 ///1545 /// This function just returns a \ref GraphWriter class.1546 /// \relates GraphWriter1547 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 class1554 ///1555 /// This function just returns a \ref GraphWriter class.1556 /// \relates GraphWriter1557 template <typename Graph>1558 GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {1559 GraphWriter<Graph> tmp(graph, fn);1560 return tmp;1561 }1562 1536 1563 1537 class SectionWriter;
Note: See TracChangeset
for help on using the changeset viewer.