diff -r 94387da47f79 -r c5fd2d996909 lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Thu Mar 05 10:13:20 2009 +0000 +++ b/lemon/graph_to_eps.h Sun Mar 29 23:08:20 2009 +0200 @@ -64,11 +64,11 @@ ///Default traits class of \ref GraphToEps. /// -///\c G is the type of the underlying graph. -template +///\param GR is the type of the underlying graph. +template struct DefaultGraphToEpsTraits { - typedef G Graph; + typedef GR Graph; typedef typename Graph::Node Node; typedef typename Graph::NodeIt NodeIt; typedef typename Graph::Arc Arc; @@ -139,15 +139,14 @@ ///Constructor ///Constructor - ///\param _g Reference to the graph to be printed. - ///\param _os Reference to the output stream. - ///\param _os Reference to the output stream. + ///\param gr Reference to the graph to be printed. + ///\param ost Reference to the output stream. ///By default it is std::cout. - ///\param _pros If it is \c true, then the \c ostream referenced by \c _os + ///\param pros If it is \c true, then the \c ostream referenced by \c os ///will be explicitly deallocated by the destructor. - DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout, - bool _pros=false) : - g(_g), os(_os), + DefaultGraphToEpsTraits(const GR &gr, std::ostream& ost = std::cout, + bool pros = false) : + g(gr), os(ost), _coords(dim2::Point(1,1)), _nodeSizes(1), _nodeShapes(0), _nodeColors(WHITE), _arcColors(BLACK), _arcWidths(1.0), _arcWidthScale(0.003), @@ -158,8 +157,8 @@ _enableParallel(false), _parArcDist(1), _showNodeText(false), _nodeTexts(false), _nodeTextSize(1), _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0), - _undirected(lemon::UndirectedTagIndicator::value), - _pleaseRemoveOsStream(_pros), _scaleToA4(false), + _undirected(lemon::UndirectedTagIndicator::value), + _pleaseRemoveOsStream(pros), _scaleToA4(false), _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK), _autoNodeScale(false), _autoArcWidthScale(false), @@ -1134,55 +1133,55 @@ ///\warning Don't forget to put the \ref GraphToEps::run() "run()" ///to the end of the parameter list. ///\sa GraphToEps -///\sa graphToEps(G &g, const char *file_name) -template -GraphToEps > -graphToEps(G &g, std::ostream& os=std::cout) +///\sa graphToEps(GR &g, const char *file_name) +template +GraphToEps > +graphToEps(GR &g, std::ostream& os=std::cout) { return - GraphToEps >(DefaultGraphToEpsTraits(g,os)); + GraphToEps >(DefaultGraphToEpsTraits(g,os)); } ///Generates an EPS file from a graph ///\ingroup eps_io ///This function does the same as -///\ref graphToEps(G &g,std::ostream& os) +///\ref graphToEps(GR &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 -GraphToEps > -graphToEps(G &g,const char *file_name) +///\sa graphToEps(GR &g, std::ostream& os) +template +GraphToEps > +graphToEps(GR &g,const char *file_name) { std::ostream* os = new std::ofstream(file_name); if (!(*os)) { delete os; throw IoError("Cannot write file", file_name); } - return GraphToEps > - (DefaultGraphToEpsTraits(g,*os,true)); + return GraphToEps > + (DefaultGraphToEpsTraits(g,*os,true)); } ///Generates an EPS file from a graph ///\ingroup eps_io ///This function does the same as -///\ref graphToEps(G &g,std::ostream& os) +///\ref graphToEps(GR &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 -GraphToEps > -graphToEps(G &g,const std::string& file_name) +///\sa graphToEps(GR &g, std::ostream& os) +template +GraphToEps > +graphToEps(GR &g,const std::string& file_name) { std::ostream* os = new std::ofstream(file_name.c_str()); if (!(*os)) { delete os; throw IoError("Cannot write file", file_name); } - return GraphToEps > - (DefaultGraphToEpsTraits(g,*os,true)); + return GraphToEps > + (DefaultGraphToEpsTraits(g,*os,true)); } } //END OF NAMESPACE LEMON