rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWSynchronizedUCharInputStreamImp Class Reference
[Streams]

Implementation of a simple lock stream that can be used with a UTF-16 character input stream. More...

#include <rw/stream/RWSynchronizedUCharInputStreamImp.h>

Inheritance diagram for RWSynchronizedUCharInputStreamImp:
RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp > RWFilteredUCharInputStreamImp RWUCharInputStreamImp RWInputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

List of all members.

Public Member Functions

virtual RWSize readUntil (RWUChar *unicodeArray, RWSize maxSize, RWUChar delim)

Static Public Member Functions

static RWUCharInputStream make (const RWUCharInputStream &sourceStream)

Protected Member Functions

 RWSynchronizedUCharInputStreamImp (const RWUCharInputStream &sourceStream)

Detailed Description

Class RWSynchronizedUCharInputStreamImp implements a simple lock stream that is used with UTF-16 character input stream. The stream locks its internal synchronization mechanism before forwarding input requests to its associated source stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.


Constructor & Destructor Documentation

RWSynchronizedUCharInputStreamImp::RWSynchronizedUCharInputStreamImp ( const RWUCharInputStream sourceStream  )  [protected]

Initializes the reference to the input stream that will be used as the source of UTF-16 characters.

Parameters:
sourceStream The input stream that will serve as the source of UTF-16 characters.

Member Function Documentation

static RWUCharInputStream RWSynchronizedUCharInputStreamImp::make ( const RWUCharInputStream sourceStream  )  [inline, static]

Constructs an RWSynchronizedUCharInputStreamImp instance that uses sourceStream as its source of UTF-16 characters, and returns a handle to it. Throws no exceptions.

Parameters:
sourceStream The output stream that will serve as the source of UTF-16 characters.

Reimplemented from RWTInputStreamLockImp< RWUCharInputStream, RWFilteredUCharInputStreamImp >.

virtual RWSize RWSynchronizedUCharInputStreamImp::readUntil ( RWUChar unicodeArray,
RWSize  maxSize,
RWUChar  delim 
) [virtual]

Reads UTF-16 characters from the attached source 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.

Parameters:
unicodeArray A pointer to the array receiving the UTF-16 character(s) extracted from the stream.
maxSize The maximum number of UTF-16 character(s) to be read.
delim The UTF-16 character used as a delimeter.

Reimplemented from RWFilteredUCharInputStreamImp.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.