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.

void mb.truncate(streamsize n)<br />

also changes the size to n, but never allocates a new<br />

buffer.<br />

Precondition: n ≤ current capacity.<br />

char∗ mb.get buffer( ) returns the memory buffer of mb.<br />

void mb.set buffer(char ∗ buf , streamsize buf sz, bool own buf = false,<br />

bool wipe buf = false)<br />

makes buf the new memory buffer and changes capacity<br />

and size to buf sz. (<strong>The</strong> meaning of own buf and<br />

wipe buf is the same as in the second contructor.)<br />

void mb.wipe buffer( ) like reset, in addition all bytes in the memory buffer<br />

are set to zero.<br />

streamsize mb.in avail( ) returns how many characters can be read from mb<br />

before an underflow occurs.<br />

streamsize mb.in count( ) returns how many characters have been read from mb<br />

since the last reset.<br />

streamsize mb.out avail( ) returns how many characters can be written to mb<br />

before an overflow occurs.<br />

streamsize mb.out count( ) returns how many characters have been written to mb<br />

since the last reset.<br />

bool mb.had underflow( ) returns whether an underflow has occurred since the<br />

last reset.<br />

bool mb.had overflow( ) returns whether an overflow has occurred since the<br />

last reset.

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

Saved successfully!

Ooh no, something went wrong!