Module: Advanced Tools Package: Streams
RWUCharInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase
#include <rw/stream/RWUCharInputStreamImp.h>
Abstract base class for all the Unicode character input stream implementation classes. Implements the body idiom from the handle-body pattern.
RWUCharInputStreamImp();
Constructor.
virtual ~RWUCharInputStreamImp();
Destructor.
virtual RWUCharInputStream acquire();
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.
virtual RWUChar read() =0;
Reads a single UTF-16 character from the stream.
virtual RWSize read(RWUChar* unicodeArray, RWSize numUChars) =0;
Reads an array of UTF-16 characters from the stream. The array must be pre-allocated to contain at list numUChars elements. The function returns the actual number of UTF-16 characters read from the stream.
Parameter List
unicodeArray |
A pointer to the first element of the array. |
numUChars |
The number of UTF-16 characters to be read from the stream. |
virtual RWSize readUntil(RWUChar* unicodeArray, RWSize maxSize,
RWUChar delim) =0;
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.
Parameter List
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. |
virtual void release();
Releases the synchronization mechanism provided by a stream concrete implementation.
© 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.