Module: Advanced Tools Package: Streams
RWDataInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase
#include <rw/stream/RWDataInputStreamImp.h>
Abstract base class for all the data input stream implementation classes. Implements the body idiom from the handle-body pattern.
RWDataInputStreamImp();
Constructor. Throws no exceptions.
virtual ~RWDataInputStreamImp();
Destructor.
virtual RWDataInputStream acquire();
Acquires the synchronization mechanism provided by a stream concrete implementation. The acquire() member function returns a handle to the data stream that should be used for input operation after acquiring the synchronization mechanism.
virtual RWSize getBools(bool* arrayPt, RWSize count) =0; virtual RWSize getChars(char* arrayPt, RWSize count) =0; virtual RWSize getDoubles(double* arrayPt, RWSize count) =0; virtual RWSize getFloats(float* arrayPt, RWSize count) =0; virtual RWSize getInts(int* arrayPt, RWSize count) =0; virtual RWSize getLongs(long* arrayPt, RWSize count) =0; virtual RWSize getLongDoubles(long double* arrayPt, RWSize count) =0; virtual RWSize getLongLongs(long long* arrayPt, RWSize count) =0; virtual RWSize getShorts(short* arrayPt, RWSize count) =0; virtual RWSize getSignedChars(signed char* arrayPt, RWSize count) =0; virtual RWSize getUnsignedChars(unsigned char* arrayPt, RWSize count) =0; virtual RWSize getUnsignedInts(unsigned int* arrayPt, RWSize count) =0; virtual RWSize getUnsignedLongs(unsigned long* arrayPt, RWSize count) =0; virtual RWSize getUnsignedShorts(unsigned short* arrayPt, RWSize count) =0; virtual RWSize getWchar_ts(wchar_t* arrayPt, RWSize count) =0;
These functions read an array of values from the stream. The array must have been pre-allocated to contain at least count elements. The functions return 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 void getBool(bool& value) =0; virtual void getChar(char& value) =0; virtual void getDouble(double& value) =0; virtual void getFloat(float& value) =0; virtual void getInt(int& value) =0; virtual void getLong(long& value) =0; virtual void getLongDouble(long double& value) =0; virtual void getLongLong(long long& value) =0; virtual void getShort(short& value) =0; virtual void getSignedChar(signed char& value) =0; virtual void getUnsignedChar(unsigned char& value) =0; virtual void getUnsignedInt(unsigned int& value) =0; virtual void getUnsignedLong(unsigned long& value) =0; virtual void getUnsignedShort(unsigned short& value) =0; virtual void getWCharacter(wchar_t& value) =0; virtual void getWchar_t(wchar_t& value) =0;
These functions read a value from the stream.
virtual void getCharacter(char& value) =0;
Reads a narrow character from the stream.
virtual RWSize getDelimitedString(char* string, RWSize maxCount, char delim) =0;
Reads narrow characters from the stream until the last character read is equal to delim, or maxCount narrow characters have been read, or the end of the input sequence is reached. The narrow characters read are stored in string. The function returns the actual number of narrow characters read from the stream.
Parameter List
string |
A pointer to the string receiving the narrow characters extracted from the stream. |
maxCount |
The maximum number of narrow characters to be read. |
delim |
The narrow character used as a delimiter. |
virtual RWSize getDelimitedUString(RWUChar* ustring, RWSize maxCount,
RWUChar delim) =0;
Reads UTF-16 characters from the stream until the last character read is equal to delim, or maxCount UTF-16 characters have been read, or the end of the input sequence is reached. The UTF-16 characters read are stored in ustring. The function returns the actual number of UTF-16 characters read from the stream.
Parameter List
ustring |
A pointer to the string receiving the UTF-16 characters extracted from the stream. |
maxCount |
The maximum number of UTF-16 characters to be read. |
delim |
The UTF-16 character used as a delimiter. |
virtual RWSize getDelimitedWString(wchar_t* wstring, RWSize maxCount,
wchar_t delim) =0;
Reads wide characters from the stream until the last character read is equal to delim, or maxCount wide characters have been read, or the end of the input sequence is reached. The wide characters read are stored in wstring. The function returns the actual number of wide characters read from the stream.
Parameter List
wstring |
A pointer to the string receiving the wide characters extracted from the stream. |
maxCount |
The maximum number of wide characters to be read. |
delim |
The wide character used as a delimiter. |
virtual RWSize getString(char* string, RWSize count) =0;
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 void getUCharacter(RWUChar& value) =0;
Reads a UTF-16 character from the stream.
virtual RWSize getUString(RWUChar* arrayPt, RWSize count) =0;
Reads a UTF-16 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
ustring |
A pointer to the string's first element. |
count |
The number of elements to be read from the stream. |
virtual RWSize getWString(wchar_t* wstring, RWSize count) =0;
Reads a wide 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
wstring |
A pointer to the string's first element. |
count |
The number of elements to be read from the stream. |
virtual void release();
Releases the synchronization mechanism provided by a stream concrete implementation.
© 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.