Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWbostream


RWvostream RWiosRWvios RWbostream ios

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/bstream.h>
// Construct an 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 RWbostream 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 white space. Such white space is interpreted literally and is read back in as a character string.

RWbostream can be interrogated as to the stream state using member functions good(), bad(), eof(), and so on.

Example

See RWbistream for an example of how the file "data.dat" might be read back in.

Public Constructors

RWbostream(streambuf* s);
RWbostream(ostream& str);

Public Destructor

Public Operators

virtual RWvostream&
operator<<(const char* s);
virtual RWvostream&
operator<<(const wchar_t* ws);
virtual RWvostream&
operator<<(char c);
virtual RWvostream&
operator<<(wchar_t wc);
virtual RWvostream&
operator<<(unsigned char c);
virtual RWvostream&
operator<<(double d);
virtual RWvostream&
operator<<(float f);
virtual RWvostream&
operator<<(int i);
virtual RWvostream&
operator<<(unsigned int i);
virtual RWvostream&
operator<<(long l);
virtual RWvostream&
operator<<(unsigned long l);
virtual RWvostream&
operator<<(short s);
virtual RWvostream&
operator<<(unsigned short s);
operator void*();

Public Member Functions

virtual RWvostream&
flush();
virtual RWvostream&
put(char c);
virtual RWvostream&
put(wchar_t wc);
virtual RWvostream&
put(unsigned char c);
virtual RWvostream&
put(const char* p, size_t N);
virtual RWvostream&
put(const wchar_t* p, size_t N);
virtual RWvostream&
put(const unsigned char* p, size_t N);
virtual RWvostream&
put(const short* p, size_t N);
virtual RWvostream&
put(const unsigned short* p, size_t N);
virtual RWvostream&
put(const int* p, size_t N);
virtual RWvostream&
put(const unsigned int* p, size_t N);
virtual RWvostream&
put(const long* p, size_t N);
virtual RWvostream&
put(const unsigned long* p, size_t N);
virtual RWvostream&
put(const float* p, size_t N);
virtual RWvostream&
put(const double* p, size_t N);
virtual RWvostream&
putString(const char* p, size_t N);
virtual RWvostream&
putString(const char*s, size_t N);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.