Input and Output OperationsGraphWin supports two file formats for the permanent storage of graphs and their attributes, the (native) gw-format and the GML-format. It can also generate a Postscript representation of the current drawing. The operations of this page are also available in the file-menu of the interactive interface.Read OperationsThe following read operations clear the current graph and read a new graph and its attributes from the input streamistr , respectively
the file fname . The operations return 0 on success and a special
error code if something went wrong. See the manual page for Manual
Page GraphWin for details.
int gw.read_gw(istream& istr); int gw.read_gw(string fname); int gw.read_gml(istream& istr); int gw.read_gml(string fname); Write OperationsThe following operations write the current graph and its attributes to the output streamostr , respectively the file fname . The operations
return 0 on success and a special error code if something went wrong.
int gw.write_gw(ostream& ostr); int gw.write_gw(string fname); int gw.write_gml(istream& ostr); int gw.write_gml(string fname); Generate a Postscript RepresentationPostscript representations of the drawing are generate bybool gw.save_ps(ostream& ostr); bool gw.save_ps(string fname);
|
See also:Manual Pages: |