SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Concrete class connecting a wide character stream to an iostreams wide character buffer. More...
#include <rw/stream/RWWCharFromWStreambufInputStreamImp.h>
Public Member Functions | |
virtual | ~RWWCharFromWStreambufInputStreamImp () |
virtual void | close () |
virtual bool | isEof () const |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual wchar_t | read () |
virtual RWSize | read (wchar_t *wcharArray, RWSize numWChars) |
virtual RWSize | readUntil (wchar_t *wcharArray, RWSize maxSize, wchar_t delim) |
virtual RWSize | available () const |
virtual RWSize | skip (RWSize numUnits) |
Static Public Member Functions | |
static RWWCharInputStream | make (std::wstreambuf &source) |
Protected Member Functions | |
RWWCharFromWStreambufInputStreamImp (std::wstreambuf &sourceBuff) | |
std::wstreambuf & | getSourceBuff () |
const std::wstreambuf & | getSourceBuff () const |
Concrete class connecting a wide character stream to an iostreams wide character buffer. The iostreams buffer is used as the source for the wide characters read from the wide character stream. Implements the body idiom from the handle-body pattern.
virtual RWWCharFromWStreambufInputStreamImp::~RWWCharFromWStreambufInputStreamImp | ( | ) | [virtual] |
Destructor.
RWWCharFromWStreambufInputStreamImp::RWWCharFromWStreambufInputStreamImp | ( | std::wstreambuf & | sourceBuff | ) | [inline, protected] |
Initializes the reference to the iostreams std::wstreambuf, that will be used as the source of wide characters.
sourceBuff | The iostreams std::wstreambuf that will serve as the source of wide characters. |
virtual RWSize RWWCharFromWStreambufInputStreamImp::available | ( | ) | const [virtual] |
Returns the number of wide characters that can be read from the iostreams std::wstreambuf used as the source of wide characters without blocking.
Implements RWInputStreamImp.
virtual void RWWCharFromWStreambufInputStreamImp::close | ( | ) | [virtual] |
This function does nothing. The user is responsible for closing the iostreams std::wstreambuf used as the source of wide characters if necessary. Throws no exceptions.
Implements RWStreamImp.
const std::wstreambuf& RWWCharFromWStreambufInputStreamImp::getSourceBuff | ( | ) | const [inline, protected] |
Returns a reference to the iostreams std::wstreambuf, which is used as the source of wide characters. Throws no exceptions.
std::wstreambuf& RWWCharFromWStreambufInputStreamImp::getSourceBuff | ( | ) | [inline, protected] |
Returns a reference to the iostreams std::wstreambuf, which is used as the source of wide characters. Throws no exceptions.
virtual bool RWWCharFromWStreambufInputStreamImp::isBad | ( | ) | const [virtual] |
Returns true
if the last operation performed on the iostreams std::wstreambuf failed. Throws no exceptions.
Implements RWStreamImp.
virtual bool RWWCharFromWStreambufInputStreamImp::isEof | ( | ) | const [virtual] |
Returns true
if there are no wide characters available from the iostreams std::wstreambuf used as the source of wide characters. Throws no exceptions.
Implements RWInputStreamImp.
virtual bool RWWCharFromWStreambufInputStreamImp::isFail | ( | ) | const [virtual] |
Returns true
if the last operation performed on the iostreams std::wstreambuf failed. Throws no exceptions.
Implements RWStreamImp.
virtual bool RWWCharFromWStreambufInputStreamImp::isGood | ( | ) | const [virtual] |
Returns true
if the last operation performed on the iostreams std::wstreambuf succeeded. Throws no exceptions.
Implements RWStreamImp.
static RWWCharInputStream RWWCharFromWStreambufInputStreamImp::make | ( | std::wstreambuf & | source | ) | [inline, static] |
Constructs an RWWCharFromWStreambufInputStreamImp instance that uses source as its source of wide characters, and returns a handle to it. Throws no exceptions.
source | The iostreams std::wstreambuf that is used as the source of wide characters. |
virtual RWSize RWWCharFromWStreambufInputStreamImp::read | ( | wchar_t * | wcharArray, | |
RWSize | numWChars | |||
) | [virtual] |
Reads an array of wide characters from the iostreams std::wstreambuf used as the source of wide characters. The array must be pre-allocated to contain at least numWChars elements. The function returns the actual number of wide characters extracted from the iostreams std::wstreambuf.
wcharArray | A pointer to the first element of the array. | |
numWChars | The number of wide characters to be read from the stream. |
Implements RWWCharInputStreamImp.
virtual wchar_t RWWCharFromWStreambufInputStreamImp::read | ( | ) | [virtual] |
Reads a single wide character from the iostreams std::wstreambuf used as the source of wide characters.
Implements RWWCharInputStreamImp.
virtual RWSize RWWCharFromWStreambufInputStreamImp::readUntil | ( | wchar_t * | wcharArray, | |
RWSize | maxSize, | |||
wchar_t | delim | |||
) | [virtual] |
Reads wide characters from the iostreams std::wstreambuf used as the source of wide characters 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 inserted into wcharArray. If the last wide character extracted is equal to delim, then it is not stored in wcharArray.
wcharArray | A pointer to the array receiving the wide characters extracted from the iostreams std::wstreambuf. | |
maxSize | The maximum number of wide characters to be read. | |
delim | The wide character used as a delimiter. |
Implements RWWCharInputStreamImp.
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.
numUnits | The number of wide characters to be skipped. |
Implements RWInputStreamImp.
© 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.