SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Implementation of a simple lock stream that can be used with a UTF-16 character input stream. More...
#include <rw/stream/RWSynchronizedUCharInputStreamImp.h>
Public Member Functions | |
virtual RWSize | readUntil (RWUChar *unicodeArray, RWSize maxSize, RWUChar delim) |
![]() | |
virtual | ~RWTInputStreamLockImp () |
virtual RWUCharInputStream | acquire (void) |
virtual RWSize | available (void) const |
virtual void | close (void) |
virtual bool | isBad (void) const |
virtual bool | isEof (void) const |
virtual bool | isFail (void) const |
virtual bool | isGood (void) const |
virtual RWSize | read (element_type *array, RWSize num) |
virtual element_type | read (void) |
virtual void | release (void) |
virtual RWSize | skip (RWSize numUnits) |
![]() | |
virtual | ~RWFilteredUCharInputStreamImp () |
![]() | |
virtual | ~RWUCharInputStreamImp () |
![]() | |
virtual | ~RWInputStreamImp () |
![]() | |
virtual | ~RWStreamImp () |
Static Public Member Functions | |
static RWUCharInputStream | make (const RWUCharInputStream &sourceStream) |
![]() | |
static RWUCharInputStream | make (const RWUCharInputStream &sourceStream) |
Additional Inherited Members | |
![]() | |
typedef RWUCharInputStream::element_type | element_type |
typedef RWUCharInputStream | RWInputStream_type |
![]() | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
![]() | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
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.
|
protected |
Initializes the reference to the input stream that will be used as the source of UTF-16 characters.
sourceStream | The input stream that will serve as the source of UTF-16 characters. |
|
inlinestatic |
Constructs an RWSynchronizedUCharInputStreamImp instance that uses sourceStream as its source of UTF-16 characters, and returns a handle to it. Throws no exceptions.
sourceStream | The output stream that will serve as the source of UTF-16 characters. |
|
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.
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 delimiter. |
Reimplemented from RWFilteredUCharInputStreamImp.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |