Abstract base class that provides an interface for format-dependent storage of fundamental types and fundamental-type arrays. More...
#include <rw/vstream.h>
Public Member Functions | |
virtual | ~RWvostream () |
virtual int | bad ()=0 |
virtual void | clear (int v=0)=0 |
virtual int | eof ()=0 |
virtual int | fail ()=0 |
virtual RWvostream & | flush ()=0 |
virtual int | good ()=0 |
virtual RWvostream & | put (char c)=0 |
virtual RWvostream & | put (signed char c)=0 |
virtual RWvostream & | put (unsigned char c)=0 |
virtual RWvostream & | put (wchar_t wc)=0 |
virtual RWvostream & | put (bool b)=0 |
virtual RWvostream & | put (short i)=0 |
virtual RWvostream & | put (unsigned short i)=0 |
virtual RWvostream & | put (int i)=0 |
virtual RWvostream & | put (unsigned int i)=0 |
virtual RWvostream & | put (long i)=0 |
virtual RWvostream & | put (unsigned long i)=0 |
virtual RWvostream & | put (long long i)=0 |
virtual RWvostream & | put (unsigned long long i)=0 |
virtual RWvostream & | put (float f)=0 |
virtual RWvostream & | put (double d)=0 |
virtual RWvostream & | put (long double d)=0 |
virtual RWvostream & | put (const char *v, size_t n)=0 |
virtual RWvostream & | put (const signed char *v, size_t n)=0 |
virtual RWvostream & | put (const unsigned char *v, size_t n)=0 |
virtual RWvostream & | put (const wchar_t *v, size_t n)=0 |
virtual RWvostream & | put (const bool *v, size_t n)=0 |
virtual RWvostream & | put (const short *v, size_t n)=0 |
virtual RWvostream & | put (const unsigned short *v, size_t n)=0 |
virtual RWvostream & | put (const int *v, size_t n)=0 |
virtual RWvostream & | put (const unsigned int *v, size_t n)=0 |
virtual RWvostream & | put (const long *v, size_t n)=0 |
virtual RWvostream & | put (const unsigned long *v, size_t n)=0 |
virtual RWvostream & | put (const long long *v, size_t n)=0 |
virtual RWvostream & | put (const unsigned long long *v, size_t n)=0 |
virtual RWvostream & | put (const float *v, size_t n)=0 |
virtual RWvostream & | put (const double *v, size_t n)=0 |
virtual RWvostream & | put (const long double *v, size_t n)=0 |
virtual RWvostream & | putChar (char c)=0 |
virtual RWvostream & | putChar (signed char c)=0 |
virtual RWvostream & | putChar (unsigned char c)=0 |
virtual RWvostream & | putChar (wchar_t wc)=0 |
virtual RWvostream & | putChars (const char *s, size_t n) |
virtual RWvostream & | putSizeT (size_t sz)=0 |
virtual RWvostream & | putString (const char *s, size_t n)=0 |
virtual int | rdstate ()=0 |
void | version (unsigned v) |
unsigned | version () const |
Public Member Functions inherited from RWvios | |
operator void * () | |
Related Functions | |
(Note that these are not member functions.) | |
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 RWvostream is an abstract base class that provides an interface for format-independent storage of fundamental types, and arrays of fundamental types. Its counterpart, RWvistream, provides a complementary interface for the retrieval of variables of the fundamental types.
Because the interface of RWvistream and RWvostream is independent of formatting, your application need not be concerned with how variables are actually stored or restored – functionality that is the responsibility of whatever derived class you choose. For instance, you could use an operating-system independent US-ASCII format (classes RWpistream and RWpostream), a binary format (classes RWbistream and RWbostream), or define your own format (such as an interface to a network).
Note that, because this is an abstract base class, these design goals cannot be enforced; rather, the description here is merely the model of how a class derived from RWvistream and RWvostream should act.
About the Storage and Retrieval of Characters Characters can be thought of as either representing some alpha-numeric or control character, or as the literal number. Generally, the overloaded insertion (<<) and extraction (>>) operators seek to store and restore characters while preserving their symbolic meaning. That is, storage of a newline should be restored as a newline, regardless of its representation on the target machine. By contrast, member functions get() and put() should treat the character as a literal number whose value is to be preserved.
|
virtual |
Empty destructor.
|
pure 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 RWvios.
Implemented in RWXDRostream, RWpostream, RWbostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Sets the current error state to v. If v is zero, then this clears the error state.
Implements RWvios.
Implemented in RWXDRostream, RWpostream, RWbostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Returns a nonzero integer if an EOF
is encountered.
Implements RWvios.
Implemented in RWXDRostream, RWpostream, RWbostream, and RWvostreamToDataOutputStream.
|
pure 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 RWvios.
Implemented in RWXDRostream, RWpostream, RWbostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Sends the contents of the stream buffer to output immediately.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Returns a nonzero integer if no error bits have been set.
Implements RWvios.
Implemented in RWXDRostream, RWpostream, RWbostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the char
c to the output stream, preserving its value.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the signed char
c to the output stream, preserving its value.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the unsigned char
c to the output stream, preserving its value.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the wchar_t
wc to the output stream, preserving its value.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the bool
b to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the short
i to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the unsigned short
i to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the int
i to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the unsigned int
i to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the long
i to the output stream.
Implemented in RWXDRostream, RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the unsigned long
i to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the long long
i to the output stream.
long long
type. Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the unsigned long long
i to the output stream.
unsigned long long
type. Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the float
f to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the double
d to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the long double
d to the output stream.
long double
type. Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure 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).
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure 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).
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure 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).
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure 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).
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n bool
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n short
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n unsigned short
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n int
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n unsigned int
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n long
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n unsigned long
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n long long
starting at v to the output stream.
long long
type. Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n unsigned long long
starting at v to the output stream.
unsigned long long
type. Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n float
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n double
starting at v to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the vector of n long double
starting at v to the output stream.
long double
type. Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the char
c to the output stream, preserving its meaning. c is treated as a character.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the signed char
c to the output stream, preserving its meaning. c is treated as a character.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the unsigned char
c to the output stream, preserving its meaning. c is treated as a character.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the wchar_t
wc to the output stream, preserving its value. wc is treated as a character.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
inlinevirtual |
Stores n char
starting at s to the output stream. s is treated as a character string.
Reimplemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the size_t
sz to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Stores the character string, including embedded nulls, starting at s to the output stream.
Implemented in RWXDRostream, RWpostream, RWbostream, RWeostream, and RWvostreamToDataOutputStream.
|
pure virtual |
Returns the current error state.
Implements RWvios.
Implemented in RWXDRostream, RWpostream, RWbostream, and RWvostreamToDataOutputStream.
|
inline |
Changes the value of the version number to v.
|
inline |
Returns the value of the version number.
|
related |
Stores the null-terminated character string starting at s to the output stream.
|
related |
Stores the char
c to the output stream.
|
related |
Stores the signed char
c to the output stream.
|
related |
Stores the unsigned char
c to the output stream.
|
related |
Stores the wchar_t
wc to the output stream.
|
related |
Stores the bool
b to the output stream.
|
related |
Stores the long long
i to the output stream.
long long
type.
|
related |
Stores the unsigned long long
i to the output stream.
unsigned long long
type.
|
related |
Stores the float
f to the output stream.
|
related |
Stores the double
d to the output stream.
|
related |
Stores the long double
d to the output stream.
long double
type.
|
related |
Stores the short
i to the output stream.
|
related |
Stores the unsigned short
i to the output stream.
|
related |
Stores the int
i to the output stream.
|
related |
Stores the unsigned int
i to the output stream.
|
related |
Stores the long
i to the output stream.
|
related |
Stores the unsigned long
i to the output stream.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |