RWCharInputStream Class Reference
[Streams]
Handle class for all narrow character input stream implementation classes.
More...
#include <rw/stream/RWCharInputStream.h>
List of all members.
Detailed Description
Handle class for all the narrow character input stream implementation classes. Implements the handle idiom from the handle-body pattern.
Constructor & Destructor Documentation
Copy constructor.
- Parameters:
-
| handle | A narrow stream handle used to initialize the newly created handle. |
Member Function Documentation
RWSize RWCharInputStream::available |
( |
|
) |
const [inline] |
Returns the number of narrow characters that can be read from the attached source stream without blocking. Throws no exceptions.
void RWCharInputStream::close |
( |
|
) |
[inline] |
bool RWCharInputStream::isBad |
( |
|
) |
const [inline] |
Returns true
to indicate a loss of integrity resulting from an input, such as an irrecoverable read error from a file.
bool RWCharInputStream::isEof |
( |
|
) |
const [inline] |
Returns true
to indicate that an input operation reached the end of an input sequence.
bool RWCharInputStream::isFail |
( |
|
) |
const [inline] |
Returns true
to indicate that an input operation failed to read the expected data.
bool RWCharInputStream::isGood |
( |
|
) |
const [inline] |
Returns true
to indicate a stream in a valid state.
Assignment operator. Throws no exceptions.
- Parameters:
-
| handle | A narrow stream handle used to initialize this handle. |
Reads a single narrow character from the stream.
- Parameters:
-
| charValue | The narrow character to be read from the stream. |
Extractor executing a manipulator function.
- Parameters:
-
| pf | The manipulator's function pointer. |
Extractor executing a manipulator function.
- Parameters:
-
| pf | The manipulator's function pointer. |
RWSize RWCharInputStream::read |
( |
char * |
charArray, |
|
|
RWSize |
numChars | |
|
) |
| | [inline] |
Reads an array of narrow characters from the stream. The array must be pre-allocated to contain at list numChars elements. The function returns the actual number of narrow characters read from the stream.
- Parameters:
-
| charArray | A pointer to the first element of the array. |
| numChars | The number of narrow characters to be read from the stream. |
char RWCharInputStream::read |
( |
|
) |
[inline] |
Reads a single narrow character from the stream.
void RWCharInputStream::readStringUntil |
( |
RWCString & |
string, |
|
|
char |
delim = ' ' | |
|
) |
| | [inline] |
Reads narrow character(s) from the attached source stream until the last character read is equal to delim, or the end of the input sequence is reached. The narrow character(s) read are stored in a narrow string object.
- Parameters:
-
| string | A string object receiving the narrow character(s) extracted from the stream. |
| delim | The narrow character used as a delimeter. |
RWSize RWCharInputStream::readUntil |
( |
char * |
charArray, |
|
|
RWSize |
maxSize, |
|
|
char |
delim | |
|
) |
| | [inline] |
Reads narrow character(s) from the attached source stream until the last narrow character read is equal to delim, or maxSize narrow character(s) have been read, or the end of the input sequence is reached. The narrow character(s) read are stored in charArray. The function returns the actual number of narrow character(s) read from the stream.
- Parameters:
-
| charArray | A pointer to the array receiving the narrow character(s) extracted from the stream. |
| maxSize | The maximum number of narrow character(s) to be read. |
| delim | The narrow character value used as a delimeter. |
Skips numUnits narrow characters from the input sequence if possible. The function returns the actual number of narrow characters skipped, which can be any value between 0 and numUnits.
- Parameters:
-
| numUnits | The number of narrow characters to be skipped. |
Friends And Related Function Documentation
Manipulator that discards a narrow character from a stream input sequence.
- Parameters:
-
| stream | The narrow character stream. |