SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Abstract base class for all the Unicode character input stream implementation classes. More...
#include <rw/stream/RWUCharInputStreamImp.h>
Public Member Functions | |
virtual | ~RWUCharInputStreamImp () |
virtual RWUChar | read ()=0 |
virtual RWSize | read (RWUChar *unicodeArray, RWSize numUChars)=0 |
virtual RWSize | readUntil (RWUChar *unicodeArray, RWSize maxSize, RWUChar delim)=0 |
virtual RWUCharInputStream | acquire () |
virtual void | release () |
Protected Member Functions | |
RWUCharInputStreamImp () |
Abstract base class for all the Unicode character input stream implementation classes. Implements the body idiom from the handle-body pattern.
virtual RWUCharInputStreamImp::~RWUCharInputStreamImp | ( | ) | [inline, virtual] |
Destructor.
RWUCharInputStreamImp::RWUCharInputStreamImp | ( | ) | [inline, protected] |
Constructor.
virtual RWUCharInputStream RWUCharInputStreamImp::acquire | ( | ) | [virtual] |
Acquires the synchronization mechanism provided by a stream concrete implementation. The acquire() member function returns a handle to the UTF-16 character stream that should be used for input operation after acquiring the synchronization mechanism.
Reimplemented from RWTMonitor< RWMutexLock >.
Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.
virtual RWSize RWUCharInputStreamImp::read | ( | RWUChar * | unicodeArray, | |
RWSize | numUChars | |||
) | [pure virtual] |
Reads an array of UTF-16 characters from the stream. The array must be pre-allocated to contain at least numUChars elements. The function returns the actual number of UTF-16 characters read from the stream.
unicodeArray | A pointer to the first element of the array. | |
numUChars | The number of UTF-16 characters to be read from the stream. |
Implemented in RWFilteredUCharInputStreamImp, RWUCharFromByteInputStreamImp, and RWUCharFromUTF8ByteInputStreamImp.
virtual RWUChar RWUCharInputStreamImp::read | ( | ) | [pure virtual] |
Reads a single UTF-16 character from the stream.
Implemented in RWFilteredUCharInputStreamImp, RWUCharFromByteInputStreamImp, RWUCharFromUTF8ByteInputStreamImp, and RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.
virtual RWSize RWUCharInputStreamImp::readUntil | ( | RWUChar * | unicodeArray, | |
RWSize | maxSize, | |||
RWUChar | delim | |||
) | [pure virtual] |
Reads UTF-16 characters from the stream until the last UTF-16 character read is equal to delim, or maxSize UTF-16 characters have been read, or the end of the input sequence is reached. The UTF-16 characters read are stored in unicodeArray. The function returns the actual number of UTF-16 characters read from the stream.
unicodeArray | A pointer to the array receiving the UTF-16 characters extracted from the stream. | |
maxSize | The maximum number of UTF-16 characters to be read. | |
delim | The UTF-16 character used as a delimiter. |
Implemented in RWFilteredUCharInputStreamImp, RWSynchronizedUCharInputStreamImp, RWUCharFromByteInputStreamImp, and RWUCharFromUTF8ByteInputStreamImp.
virtual void RWUCharInputStreamImp::release | ( | void | ) | [inline, virtual] |
Releases the synchronization mechanism provided by a stream concrete implementation.
Reimplemented from RWTMonitor< RWMutexLock >.
Reimplemented in RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.
© 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.