|
Input and Output Operations
GraphWin 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 Operations
The following read operations clear the current graph and read a new graph
and its attributes from the input stream istr, 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 Operations
The following operations write the current graph and its attributes to the
output stream ostr, 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 Representation
Postscript representations of the drawing are generate by
bool gw.save_ps(ostream& ostr);
bool gw.save_ps(string fname);
|
See also:
GraphWin
Programming Interface
Attributes and Parameters
Interactive Interface
LEDA GraphWin File Format
Graph Data Types
LEDA Graph File
Format
Strings
Manual Pages:
Manual
Page GraphWin
|