lemon/graph_to_eps.h
changeset 304 1e81878b0e54
parent 290 f6899946c1ac
child 313 64f8f7cc6168
equal deleted inserted replaced
16:efc912bbb19e 17:803c038136e2
  1168 graphToEps(G &g,const char *file_name)
  1168 graphToEps(G &g,const char *file_name)
  1169 {
  1169 {
  1170   std::ostream* os = new std::ofstream(file_name);
  1170   std::ostream* os = new std::ofstream(file_name);
  1171   if (!(*os)) {
  1171   if (!(*os)) {
  1172     delete os;
  1172     delete os;
  1173     throw IoError(file_name, "Cannot write file");
  1173     throw IoError("Cannot write file", file_name);
  1174   }
  1174   }
  1175   return GraphToEps<DefaultGraphToEpsTraits<G> >
  1175   return GraphToEps<DefaultGraphToEpsTraits<G> >
  1176     (DefaultGraphToEpsTraits<G>(g,*os,true));
  1176     (DefaultGraphToEpsTraits<G>(g,*os,true));
  1177 }
  1177 }
  1178 
  1178 
  1189 graphToEps(G &g,const std::string& file_name)
  1189 graphToEps(G &g,const std::string& file_name)
  1190 {
  1190 {
  1191   std::ostream* os = new std::ofstream(file_name.c_str());
  1191   std::ostream* os = new std::ofstream(file_name.c_str());
  1192   if (!(*os)) {
  1192   if (!(*os)) {
  1193     delete os;
  1193     delete os;
  1194     throw IoError(file_name, "Cannot write file");
  1194     throw IoError("Cannot write file", file_name);
  1195   }
  1195   }
  1196   return GraphToEps<DefaultGraphToEpsTraits<G> >
  1196   return GraphToEps<DefaultGraphToEpsTraits<G> >
  1197     (DefaultGraphToEpsTraits<G>(g,*os,true));
  1197     (DefaultGraphToEpsTraits<G>(g,*os,true));
  1198 }
  1198 }
  1199 
  1199