Adaptor class that adapts the Rogue Wave virtual stream interface to the Rogue Wave data input stream interface.
More...
#include <rw/stream/RWvistreamFromDataInputStream.h>
|
| | RWvistreamFromDataInputStream (const RWDataInputStream &sourceStream) |
| |
| virtual | ~RWvistreamFromDataInputStream () |
| |
| virtual int | bad () |
| |
| virtual void | clear (int v=0) |
| |
| virtual int | eof () |
| |
| virtual int | fail () |
| |
| virtual int | get () |
| |
| virtual RWvistream & | get (char &c) |
| |
| virtual RWvistream & | get (signed char &c) |
| |
| virtual RWvistream & | get (unsigned char &c) |
| |
| virtual RWvistream & | get (wchar_t &wc) |
| |
| virtual RWvistream & | get (bool &b) |
| |
| virtual RWvistream & | get (short &i) |
| |
| virtual RWvistream & | get (unsigned short &i) |
| |
| virtual RWvistream & | get (int &i) |
| |
| virtual RWvistream & | get (unsigned int &i) |
| |
| virtual RWvistream & | get (long &i) |
| |
| virtual RWvistream & | get (unsigned long &i) |
| |
| virtual RWvistream & | get (long long &i) |
| |
| virtual RWvistream & | get (unsigned long long &i) |
| |
| virtual RWvistream & | get (float &f) |
| |
| virtual RWvistream & | get (double &d) |
| |
| virtual RWvistream & | get (long double &d) |
| |
| virtual RWvistream & | get (bool *v, size_t n) |
| |
| virtual RWvistream & | get (char *v, size_t n) |
| |
| virtual RWvistream & | get (double *v, size_t n) |
| |
| virtual RWvistream & | get (float *v, size_t n) |
| |
| virtual RWvistream & | get (int *v, size_t n) |
| |
| virtual RWvistream & | get (long *v, size_t n) |
| |
| virtual RWvistream & | get (short *v, size_t n) |
| |
| virtual RWvistream & | get (wchar_t *v, size_t n) |
| |
| virtual RWvistream & | get (signed char *v, size_t n) |
| |
| virtual RWvistream & | get (unsigned char *v, size_t n) |
| |
| virtual RWvistream & | get (unsigned short *v, size_t n) |
| |
| virtual RWvistream & | get (unsigned int *v, size_t n) |
| |
| virtual RWvistream & | get (unsigned long *v, size_t n) |
| |
| virtual RWvistream & | get (long double *v, size_t n) |
| |
| virtual RWvistream & | get (long long *v, size_t n) |
| |
| virtual RWvistream & | get (unsigned long long *v, size_t n) |
| |
| virtual RWvistream & | getChar (char &c) |
| |
| virtual RWvistream & | getChar (signed char &c) |
| |
| virtual RWvistream & | getChar (unsigned char &c) |
| |
| virtual RWvistream & | getChar (wchar_t &wc) |
| |
| virtual RWvistream & | getChars (char *s, size_t n) |
| |
| virtual RWvistream & | getSizeT (size_t &sz) |
| |
| virtual RWvistream & | getString (char *s, size_t n) |
| |
| virtual int | good () |
| |
| virtual int | rdstate () |
| |
| virtual | ~RWvistream () |
| |
| void | version (unsigned v) |
| |
| unsigned | version () const |
| |
| | operator void * () |
| |
|
| RWvistream & | operator>> (RWvistream &is, char &c) |
| |
| RWvistream & | operator>> (RWvistream &is, signed char &c) |
| |
| RWvistream & | operator>> (RWvistream &is, unsigned char &c) |
| |
| RWvistream & | operator>> (RWvistream &is, wchar_t &wc) |
| |
| RWvistream & | operator>> (RWvistream &is, bool &b) |
| |
| RWvistream & | operator>> (RWvistream &is, short &i) |
| |
| RWvistream & | operator>> (RWvistream &is, unsigned short &i) |
| |
| RWvistream & | operator>> (RWvistream &is, int &i) |
| |
| RWvistream & | operator>> (RWvistream &is, unsigned int &i) |
| |
| RWvistream & | operator>> (RWvistream &is, long &i) |
| |
| RWvistream & | operator>> (RWvistream &is, unsigned long &i) |
| |
| RWvistream & | operator>> (RWvistream &is, long long &i) |
| |
| RWvistream & | operator>> (RWvistream &is, unsigned long long &i) |
| |
| RWvistream & | operator>> (RWvistream &is, float &f) |
| |
| RWvistream & | operator>> (RWvistream &is, double &d) |
| |
| RWvistream & | operator>> (RWvistream &is, long double &d) |
| |
The class RWvistreamFromDataInputStream is an adaptor class that adapts the Rogue Wave virtual stream interface to the new Rogue Wave Data Input Stream interface. Requests made through the Rogue Wave virtual input stream interface are forwarded to the embedded RWDataInputStream handle.
| RWvistreamFromDataInputStream::RWvistreamFromDataInputStream |
( |
const RWDataInputStream & |
sourceStream | ) |
|
|
inline |
Initializes the reference to the data stream that will be used as the source of data.
- Parameters
-
| sourceStream | The data stream that will serve as the source of data. |
| virtual RWvistreamFromDataInputStream::~RWvistreamFromDataInputStream |
( |
| ) |
|
|
virtual |
| virtual int RWvistreamFromDataInputStream::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 RWvistream.
| virtual void RWvistreamFromDataInputStream::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 RWvistream.
| virtual int RWvistreamFromDataInputStream::eof |
( |
| ) |
|
|
virtual |
Returns a nonzero integer if an EOF is encountered.
Implements RWvistream.
| virtual int RWvistreamFromDataInputStream::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 RWvistream.
| virtual int RWvistreamFromDataInputStream::get |
( |
| ) |
|
|
virtual |
Gets and returns the next byte from the input stream, returning its value. Returns EOF if end of file is encountered.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
char & |
c | ) |
|
|
virtual |
Gets the next char from the input stream, returning its value in c.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
signed char & |
c | ) |
|
|
virtual |
Gets the next signed char from the input stream, returning its value in c.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned char & |
c | ) |
|
|
virtual |
Gets the next unsigned char from the input stream, returning its value in c.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
wchar_t & |
wc | ) |
|
|
virtual |
Gets the next wchar_t from the input stream, returning its value in wc.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
bool & |
b | ) |
|
|
virtual |
Gets the next bool from the input stream, returning its value in b.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
short & |
i | ) |
|
|
virtual |
Gets the next short from the input stream, returning its value in i.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned short & |
i | ) |
|
|
virtual |
Gets the next unsigned short from the input stream, returning its value in i.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
int & |
i | ) |
|
|
virtual |
Gets the next int from the input stream, returning its value in i.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned int & |
i | ) |
|
|
virtual |
Gets the next unsigned int from the input stream, returning its value in i.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
long & |
i | ) |
|
|
virtual |
Gets the next long from the input stream, returning its value in i.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned long & |
i | ) |
|
|
virtual |
Gets the next unsigned long from the input stream, returning its value in i.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
long long & |
i | ) |
|
|
virtual |
Gets the next long long from the input stream, returning its value in i.
- Note
- This operator function is available only if your compiler supports the
long long type.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned long long & |
i | ) |
|
|
virtual |
Gets the next unsigned long long from the input stream, returning its value in i.
- Note
- This operator function is available only if your compiler supports the
unsigned long long type.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
float & |
f | ) |
|
|
virtual |
Gets the next float from the input stream, returning its value in f.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
double & |
d | ) |
|
|
virtual |
Gets the next double from the input stream, returning its value in d.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
long double & |
d | ) |
|
|
virtual |
Gets the next long double from the input stream, returning its value in d.
- Note
- This operator function is available only if your compiler supports the
long double type.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
bool * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n bool and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
char * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n char and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
- Note
- This method retrieves raw characters and does not perform any conversions on special characters such as
'\n'.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
double * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n double and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
float * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n float and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
int * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n int and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
long * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n long and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
short * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n short and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
wchar_t * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n wchar_t and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
- Note
- This method retrieves raw characters and does not perform any conversions on special characters such as
L'\n'.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
signed char * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n signed char and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned char * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n unsigned char and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned short * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n unsigned short and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned int * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n unsigned int and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned long * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n unsigned long and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
long double * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n long double and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
- Note
- This operator function is available only if your compiler supports the
long double type.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
long long * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n long long and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
- Note
- This operator function is available only if your compiler supports the
long long type.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::get |
( |
unsigned long long * |
v, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Gets a vector of n unsigned long long and stores them in the array beginning at v. If the restore operation stops prematurely because there is no more data available on the stream, because an exception is thrown, or for some other reason, stores what has already been retrieved from the stream into v, and sets the failbit.
- Note
- This operator function is available only if your compiler supports the
unsigned long long type.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::getChar |
( |
char & |
c | ) |
|
|
virtual |
Gets the next char from the input stream, returning its value in c. c is treated as a character.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::getChar |
( |
signed char & |
c | ) |
|
|
virtual |
Gets the next signed char from the input stream, returning its value in c. c is treated as a character.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::getChar |
( |
unsigned char & |
c | ) |
|
|
virtual |
Gets the next unsigned char from the input stream, returning its value in c. c is treated as a character.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::getChar |
( |
wchar_t & |
wc | ) |
|
|
virtual |
Gets the next wchar_t from the input stream, returning its value in wc. wc is treated as a character.
Implements RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::getChars |
( |
char * |
s, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Restores n char from the input stream into the array beginning at s. The function stops reading after n char. The resulting buffer is not null terminated. s is treated as a character string.
- Note
- This function delegates to get(char*, size_t) if not overridden.
Reimplemented from RWvistream.
| virtual RWvistream& RWvistreamFromDataInputStream::getSizeT |
( |
size_t & |
sz | ) |
|
|
virtual |
Gets the next size_t value from the input stream, returning its value in sz.
Implements RWvistream.
Returns a handle to the embedded Data Input Stream that is used as the source of data. Throws no exceptions.
Returns a handle to the embedded Data Input Stream that is used as the source of data. Throws no exceptions.
| virtual RWvistream& RWvistreamFromDataInputStream::getString |
( |
char * |
s, |
|
|
size_t |
n |
|
) |
| |
|
virtual |
Restores a character string from the input stream that has been stored to the output stream using RWvostream::putString(), then saves it in the array beginning at s. The function stops reading at the end of the string or after n - 1 characters, whichever comes first. If n - 1 characters have been read and the nth character is not the string terminator, then sets the failbit of the stream. In either case, the string is terminated with a null byte.
Implements RWvistream.
| virtual int RWvistreamFromDataInputStream::good |
( |
| ) |
|
|
virtual |
Returns a nonzero integer if no error bits have been set.
Implements RWvistream.
| virtual int RWvistreamFromDataInputStream::rdstate |
( |
| ) |
|
|
virtual |
Returns the current error state.
Implements RWvistream.