Module: Advanced Tools Package: Streams
RWWCharInputStream RWHandleBase
available() close() isBad() |
isEof() isFail() isGood() |
operator>>() operator=() read() |
readUntil() RWWCharInputStream() skip() |
#include <rw/stream/RWWCharInputStream.h>
Handle class for all the wide character input stream implementation classes. Implements the handle idiom from the handle-body pattern.
RW_EXPLICIT RWWCharInputStream(RWWCharInputStreamImp* body);
Constructor.
RWWCharInputStream(const RWWCharInputStream& handle) :RWHandleBase(handle);
Copy constructor.
Parameter List
handle |
A wide character stream handle used to initialize the newly created handle. |
RWWCharInputStream operator>>(RWWCharInputStream (*pf)(RWWCharInputStream&));
Extractor executing a manipulator function.
Parameter List
pf |
The manipulator's function pointer. |
RWWCharInputStream& operator=(const RWWCharInputStream& handle);
Assignment operator. Throws no exceptions.
Parameter List
handle |
A wide character stream handle used to initialize this handle. |
RWWCharInputStream& operator>>(RWWCharInputStream& (*pf)(RWWCharInputStream&));
Extractor executing a manipulator function.
Parameter List
pf |
The manipulator's function pointer. |
RWWCharInputStream& operator>>(wchar_t& wcharValue);
Reads a single wide character from the stream.
Parameter List
wcharValue |
The wide character to be read from the stream. |
RWSize available() const;
Returns the number of wide characters that can be read from the stream without blocking. Throws no exceptions.
void close();
Closes the stream.
bool isBad() const;
Returns true to indicate a loss of integrity resulting from an input operation, such as an irrecoverable read error from a file. Throws no exceptions.
bool isEof() const;
Returns true to indicate that an input operation reached the end of an input sequence. Throws no exceptions.
bool isFail() const;
Returns true to indicate that an input operation failed to read the expected data. Throws no exceptions.
bool isGood() const;
Returns true to indicate a stream in a valid state. Throws no exceptions.
wchar_t read();
Reads a single wide character from the stream.
RWSize read(wchar_t* wcharArray, RWSize numWChars);
Reads an array of wide characters from the stream. The array must be pre-allocated to contain at least numWChars elements. The function returns the actual number of wide characters extracted from the stream.
Parameter List
wcharArray |
A pointer to the first element of the array. |
numWChars |
The number of wide characters to be read from the stream. |
RWSize readUntil(wchar_t* wcharArray, RWSize maxSize, wchar_t delim);
Reads wide characters from the stream until the last wide character read is equal to delim, or maxSize wide characters have been read, or the end of the input sequence is reached. The wide characters read are stored in wcharArray. The function returns the actual number of wide characters read from the stream.
Parameter List
wcharArray |
A pointer to the array receiving the wide characters extracted from the stream. |
maxSize |
The maximum number of wide characters to be read. |
delim |
The wide character used as a delimiter. |
RWSize skip(RWSize numUnits);
Skips numUnits wide characters from the input sequence if possible. The function returns the actual number of wide characters skipped, which can be any value between 0 and numUnits.
Parameter List
numUnits |
The number of wide characters to be skipped. |
RWWCharInputStream& rwDisc(RWWCharInputStream& stream);
Manipulator that discards a wide character from a stream input sequence.
Parameter List
stream |
The wide character stream. |
© 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.