SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Reads data in native format from a binary stream. More...
#include <rw/stream/RWNativeDataFromByteInputStreamImp.h>
Public Member Functions | |
virtual | ~RWNativeDataFromByteInputStreamImp () |
virtual void | getBool (bool &value) |
virtual void | getChar (char &value) |
virtual void | getUnsignedChar (unsigned char &value) |
virtual void | getSignedChar (signed char &value) |
virtual void | getShort (short &value) |
virtual void | getUnsignedShort (unsigned short &value) |
virtual void | getInt (int &value) |
virtual void | getUnsignedInt (unsigned int &value) |
virtual void | getLong (long &value) |
virtual void | getUnsignedLong (unsigned long &value) |
virtual void | getFloat (float &value) |
virtual void | getDouble (double &value) |
virtual void | getWchar_t (wchar_t &value) |
virtual void | getLongLong (long long &value) |
virtual void | getUnsignedLongLong (unsigned long long &value) |
virtual void | getLongDouble (long double &value) |
virtual void | getCharacter (char &value) |
virtual void | getWCharacter (wchar_t &value) |
virtual void | getUCharacter (RWUChar &value) |
virtual void | getSizeT (size_t &value) |
virtual RWSize | getBools (bool *arrayPt, RWSize count) |
virtual RWSize | getChars (char *arrayPt, RWSize count) |
virtual RWSize | getUnsignedChars (unsigned char *arrayPt, RWSize count) |
virtual RWSize | getSignedChars (signed char *arrayPt, RWSize count) |
virtual RWSize | getShorts (short *arrayPt, RWSize count) |
virtual RWSize | getUnsignedShorts (unsigned short *arrayPt, RWSize count) |
virtual RWSize | getInts (int *arrayPt, RWSize count) |
virtual RWSize | getUnsignedInts (unsigned int *arrayPt, RWSize count) |
virtual RWSize | getLongs (long *arrayPt, RWSize count) |
virtual RWSize | getUnsignedLongs (unsigned long *arrayPt, RWSize count) |
virtual RWSize | getFloats (float *arrayPt, RWSize count) |
virtual RWSize | getDoubles (double *arrayPt, RWSize count) |
virtual RWSize | getWchar_ts (wchar_t *arrayPt, RWSize count) |
virtual RWSize | getLongLongs (long long *arrayPt, RWSize count) |
virtual RWSize | getUnsignedLongLongs (unsigned long long *arrayPt, RWSize count) |
virtual RWSize | getLongDoubles (long double *arrayPt, RWSize count) |
virtual RWSize | getString (char *string, RWSize count) |
virtual RWSize | getWString (wchar_t *wstring, RWSize count) |
virtual RWSize | getUString (RWUChar *arrayPt, RWSize count) |
virtual RWSize | getDelimitedString (char *string, RWSize maxCount, char delim) |
virtual RWSize | getDelimitedWString (wchar_t *wstring, RWSize maxCount, wchar_t delim) |
virtual RWSize | getDelimitedUString (RWUChar *ustring, RWSize maxCount, RWUChar delim) |
Static Public Member Functions | |
static RWDataInputStream | make (const RWByteInputStream &source) |
Protected Member Functions | |
RWNativeDataFromByteInputStreamImp (const RWByteInputStream &sourceStream) |
The class RWNativeDataFromByteInputStreamImp reads data in native format from a binary stream. It implements the body idiom from the handle-body pattern.
virtual RWNativeDataFromByteInputStreamImp::~RWNativeDataFromByteInputStreamImp | ( | ) | [virtual] |
Destructor.
RWNativeDataFromByteInputStreamImp::RWNativeDataFromByteInputStreamImp | ( | const RWByteInputStream & | sourceStream | ) | [inline, protected] |
Initializes the reference to the binary stream that will be used as the source of bytes.
sourceStream | The binary stream that will serve as the source of bytes. |
virtual void RWNativeDataFromByteInputStreamImp::getBool | ( | bool & | value | ) | [virtual] |
Reads a bool
value from the stream.
value | The bool value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getBools | ( | bool * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of bool
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getChar | ( | char & | value | ) | [virtual] |
Reads a char
value from the stream.
value | The char value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getCharacter | ( | char & | value | ) | [virtual] |
Reads a char
value from the stream.
value | The char value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getChars | ( | char * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of char
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getDelimitedString | ( | char * | string, | |
RWSize | maxCount, | |||
char | delim | |||
) | [virtual] |
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.
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. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getDelimitedUString | ( | RWUChar * | ustring, | |
RWSize | maxCount, | |||
RWUChar | delim | |||
) | [virtual] |
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.
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. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getDelimitedWString | ( | wchar_t * | wstring, | |
RWSize | maxCount, | |||
wchar_t | delim | |||
) | [virtual] |
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.
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. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getDouble | ( | double & | value | ) | [virtual] |
Reads a double
value from the stream.
value | The double value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getDoubles | ( | double * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of double
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getFloat | ( | float & | value | ) | [virtual] |
Reads a float
value from the stream.
value | The float value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getFloats | ( | float * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of float
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getInt | ( | int & | value | ) | [virtual] |
Reads a int
value from the stream.
value | The int value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getInts | ( | int * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of int
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getLong | ( | long & | value | ) | [virtual] |
Reads a long
value from the stream.
value | The long value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getLongDouble | ( | long double & | value | ) | [virtual] |
Reads a long double
value from the stream.
value | The long double value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getLongDoubles | ( | long double * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of long double
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getLongLong | ( | long long & | value | ) | [virtual] |
Reads a long long
value from the stream.
value | The long long value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getLongLongs | ( | long long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of long long
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getLongs | ( | long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of long
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getShort | ( | short & | value | ) | [virtual] |
Reads a short
value from the stream.
value | The short value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getShorts | ( | short * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of short
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getSignedChar | ( | signed char & | value | ) | [virtual] |
Reads a signed char
value from the stream.
value | The signed char value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getSignedChars | ( | signed char * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of signed char
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getSizeT | ( | size_t & | value | ) | [virtual] |
Reads a size_t
value from the stream.
value | The size_t value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getString | ( | char * | string, | |
RWSize | count | |||
) | [virtual] |
Reads a narrow character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
string | A pointer to the string's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getUCharacter | ( | RWUChar & | value | ) | [virtual] |
Reads a UTF-16
character from the stream.
value | The UTF-16 value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getUnsignedChar | ( | unsigned char & | value | ) | [virtual] |
Reads a unsigned char
value from the stream.
value | The unsigned char value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedChars | ( | unsigned char * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of unsigned char
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getUnsignedInt | ( | unsigned int & | value | ) | [virtual] |
Reads a unsigned int
value from the stream.
value | The unsigned int value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedInts | ( | unsigned int * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of unsigned int
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getUnsignedLong | ( | unsigned long & | value | ) | [virtual] |
Reads a unsigned long
value from the stream.
value | The unsigned long value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getUnsignedLongLong | ( | unsigned long long & | value | ) | [virtual] |
Reads a unsigned long long
value from the stream.
value | The unsigned long long value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedLongLongs | ( | unsigned long long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of unsigned long long
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedLongs | ( | unsigned long * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of unsigned long
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getUnsignedShort | ( | unsigned short & | value | ) | [virtual] |
Reads a unsigned short
value from the stream.
value | The unsigned short value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getUnsignedShorts | ( | unsigned short * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of unsigned short
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getUString | ( | RWUChar * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads a UTF-16 character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the string's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getWchar_t | ( | wchar_t & | value | ) | [virtual] |
Reads a wchar_t
value from the stream.
value | The wchar_t value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getWchar_ts | ( | wchar_t * | arrayPt, | |
RWSize | count | |||
) | [virtual] |
Reads an array of wchar_t
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
arrayPt | A pointer to the array's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
virtual void RWNativeDataFromByteInputStreamImp::getWCharacter | ( | wchar_t & | value | ) | [virtual] |
Reads a wchar_t
value from the stream.
value | The wchar_t value to be read from the stream. |
Implements RWDataInputStreamImp.
virtual RWSize RWNativeDataFromByteInputStreamImp::getWString | ( | wchar_t * | wstring, | |
RWSize | count | |||
) | [virtual] |
Reads a wide character string from the stream. The string must have been pre-allocated to contain at least count elements. The functions return the number of elements read.
wstring | A pointer to the string's first element. | |
count | The number of elements to be read from the stream. |
Implements RWDataInputStreamImp.
static RWDataInputStream RWNativeDataFromByteInputStreamImp::make | ( | const RWByteInputStream & | source | ) | [inline, static] |
Constructs an RWNativeDataFromByteInputStreamImp instance that uses source as the source of bytes, and returns a handle to it. Throws no exceptions.
source | The binary stream that is used as the source of bytes. |
© 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.