Adaptor class that adapts the Rogue Wave virtual stream interface to the Rogue Wave data output stream interface.
More...
#include <rw/stream/RWvostreamToDataOutputStream.h>
|
| RWvostreamToDataOutputStream (const RWDataOutputStream &sinkStream) |
|
virtual | ~RWvostreamToDataOutputStream () |
|
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 b) |
|
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 () |
|
virtual | ~RWvostream () |
|
unsigned | version () const |
|
void | version (unsigned v) |
|
| operator void * () |
|
|
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) |
|
The class RWvostreamToDataOutputStream is an adaptor class that adapts the Rogue Wave virtual stream interface to the new Rogue Wave data output stream interface. Requests made through the Rogue Wave virtual output stream interface are forwarded to the embedded RWDataOutputStream handle.
◆ RWvostreamToDataOutputStream()
RWvostreamToDataOutputStream::RWvostreamToDataOutputStream |
( |
const RWDataOutputStream & | sinkStream | ) |
|
|
inline |
Initializes the reference to the data stream that will be used as the sink of data.
- Parameters
-
sinkStream | The data stream that will serve as the sink of data. |
◆ ~RWvostreamToDataOutputStream()
virtual RWvostreamToDataOutputStream::~RWvostreamToDataOutputStream |
( |
| ) |
|
|
virtual |
◆ bad()
virtual int RWvostreamToDataOutputStream::bad |
( |
| ) |
|
|
virtual |
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.
◆ clear()
virtual void RWvostreamToDataOutputStream::clear |
( |
int | v = 0 | ) |
|
|
virtual |
Not supported. RWDataOutputStream does not provide a mechanism for setting/clearing the underlying state. Calls to this function are ignored.
Implements RWvostream.
◆ eof()
virtual int RWvostreamToDataOutputStream::eof |
( |
| ) |
|
|
virtual |
Returns a nonzero integer if an EOF
is encountered.
Implements RWvostream.
◆ fail()
virtual int RWvostreamToDataOutputStream::fail |
( |
| ) |
|
|
virtual |
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.
◆ flush()
virtual RWvostream & RWvostreamToDataOutputStream::flush |
( |
| ) |
|
|
virtual |
Sends the contents of the stream buffer to output immediately.
Implements RWvostream.
◆ getSinkStream() [1/2]
Returns a handle to the embedded data output stream that is used as the sink of data. Throws no exceptions.
◆ getSinkStream() [2/2]
Returns a handle to the embedded data output stream that is used as the sink of data. Throws no exceptions.
◆ good()
virtual int RWvostreamToDataOutputStream::good |
( |
| ) |
|
|
virtual |
Returns a nonzero integer if no error bits have been set.
Implements RWvostream.
◆ put() [1/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
bool | b | ) |
|
|
virtual |
Stores the bool
b to the output stream.
Implements RWvostream.
◆ put() [2/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
char | c | ) |
|
|
virtual |
Stores the char
c to the output stream, preserving its value.
Implements RWvostream.
◆ put() [3/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const bool * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n bool
starting at v to the output stream.
Implements RWvostream.
◆ put() [4/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const char * | v, |
|
|
size_t | n ) |
|
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.
◆ put() [5/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const double * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n double
starting at v to the output stream.
Implements RWvostream.
◆ put() [6/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const float * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n float
starting at v to the output stream.
Implements RWvostream.
◆ put() [7/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const int * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n int
starting at v to the output stream.
Implements RWvostream.
◆ put() [8/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const long * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n long
starting at v to the output stream.
Implements RWvostream.
◆ put() [9/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const long double * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n long double
starting at v to the output stream.
- Note
- This operator function is available only if your compiler supports the
long double
type.
Implements RWvostream.
◆ put() [10/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const long long * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n long long
starting at v to the output stream.
- Note
- This operator function is available only if your compiler supports the
long long
type.
Implements RWvostream.
◆ put() [11/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const short * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n short
starting at v to the output stream.
Implements RWvostream.
◆ put() [12/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const signed char * | v, |
|
|
size_t | n ) |
|
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.
◆ put() [13/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const unsigned char * | v, |
|
|
size_t | n ) |
|
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.
◆ put() [14/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const unsigned int * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n unsigned int
starting at v to the output stream.
Implements RWvostream.
◆ put() [15/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const unsigned long * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n unsigned long
starting at v to the output stream.
Implements RWvostream.
◆ put() [16/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const unsigned long long * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n unsigned long long
starting at v to the output stream.
- Note
- This operator function is available only if your compiler supports the
unsigned long long
type.
Implements RWvostream.
◆ put() [17/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const unsigned short * | v, |
|
|
size_t | n ) |
|
virtual |
Stores the vector of n unsigned short
starting at v to the output stream.
Implements RWvostream.
◆ put() [18/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
const wchar_t * | v, |
|
|
size_t | n ) |
|
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.
◆ put() [19/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
double | d | ) |
|
|
virtual |
Stores the double
d to the output stream.
Implements RWvostream.
◆ put() [20/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
float | f | ) |
|
|
virtual |
Stores the float
f to the output stream.
Implements RWvostream.
◆ put() [21/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
int | i | ) |
|
|
virtual |
Stores the int
i to the output stream.
Implements RWvostream.
◆ put() [22/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
long double | d | ) |
|
|
virtual |
Stores the long double
d to the output stream.
- Note
- This operator function is available only if your compiler supports the
long double
type.
Implements RWvostream.
◆ put() [23/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
long | i | ) |
|
|
virtual |
Stores the long
i to the output stream.
Implements RWvostream.
◆ put() [24/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
long long | i | ) |
|
|
virtual |
Stores the long long
i to the output stream.
- Note
- This operator function is available only if your compiler supports the
long long
type.
Implements RWvostream.
◆ put() [25/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
short | i | ) |
|
|
virtual |
Stores the short
i to the output stream.
Implements RWvostream.
◆ put() [26/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
signed char | c | ) |
|
|
virtual |
Stores the signed char
c to the output stream, preserving its value.
Implements RWvostream.
◆ put() [27/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
unsigned char | c | ) |
|
|
virtual |
Stores the unsigned char
c to the output stream, preserving its value.
Implements RWvostream.
◆ put() [28/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
unsigned int | i | ) |
|
|
virtual |
Stores the unsigned int
i to the output stream.
Implements RWvostream.
◆ put() [29/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
unsigned long | i | ) |
|
|
virtual |
Stores the unsigned long
i to the output stream.
Implements RWvostream.
◆ put() [30/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
unsigned long long | i | ) |
|
|
virtual |
Stores the unsigned long long
i to the output stream.
- Note
- This operator function is available only if your compiler supports the
unsigned long long
type.
Implements RWvostream.
◆ put() [31/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
unsigned short | i | ) |
|
|
virtual |
Stores the unsigned short
i to the output stream.
Implements RWvostream.
◆ put() [32/32]
virtual RWvostream & RWvostreamToDataOutputStream::put |
( |
wchar_t | wc | ) |
|
|
virtual |
Stores the wchar_t
wc to the output stream, preserving its value.
Implements RWvostream.
◆ putChar() [1/4]
virtual RWvostream & RWvostreamToDataOutputStream::putChar |
( |
char | c | ) |
|
|
virtual |
Stores the char
c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
◆ putChar() [2/4]
virtual RWvostream & RWvostreamToDataOutputStream::putChar |
( |
signed char | c | ) |
|
|
virtual |
Stores the signed char
c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
◆ putChar() [3/4]
virtual RWvostream & RWvostreamToDataOutputStream::putChar |
( |
unsigned char | c | ) |
|
|
virtual |
Stores the unsigned char
c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
◆ putChar() [4/4]
virtual RWvostream & RWvostreamToDataOutputStream::putChar |
( |
wchar_t | wc | ) |
|
|
virtual |
Stores the wchar_t
wc to the output stream, preserving its value. wc is treated as a character.
Implements RWvostream.
◆ putChars()
virtual RWvostream & RWvostreamToDataOutputStream::putChars |
( |
const char * | s, |
|
|
size_t | n ) |
|
virtual |
Stores n char
starting at s to the output stream. s is treated as a character string.
- Note
- This function delegates to put(const char*, size_t) if not overridden.
Reimplemented from RWvostream.
◆ putSizeT()
virtual RWvostream & RWvostreamToDataOutputStream::putSizeT |
( |
size_t | sz | ) |
|
|
virtual |
Stores the size_t
sz to the output stream.
Implements RWvostream.
◆ putString()
virtual RWvostream & RWvostreamToDataOutputStream::putString |
( |
const char * | s, |
|
|
size_t | n ) |
|
virtual |
Stores the character string, including embedded nulls, starting at s to the output stream.
Implements RWvostream.
◆ rdstate()
virtual int RWvostreamToDataOutputStream::rdstate |
( |
| ) |
|
|
virtual |
Returns the current error state.
Implements RWvostream.