SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Stores variables in binary format. More...
#include <rw/bstream.h>
Public Member Functions | |
| RWbostream (std::ostream &str) | |
| RWbostream (std::streambuf *sb) | |
| virtual int | bad () |
| virtual void | clear (int v=0) |
| virtual int | eof () |
| virtual int | fail () |
| virtual RWvostream & | flush () |
| virtual int | good () |
| virtual RWvostream & | put (bool) |
| virtual RWvostream & | put (char c) |
| virtual RWvostream & | put (const bool *v, size_t n) |
| virtual RWvostream & | put (const char *v, size_t n) |
| virtual RWvostream & | put (const double *v, size_t n) |
| virtual RWvostream & | put (const float *v, size_t n) |
| virtual RWvostream & | put (const int *v, size_t n) |
| virtual RWvostream & | put (const long *v, size_t n) |
| virtual RWvostream & | put (const long double *v, size_t n) |
| virtual RWvostream & | put (const long long *v, size_t n) |
| virtual RWvostream & | put (const short *v, size_t n) |
| virtual RWvostream & | put (const signed char *v, size_t n) |
| virtual RWvostream & | put (const unsigned char *v, size_t n) |
| virtual RWvostream & | put (const unsigned int *v, size_t n) |
| virtual RWvostream & | put (const unsigned long *v, size_t n) |
| virtual RWvostream & | put (const unsigned long long *v, size_t n) |
| virtual RWvostream & | put (const unsigned short *v, size_t n) |
| virtual RWvostream & | put (const wchar_t *v, size_t n) |
| virtual RWvostream & | put (double d) |
| virtual RWvostream & | put (float f) |
| virtual RWvostream & | put (int i) |
| virtual RWvostream & | put (long double d) |
| virtual RWvostream & | put (long i) |
| virtual RWvostream & | put (long long i) |
| virtual RWvostream & | put (short i) |
| virtual RWvostream & | put (signed char c) |
| virtual RWvostream & | put (unsigned char c) |
| virtual RWvostream & | put (unsigned int i) |
| virtual RWvostream & | put (unsigned long i) |
| virtual RWvostream & | put (unsigned long long i) |
| virtual RWvostream & | put (unsigned short i) |
| virtual RWvostream & | put (wchar_t wc) |
| virtual RWvostream & | putChar (char c) |
| virtual RWvostream & | putChar (signed char c) |
| virtual RWvostream & | putChar (unsigned char c) |
| virtual RWvostream & | putChar (wchar_t wc) |
| virtual RWvostream & | putChars (const char *s, size_t n) |
| virtual RWvostream & | putSizeT (size_t sz) |
| virtual RWvostream & | putString (const char *s, size_t n) |
| virtual int | rdstate () |
Public Member Functions inherited from RWvostream | |
| virtual | ~RWvostream () |
| unsigned | version () const |
| void | version (unsigned v) |
Public Member Functions inherited from RWvios | |
| operator void * () | |
Additional Inherited Members | |
Related Symbols inherited from RWvostream | |
| RWvostream & | operator<< (RWvostream &os, bool b) |
| RWvostream & | operator<< (RWvostream &os, char c) |
| RWvostream & | operator<< (RWvostream &os, const char *s) |
| RWvostream & | operator<< (RWvostream &os, double d) |
| RWvostream & | operator<< (RWvostream &os, float f) |
| RWvostream & | operator<< (RWvostream &os, int i) |
| RWvostream & | operator<< (RWvostream &os, long double d) |
| RWvostream & | operator<< (RWvostream &os, long i) |
| RWvostream & | operator<< (RWvostream &os, long long i) |
| RWvostream & | operator<< (RWvostream &os, short i) |
| RWvostream & | operator<< (RWvostream &os, signed char c) |
| RWvostream & | operator<< (RWvostream &os, unsigned char c) |
| RWvostream & | operator<< (RWvostream &os, unsigned int i) |
| RWvostream & | operator<< (RWvostream &os, unsigned long i) |
| RWvostream & | operator<< (RWvostream &os, unsigned long long i) |
| RWvostream & | operator<< (RWvostream &os, unsigned short i) |
| RWvostream & | operator<< (RWvostream &os, wchar_t wc) |
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 std::streambuf. Because the RWbostream retains no information about the state of its associated std::streambuf, its use can be freely exchanged with other users of the std::streambuf (such as std::ostream or std::ofstream).
RWbostream can be interrogated as to the stream state using member functions good(), bad(), eof(), etc.
Program output:
| RWbostream::RWbostream | ( | std::ostream & | str | ) |
Constructs an RWbostream from the std::streambuf associated with the std::ostream str. For DOS, the std::streambuf must have been opened in binary mode.
| RWbostream::RWbostream | ( | std::streambuf * | sb | ) |
Constructs an RWbostream from the std::streambuf sb. For DOS, the std::streambuf must have been opened in binary mode.
|
inlinevirtual |
Returns a nonzero integer if the bad bit has been set. Normally this indicates that a severe error has occurred from which recovery is probably impossible.
Implements RWvostream.
|
inlinevirtual |
Sets the current error state to v. If v is zero, then this clears the error state.
Implements RWvostream.
|
inlinevirtual |
Returns a nonzero integer if an EOF is encountered.
Implements RWvostream.
|
inlinevirtual |
Returns a nonzero integer if the failed or bad bit has been set. Normally, this indicates that some storage or retrieval has failed, but that the stream is still in a usable state.
Implements RWvostream.
|
virtual |
Sends the contents of the stream buffer to output immediately.
Implements RWvostream.
Reimplemented in RWeostream.
|
inlinevirtual |
Returns a nonzero integer if no error bits have been set.
Implements RWvostream.
|
virtual |
|
virtual |
Stores the char c to the output stream, preserving its value.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n bool starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n char starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n double starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n float starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n int starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n long starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n long double starting at v to the output stream.
long double type. Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n long long starting at v to the output stream.
long long type. Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n short starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n signed char starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n unsigned char starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n unsigned int starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n unsigned long starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n unsigned long long starting at v to the output stream.
unsigned long long type. Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n unsigned short starting at v to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the vector of n wchar_t starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Stores the long double d to the output stream.
long double type. Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
|
virtual |
Stores the long long i to the output stream.
long long type. Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
|
virtual |
Stores the signed char c to the output stream, preserving its value.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the unsigned char c to the output stream, preserving its value.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
|
virtual |
Stores the unsigned long i to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the unsigned long long i to the output stream.
unsigned long long type. Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the unsigned short i to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the wchar_t wc to the output stream, preserving its value.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the char c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the signed char c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the unsigned char c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores the wchar_t wc to the output stream, preserving its value. wc is treated as a character.
Implements RWvostream.
Reimplemented in RWeostream.
|
virtual |
Stores n char starting at s to the output stream.
Reimplemented from RWvostream.
Reimplemented in RWeostream.
|
virtual |
|
virtual |
Stores the character string, including embedded nulls, starting at s to the output stream.
Implements RWvostream.
Reimplemented in RWeostream.
|
inlinevirtual |
Returns the current error state.
Implements RWvostream.
|
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |