Changeset 498:afd134142111 in lemonmain for lemon/lgf_writer.h
 Timestamp:
 02/20/09 21:36:26 (12 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/lgf_writer.h
r319 r498 351 351 class DigraphWriter; 352 352 353 /// \brief Return a \ref DigraphWriter class354 ///355 /// This function just returns a \ref DigraphWriter class.356 /// \relates DigraphWriter357 353 template <typename Digraph> 358 354 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); 368 356 template <typename Digraph> 369 357 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 379 360 template <typename Digraph> 380 361 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 385 364 386 365 /// \ingroup lemon_io … … 527 506 private: 528 507 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); 535 517 536 518 DigraphWriter(DigraphWriter& other) … … 934 916 }; 935 917 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 936 951 template <typename Graph> 937 952 class GraphWriter; 938 953 939 /// \brief Return a \ref GraphWriter class940 ///941 /// This function just returns a \ref GraphWriter class.942 /// \relates GraphWriter943 954 template <typename Graph> 944 955 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); 954 957 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); 964 959 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); 969 961 970 962 /// \ingroup lemon_io … … 1082 1074 private: 1083 1075 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 1091 1086 GraphWriter(GraphWriter& other) 1092 1087 : _os(other._os), local_os(other.local_os), _graph(other._graph), … … 1534 1529 /// @} 1535 1530 }; 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 } 1536 1562 1537 1563 class SectionWriter;
Note: See TracChangeset
for help on using the changeset viewer.