SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Specializes the base class RWbostream to store values in a portable binary format. More...
#include <rw/estream.h>
Public Types | |
enum | Endian { LittleEndian, BigEndian, HostEndian } |
Public Member Functions | |
RWeostream (std::ostream &str, Endian fmt=HostEndian) | |
RWeostream (std::streambuf *sb, Endian fmt=HostEndian) | |
virtual RWvostream & | flush () |
virtual RWvostream & | put (char c) |
virtual RWvostream & | put (signed char c) |
virtual RWvostream & | put (unsigned char c) |
virtual RWvostream & | put (wchar_t wc) |
virtual RWvostream & | put (bool b) |
virtual RWvostream & | put (short i) |
virtual RWvostream & | put (unsigned short i) |
virtual RWvostream & | put (int i) |
virtual RWvostream & | put (unsigned int i) |
virtual RWvostream & | put (long i) |
virtual RWvostream & | put (unsigned long i) |
virtual RWvostream & | put (long long i) |
virtual RWvostream & | put (unsigned long long i) |
virtual RWvostream & | put (float f) |
virtual RWvostream & | put (double d) |
virtual RWvostream & | put (long double) |
virtual RWvostream & | put (const char *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 wchar_t *v, size_t n) |
virtual RWvostream & | put (const bool *v, size_t n) |
virtual RWvostream & | put (const short *v, size_t n) |
virtual RWvostream & | put (const unsigned short *v, size_t n) |
virtual RWvostream & | put (const int *v, size_t n) |
virtual RWvostream & | put (const unsigned int *v, size_t n) |
virtual RWvostream & | put (const long *v, size_t n) |
virtual RWvostream & | put (const unsigned long *v, size_t n) |
virtual RWvostream & | put (const long long *v, size_t n) |
virtual RWvostream & | put (const unsigned long long *v, size_t n) |
virtual RWvostream & | put (const float *v, size_t n) |
virtual RWvostream & | put (const double *v, size_t n) |
virtual RWvostream & | put (const long double *, size_t) |
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) |
Public Member Functions inherited from RWbostream | |
RWbostream (std::ostream &str) | |
RWbostream (std::streambuf *sb) | |
virtual int | bad () |
virtual void | clear (int v=0) |
virtual int | eof () |
virtual int | fail () |
virtual int | good () |
virtual int | rdstate () |
Public Member Functions inherited from RWvostream | |
virtual | ~RWvostream () |
void | version (unsigned v) |
unsigned | version () const |
Public Member Functions inherited from RWvios | |
operator void * () | |
Additional Inherited Members | |
Related Functions inherited from RWvostream | |
RWvostream & | operator<< (RWvostream &os, const char *s) |
RWvostream & | operator<< (RWvostream &os, char c) |
RWvostream & | operator<< (RWvostream &os, signed char c) |
RWvostream & | operator<< (RWvostream &os, unsigned char c) |
RWvostream & | operator<< (RWvostream &os, wchar_t wc) |
RWvostream & | operator<< (RWvostream &os, bool b) |
RWvostream & | operator<< (RWvostream &os, long long i) |
RWvostream & | operator<< (RWvostream &os, unsigned long long i) |
RWvostream & | operator<< (RWvostream &os, float f) |
RWvostream & | operator<< (RWvostream &os, double d) |
RWvostream & | operator<< (RWvostream &os, long double d) |
RWvostream & | operator<< (RWvostream &os, short i) |
RWvostream & | operator<< (RWvostream &os, unsigned short i) |
RWvostream & | operator<< (RWvostream &os, int i) |
RWvostream & | operator<< (RWvostream &os, unsigned int i) |
RWvostream & | operator<< (RWvostream &os, long i) |
RWvostream & | operator<< (RWvostream &os, unsigned long i) |
Class RWeostream specializes the base class RWbostream to store values in a portable binary format. The results can be restored via its counterpart, RWeistream.
See the entry for RWeistream for a general description of the endian stream classes.
enum RWeostream::Endian |
RWeostream::RWeostream | ( | std::ostream & | str, |
Endian | fmt = HostEndian |
||
) |
Constructs an RWeostream from the std::streambuf associated with the std::ostream str. Values placed into the stream have an endian format given by fmt. For DOS, the str must have been opened in binary mode.
RWStreamErr | Thrown if the underlying std::streambuf is not empty. |
RWeostream::RWeostream | ( | std::streambuf * | sb, |
Endian | fmt = HostEndian |
||
) |
Constructs an RWeostream from the std::streambuf s. Values placed into the stream have an endian format given by fmt. For DOS, the std::streambuf s must have been created in binary mode.
RWStreamErr | Thrown if the std::streambuf sb is not empty. |
|
inlinevirtual |
Sends the contents of the stream buffer to output immediately.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the char
c to the output stream, preserving its value.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the signed char
c to the output stream, preserving its value.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the unsigned char
c to the output stream, preserving its value.
Reimplemented from RWbostream.
|
virtual |
Stores the wchar_t
wc to the output stream, preserving its value.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the bool
b to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the short
i to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the unsigned short
i to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the int
i to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the unsigned int
i to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the long
i to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the unsigned long
i to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the long long
i to the output stream.
long long
type. Reimplemented from RWbostream.
|
virtual |
Stores the unsigned long long
i to the output stream.
unsigned long long
type. Reimplemented from RWbostream.
|
virtual |
Stores the float
f to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the double
d to the output stream.
Reimplemented from RWbostream.
|
inlinevirtual |
RWInternalErr | This function is not supported with endian streams. |
long double
type. Reimplemented from RWbostream.
|
inlinevirtual |
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).
Reimplemented from RWbostream.
|
inlinevirtual |
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).
Reimplemented from RWbostream.
|
inlinevirtual |
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).
Reimplemented from RWbostream.
|
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).
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the vector of n bool
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n short
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n unsigned short
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n int
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n unsigned int
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n long
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n unsigned long
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n long long
starting at v to the output stream.
long long
type. Reimplemented from RWbostream.
|
virtual |
Stores the vector of n unsigned long long
starting at v to the output stream.
unsigned long long
type. Reimplemented from RWbostream.
|
virtual |
Stores the vector of n float
starting at v to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the vector of n double
starting at v to the output stream.
Reimplemented from RWbostream.
|
inlinevirtual |
RWInternalErr | This function is not supported with endian streams. |
long double
type. Reimplemented from RWbostream.
|
inlinevirtual |
Stores the char
c to the output stream, preserving its meaning. c is treated as a character.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the signed char
c to the output stream, preserving its meaning. c is treated as a character.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the unsigned char
c to the output stream, preserving its meaning. c is treated as a character.
Reimplemented from RWbostream.
|
inlinevirtual |
Stores the wchar_t
wc to the output stream, preserving its value. wc is treated as a character.
Reimplemented from RWbostream.
|
virtual |
Stores n char
starting at s to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the size_t
sz to the output stream.
Reimplemented from RWbostream.
|
virtual |
Stores the character string, including embedded nulls, starting at s to the output stream.
Reimplemented from RWbostream.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |