[Lemon-commits] [lemon_svn] deba: r2271 - hugo/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:51:24 CET 2006


Author: deba
Date: Wed Oct 26 12:59:51 2005
New Revision: 2271

Modified:
   hugo/trunk/lemon/graph_to_eps.h

Log:
Filename can be given as std::string



Modified: hugo/trunk/lemon/graph_to_eps.h
==============================================================================
--- hugo/trunk/lemon/graph_to_eps.h	(original)
+++ hugo/trunk/lemon/graph_to_eps.h	Wed Oct 26 12:59:51 2005
@@ -1137,6 +1137,22 @@
     (DefaultGraphToEpsTraits<G>(g,*new std::ofstream(file_name),true));
 }
 
+///Generates an EPS file from a graph
+
+///\ingroup io_group
+///This function does the same as
+///\ref graphToEps(G &g,std::ostream& os)
+///but it writes its output into the file \c file_name
+///instead of a stream.
+///\sa graphToEps(G &g, std::ostream& os)
+template<class G>
+GraphToEps<DefaultGraphToEpsTraits<G> > 
+graphToEps(G &g,const std::string& file_name)
+{
+  return GraphToEps<DefaultGraphToEpsTraits<G> >
+    (DefaultGraphToEpsTraits<G>(g,*new std::ofstream(file_name.c_str()),true));
+}
+
 } //END OF NAMESPACE LEMON
 
 #endif // LEMON_GRAPH_TO_EPS_H



More information about the Lemon-commits mailing list