349 } |
349 } |
350 |
350 |
351 template <typename Digraph> |
351 template <typename Digraph> |
352 class DigraphWriter; |
352 class DigraphWriter; |
353 |
353 |
|
354 /// \brief Return a \ref DigraphWriter class |
|
355 /// |
|
356 /// This function just returns a \ref DigraphWriter class. |
|
357 /// \relates DigraphWriter |
354 template <typename Digraph> |
358 template <typename Digraph> |
355 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
359 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
356 std::ostream& os = std::cout); |
360 std::ostream& os = std::cout) { |
357 |
361 DigraphWriter<Digraph> tmp(digraph, os); |
|
362 return tmp; |
|
363 } |
|
364 |
|
365 /// \brief Return a \ref DigraphWriter class |
|
366 /// |
|
367 /// This function just returns a \ref DigraphWriter class. |
|
368 /// \relates DigraphWriter |
358 template <typename Digraph> |
369 template <typename Digraph> |
359 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
370 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
360 const std::string& fn); |
371 const std::string& fn) { |
361 |
372 DigraphWriter<Digraph> tmp(digraph, fn); |
|
373 return tmp; |
|
374 } |
|
375 |
|
376 /// \brief Return a \ref DigraphWriter class |
|
377 /// |
|
378 /// This function just returns a \ref DigraphWriter class. |
|
379 /// \relates DigraphWriter |
362 template <typename Digraph> |
380 template <typename Digraph> |
363 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
381 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
364 const char *fn); |
382 const char* fn) { |
|
383 DigraphWriter<Digraph> tmp(digraph, fn); |
|
384 return tmp; |
|
385 } |
365 |
386 |
366 /// \ingroup lemon_io |
387 /// \ingroup lemon_io |
367 /// |
388 /// |
368 /// \brief \ref lgf-format "LGF" writer for directed graphs |
389 /// \brief \ref lgf-format "LGF" writer for directed graphs |
369 /// |
390 /// |
911 } |
932 } |
912 |
933 |
913 /// @} |
934 /// @} |
914 }; |
935 }; |
915 |
936 |
916 /// \brief Return a \ref DigraphWriter class |
937 template <typename Graph> |
917 /// |
938 class GraphWriter; |
918 /// This function just returns a \ref DigraphWriter class. |
939 |
919 /// \relates DigraphWriter |
940 /// \brief Return a \ref GraphWriter class |
920 template <typename Digraph> |
941 /// |
921 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
942 /// This function just returns a \ref GraphWriter class. |
922 std::ostream& os = std::cout) { |
943 /// \relates GraphWriter |
923 DigraphWriter<Digraph> tmp(digraph, os); |
944 template <typename Graph> |
|
945 GraphWriter<Graph> graphWriter(const Graph& graph, |
|
946 std::ostream& os = std::cout) { |
|
947 GraphWriter<Graph> tmp(graph, os); |
924 return tmp; |
948 return tmp; |
925 } |
949 } |
926 |
950 |
927 /// \brief Return a \ref DigraphWriter class |
951 /// \brief Return a \ref GraphWriter class |
928 /// |
952 /// |
929 /// This function just returns a \ref DigraphWriter class. |
953 /// This function just returns a \ref GraphWriter class. |
930 /// \relates DigraphWriter |
954 /// \relates GraphWriter |
931 template <typename Digraph> |
955 template <typename Graph> |
932 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
956 GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) { |
933 const std::string& fn) { |
957 GraphWriter<Graph> tmp(graph, fn); |
934 DigraphWriter<Digraph> tmp(digraph, fn); |
|
935 return tmp; |
958 return tmp; |
936 } |
959 } |
937 |
960 |
938 /// \brief Return a \ref DigraphWriter class |
961 /// \brief Return a \ref GraphWriter class |
939 /// |
962 /// |
940 /// This function just returns a \ref DigraphWriter class. |
963 /// This function just returns a \ref GraphWriter class. |
941 /// \relates DigraphWriter |
964 /// \relates GraphWriter |
942 template <typename Digraph> |
965 template <typename Graph> |
943 DigraphWriter<Digraph> digraphWriter(const Digraph& digraph, |
966 GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) { |
944 const char* fn) { |
967 GraphWriter<Graph> tmp(graph, fn); |
945 DigraphWriter<Digraph> tmp(digraph, fn); |
|
946 return tmp; |
968 return tmp; |
947 } |
969 } |
948 |
|
949 template <typename Graph> |
|
950 class GraphWriter; |
|
951 |
|
952 template <typename Graph> |
|
953 GraphWriter<Graph> graphWriter(const Graph& graph, |
|
954 std::ostream& os = std::cout); |
|
955 |
|
956 template <typename Graph> |
|
957 GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn); |
|
958 |
|
959 template <typename Graph> |
|
960 GraphWriter<Graph> graphWriter(const Graph& graph, const char *fn); |
|
961 |
970 |
962 /// \ingroup lemon_io |
971 /// \ingroup lemon_io |
963 /// |
972 /// |
964 /// \brief \ref lgf-format "LGF" writer for directed graphs |
973 /// \brief \ref lgf-format "LGF" writer for directed graphs |
965 /// |
974 /// |
1523 return *_os; |
1532 return *_os; |
1524 } |
1533 } |
1525 |
1534 |
1526 /// @} |
1535 /// @} |
1527 }; |
1536 }; |
1528 |
|
1529 /// \brief Return a \ref GraphWriter class |
|
1530 /// |
|
1531 /// This function just returns a \ref GraphWriter class. |
|
1532 /// \relates GraphWriter |
|
1533 template <typename Graph> |
|
1534 GraphWriter<Graph> graphWriter(const Graph& graph, |
|
1535 std::ostream& os = std::cout) { |
|
1536 GraphWriter<Graph> tmp(graph, os); |
|
1537 return tmp; |
|
1538 } |
|
1539 |
|
1540 /// \brief Return a \ref GraphWriter class |
|
1541 /// |
|
1542 /// This function just returns a \ref GraphWriter class. |
|
1543 /// \relates GraphWriter |
|
1544 template <typename Graph> |
|
1545 GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) { |
|
1546 GraphWriter<Graph> tmp(graph, fn); |
|
1547 return tmp; |
|
1548 } |
|
1549 |
|
1550 /// \brief Return a \ref GraphWriter class |
|
1551 /// |
|
1552 /// This function just returns a \ref GraphWriter class. |
|
1553 /// \relates GraphWriter |
|
1554 template <typename Graph> |
|
1555 GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) { |
|
1556 GraphWriter<Graph> tmp(graph, fn); |
|
1557 return tmp; |
|
1558 } |
|
1559 |
1537 |
1560 class SectionWriter; |
1538 class SectionWriter; |
1561 |
1539 |
1562 SectionWriter sectionWriter(std::istream& is); |
1540 SectionWriter sectionWriter(std::istream& is); |
1563 SectionWriter sectionWriter(const std::string& fn); |
1541 SectionWriter sectionWriter(const std::string& fn); |