SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Handle class for all the data input stream implementation classes. More...
#include <rw/stream/RWDataInputStream.h>
Public Member Functions | |
RWDataInputStream (const RWDataInputStream &handle) | |
RWDataInputStream (RWDataInputStreamImp *ptr) | |
RWSize | available () const |
void | close () |
void | getBool (bool &value) |
RWSize | getBools (bool *arrayPt, RWSize count) |
void | getChar (char &value) |
void | getCharacter (char &value) |
RWSize | getChars (char *arrayPt, RWSize count) |
RWSize | getDelimitedString (char *string, RWSize maxCount, char delim='\0') |
RWSize | getDelimitedUString (RWUChar *ustring, RWSize maxCount, RWUChar delim) |
RWSize | getDelimitedWString (wchar_t *wstring, RWSize maxCount, wchar_t delim=L'\0') |
void | getDouble (double &value) |
RWSize | getDoubles (double *arrayPt, RWSize count) |
void | getFloat (float &value) |
RWSize | getFloats (float *arrayPt, RWSize count) |
void | getInt (int &value) |
RWSize | getInts (int *arrayPt, RWSize count) |
void | getLong (long &value) |
void | getLongDouble (long double &value) |
RWSize | getLongDoubles (long double *arrayPt, RWSize count) |
void | getLongLong (long long &value) |
RWSize | getLongLongs (long long *arrayPt, RWSize count) |
RWSize | getLongs (long *arrayPt, RWSize count) |
void | getShort (short &value) |
RWSize | getShorts (short *arrayPt, RWSize count) |
void | getSignedChar (signed char &value) |
RWSize | getSignedChars (signed char *arrayPt, RWSize count) |
void | getSizeT (size_t &value) |
RWSize | getString (char *string, RWSize count) |
void | getUCharacter (RWUChar &value) |
void | getUnsignedChar (unsigned char &value) |
RWSize | getUnsignedChars (unsigned char *arrayPt, RWSize count) |
void | getUnsignedInt (unsigned int &value) |
RWSize | getUnsignedInts (unsigned int *arrayPt, RWSize count) |
void | getUnsignedLong (unsigned long &value) |
RWSize | getUnsignedLongLongs (unsigned long long *arrayPt, RWSize count) |
RWSize | getUnsignedLongs (unsigned long *arrayPt, RWSize count) |
void | getUnsignedShort (unsigned short &value) |
RWSize | getUnsignedShorts (unsigned short *arrayPt, RWSize count) |
RWSize | getUString (RWUChar *ustring, RWSize count) |
void | getWchar_t (wchar_t &value) |
RWSize | getWchar_ts (wchar_t *arrayPt, RWSize count) |
void | getWCharacter (wchar_t &value) |
RWSize | getWString (wchar_t *wstring, RWSize count) |
bool | isBad () const |
bool | isEof () const |
bool | isFail () const |
bool | isGood () const |
RWDataInputStream & | operator= (const RWDataInputStream &handle) |
RWDataInputStream & | operator>> (bool &value) |
RWDataInputStream & | operator>> (char &value) |
RWDataInputStream & | operator>> (double &value) |
RWDataInputStream & | operator>> (float &value) |
RWDataInputStream & | operator>> (int &value) |
RWDataInputStream & | operator>> (long &value) |
RWDataInputStream & | operator>> (long double &value) |
RWDataInputStream & | operator>> (long long &value) |
RWDataInputStream & | operator>> (RWDataInputStream &(*pf)(RWDataInputStream &)) |
RWDataInputStream | operator>> (RWDataInputStream(*pf)(RWDataInputStream &)) |
RWDataInputStream & | operator>> (short &value) |
RWDataInputStream & | operator>> (signed char &value) |
RWDataInputStream & | operator>> (unsigned char &value) |
RWDataInputStream & | operator>> (unsigned int &value) |
RWDataInputStream & | operator>> (unsigned long &value) |
RWDataInputStream & | operator>> (unsigned short &value) |
RWDataInputStream & | operator>> (wchar_t &value) |
RWSize | skip (RWSize numUnits) |
Public Member Functions inherited from RWHandleBase | |
bool | isValid (void) const |
bool | operator!= (const RWHandleBase &second) const |
bool | operator== (const RWHandleBase &second) const |
Friends | |
class | RWTStreamGuardImp< RWDataInputStream, RWFilteredDataInputStreamImp > |
Related Symbols | |
(Note that these are not member symbols.) | |
RWDataInputStream | rwGuard (RWDataInputStream &stream) |
Additional Inherited Members | |
Protected Member Functions inherited from RWHandleBase | |
RWHandleBase (const RWHandleBase &second) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (void) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
Handle class for all the data input stream implementation classes. Implements the handle idiom from the handle-body pattern.
|
inlineexplicit |
Constructor.
|
inline |
Copy constructor.
handle | A data stream handle used to initialize the newly created handle. |
|
inline |
|
inline |
Closes the stream. May throw exceptions.
|
inline |
Reads a bool
value from the stream.
value | The bool to be read from the stream. |
Reads an array of bool
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a char
value from the stream.
value | The char to be read from the stream. |
|
inline |
Reads a narrow character from the stream.
value | The narrow character to be read from the stream. |
Reads an array of char
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
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. |
|
inline |
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. |
|
inline |
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 wstring stores the wide characters read. 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. |
|
inline |
Reads a double
value from the stream.
value | The double value to be read from the stream. |
Reads an array of double
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a float
value from the stream.
value | The float value to be read from the stream. |
Reads an array of float
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a int
value from the stream.
value | The int to be read from the stream. |
Reads an array of int
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a long
value from the stream.
value | The long to be read from the stream. |
|
inline |
Reads a long double
value from the stream.
value | The long double value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a long long
value from the stream.
value | The long long value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
Reads an array of long
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a short
value from the stream.
value | The short to be read from the stream. |
Reads an array of short
value(s) from the stream. The array must have been pre-allocated to contain at least count elements. The function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a signed char
value from the stream.
value | The signed char value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a size_t character from the stream.
value | The size_t character to be read from the stream. |
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.
string | A pointer to the string's first element. |
count | The number of elements to be read from the stream. |
|
inline |
Reads a UTF-16 character from the stream.
value | The UTF-16 character to be read from the stream. |
|
inline |
Reads a unsigned char
value from the stream.
value | The unsigned char value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a unsigned int
value from the stream.
value | The unsigned int value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a unsigned long
value from the stream.
value | The unsigned long value to be read from the stream. |
|
inline |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a unsigned short
value from the stream.
value | The unsigned short value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
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.
ustring | A pointer to the string's first element. |
count | The number of elements to be read from the stream. |
|
inline |
Reads a wchar_t
value from the stream.
value | The wchar_t value to be read from the stream. |
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 function returns the number of elements read.
arrayPt | A pointer to the array's first element. |
count | The number of element(s) to be read from the stream. |
|
inline |
Reads a wide character from the stream.
value | The wide character to be read from the stream. |
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.
wstring | A pointer to the string's first element. |
count | The number of elements to be read from the stream. |
|
inline |
Returns true
to indicate a loss of integrity resulting from an input, such as an irrecoverable read error from a file. Throws no exceptions.
|
inline |
Returns true
to indicate that an input operation reached the end of an input sequence. Throws no exceptions.
|
inline |
Returns true
to indicate that an input operation failed to read the expected data. Throws no exceptions.
|
inline |
Returns true
to indicate a stream in a valid state. Throws no exceptions.
|
inline |
Assignment operator. Throws no exceptions.
handle | A data stream handle used to initialize this handle. |
|
inline |
Reads a char
value from the stream.
value | The bool value to be read from the stream. |
|
inline |
Reads a char
value from the stream.
value | The char value to be read from the stream. |
|
inline |
Reads a double
value from the stream.
value | The double value to be read from the stream. |
|
inline |
Reads a float
value from the stream.
value | The float value to be read from the stream. |
|
inline |
Reads a int
value from the stream.
value | The int value to be read from the stream. |
|
inline |
Reads a long
value from the stream.
value | The long value to be read from the stream. |
|
inline |
Reads a long double
value from the stream.
value | The long double value to be read from the stream. |
|
inline |
Reads a long long
value from the stream.
value | The long long value to be read from the stream. |
|
inline |
Extractor executing a manipulator function.
pf | The manipulator's function pointer. |
|
inline |
Extractor executing a manipulator function.
pf | The manipulator's function pointer. |
|
inline |
Reads a short
value from the stream.
value | The short value to be read from the stream. |
|
inline |
Reads a signed char
value from the stream.
value | The signed char value to be read from the stream. |
|
inline |
Reads a unsigned char
value from the stream.
value | The unsigned char value to be read from the stream. |
|
inline |
Reads a unsigned int
value from the stream.
value | The unsigned int value to be read from the stream. |
|
inline |
Reads a unsigned long
value from the stream.
value | The unsigned long value to be read from the stream. |
|
inline |
Reads a unsigned short
value from the stream.
value | The unsigned short value to be read from the stream. |
|
inline |
Reads a wchar_t
value from the stream.
value | The wchar_t value to be read from the stream. |
Skips numUnits elements from the input sequence if possible. The function returns the actual number of elements skipped, which can be any value between 0
and numUnits. The type of the elements skipped is specified by implementation classes and can be one of the following: RWByte, char
, RWUChar, or wchar_t
.
numUnits | The number of elements to be skipped. |
|
related |
Manipulator that is used to guard a series of extraction operations.
stream | A data input stream. |
A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any extractions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |