31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Operations<br />

bool is.is open( ) returns if is is attached to an open file.<br />

void<br />

is.open(const char ∗ file name = 0, ios :: openmode mode = ios :: in)<br />

opens a file and attaches is to it.<br />

void is.close( ) closes the attached file and detaches is from it.<br />

void is.finish( ) reads till the end of the stream and then closes is.<br />

(This is useful if Coder is a checksummer; the checksum<br />

is only verified after EOF has been read.)<br />

streampos is.tellg( ) queries the position of the (internal) get pointer.<br />

This pointer determines the position in the (decoded)<br />

stream from which the next character is read.<br />

istream&<br />

istream&<br />

is.seekg(streampos pos)<br />

is.seekg(streamoff off , ios :: seekdir dir)<br />

sets the position of the get pointer to pos.<br />

moves the get pointer by off relative to the position<br />

determined by dir. dir can be ios :: beg (beginning),<br />

ios ::cur (current position) or ios ::end (last position).<br />

Coder∗ is.get coder( ) returns the instance of Coder which is used for decoding.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!