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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.19 Encoding Output Stream ( encoding ostream )<br />

1. Definition<br />

<strong>The</strong> type encoding ostream is the encoding counterpart of the type ostream from<br />

the C++ iostream library. Each instance os of type encoding ostream is attached<br />

to a streambuf sb. Every data that is written to os is encoded on-the-fly by an instance<br />

of type Coder and then written to sb. All operations and all operators (>) defined for C++ istreams can be applied to decoding istream as well.<br />

#include < <strong>LEDA</strong>/coding/coder util.h ><br />

2. Creation<br />

decoding istream is(streambuf ∗ encoded stream, bool own stream = false);<br />

creates an instance is and attaches it to the given streambuf object.<br />

3. Operations<br />

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

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

Saved successfully!

Ooh no, something went wrong!