Module: Advanced Tools Package: Streams
RWvistreamFromDataInputStream RWvistream
bad() clear() eof() |
fail() get() getSourceStream() |
getString() good() operator>>() |
rdstate() RWvistreamFromDataInputStream() ~RWvistreamFromDataInputStream() |
#include <rw/stream/RWvistreamFromDataInputStream.h>
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(RWDataInputStream&
sourceStream);
Initializes the reference to the data stream that will be used as the source of data.
Parameter List
sourceStream |
The data stream that will serve as the source of data. |
virtual ~RWvistreamFromDataInputStream();
Destructor.
virtual RWvistream& operator>>(char& value);
Reads a narrow character from the stream.
Parameter List
value |
The narrow character to be read from the stream. |
virtual RWvistream& operator>>(wchar_t& value);
Reads a wide character from the stream.
Parameter List
value |
The wide character to be read from the stream. |
virtual RWvistream& operator>>(double& value); virtual RWvistream& operator>>(float& value); virtual RWvistream& operator>>(int& value); virtual RWvistream& operator>>(long& value); virtual RWvistream& operator>>(short& value); virtual RWvistream& operator>>(unsigned char& value); virtual RWvistream& operator>>(unsigned int& value); virtual RWvistream& operator>>(unsigned long& value); virtual RWvistream& operator>>(unsigned short& value);
These operator functions read a specified value from the stream.
Parameter List
value |
The value to be read from the stream. |
virtual int bad();
Forward to the isBad() function of the embedded data stream. Throws no exceptions.
virtual void clear(int v=0);
Not meaningful for data input stream. This function does nothing. Throws no exceptions.
virtual int eof();
Forward to the isEof() function of the embedded data stream. Throws no exceptions.
virtual int fail();
Forward to the isFail() function of the embedded data stream. Throws no exceptions.
virtual RWvistream& get(bool* arrayPt, size_t count); virtual RWvistream& get(char* arrayPt, size_t count); virtual RWvistream& get(double* arrayPt, size_t count); virtual RWvistream& get(float* arrayPt, size_t count); virtual RWvistream& get(int* arrayPt, size_t count); virtual RWvistream& get(long* arrayPt, size_t count); virtual RWvistream& get(short* arrayPt, size_t count); virtual RWvistream& get(unsigned char* arrayPt, size_t count); virtual RWvistream& get(unsigned int* arrayPt, size_t count); virtual RWvistream& get(unsigned long* arrayPt, size_t count); virtual RWvistream& get(unsigned short* arrayPt, size_t count); virtual RWvistream& get(wchar_t* arrayPt, size_t count);
These functions read an array of values from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
Parameter List
arrayPt |
A pointer to the array's first element. |
count |
The number of elements to be read from the stream. |
virtual RWvistream& get(bool& value); virtual RWvistream& get(char& value); virtual RWvistream& get(unsigned char& value); virtual RWvistream& get(wchar_t& value);
These functions get the next specified value from the input stream.
Parameter List
value |
A reference to the variable receiving the value read from the stream. |
virtual int get();
Gets and returns the next byte from the input stream, returning its value. Returns EOF if the end of the input sequence is encountered. Throws no exceptions.
virtual RWvistream& getString(char* string, size_t count);
Reads a narrow character string from the stream. The string must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
Parameter List
string |
A pointer to the string's first element. |
count |
The number of elements to be read from the stream. |
virtual int good();
Forward to the isGood() function of the embedded data stream. Throws no exceptions.
virtual int rdstate();
Returns the value of the stream state variable as defined in iostreams. Throws no exceptions.
RWDataInputStream& getSourceStream(); const RWDataInputStream& getSourceStream() const;
These functions return a handle to the embedded Data Input Stream that is used as the source of data. They throw no exceptions.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.