Tools.h++ Manual
21-30 104011 Tandem Computers Incorporated
21
RWbostream
RWbostream
||
RWvostream ios
|
RWvios
Synopsis
#include <rw/bstream.h>
// Construct a RWbostream, using cout's streambuf:
RWbostream bstr(cout);
Description Class
RWbostream
specializes the abstract base class
RWvostream
to store
variables in binary format. The results can be restored by using its counterpart
RWbistream
.
You can think of it as a binary veneer over an associated
streambuf
. Because
the
RWbostream
retains no information about the state of its associated
streambuf
, its use can be freely exchanged with other users of the streambuf
(such as
ostream
or
ofstream
).
Note – Variables should not be separated with whitespace. Such whitespace
would be interpreted literally and would have to be read back in as a character
string.
RWbostream
can be interrogated as to the stream state using member
functions
good(), bad(), eof()
, etc.