Implementation of a simple lock stream that is used with a narrow character input stream. More...
#include <rw/stream/RWSynchronizedCharInputStreamImp.h>
Public Member Functions | |
virtual void | readStringUntil (RWCString &string, char delim) |
virtual RWSize | readUntil (char *charArray, RWSize maxSize, char delim) |
Public Member Functions inherited from RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp > | |
virtual | ~RWTInputStreamLockImp () |
virtual RWCharInputStream | acquire () |
virtual RWSize | available () const |
virtual void | close () |
virtual bool | isBad () const |
virtual bool | isEof () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual element_type | read () |
virtual RWSize | read (element_type *array, RWSize num) |
virtual void | release () |
virtual RWSize | skip (RWSize numUnits) |
Public Member Functions inherited from RWFilteredCharInputStreamImp | |
virtual | ~RWFilteredCharInputStreamImp () |
Public Member Functions inherited from RWCharInputStreamImp | |
virtual | ~RWCharInputStreamImp () |
Public Member Functions inherited from RWInputStreamImp | |
virtual | ~RWInputStreamImp () |
Public Member Functions inherited from RWStreamImp | |
virtual | ~RWStreamImp () |
Static Public Member Functions | |
static RWCharInputStream | make (const RWCharInputStream &sourceStream) |
Static Public Member Functions inherited from RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp > | |
static RWCharInputStream | make (const RWCharInputStream &sourceStream) |
Additional Inherited Members | |
Public Types inherited from RWTInputStreamLockImp< RWCharInputStream, RWFilteredCharInputStreamImp > | |
typedef RWCharInputStream::element_type | element_type |
typedef RWCharInputStream | RWInputStream_type |
Protected Types inherited from RWTCountingBody< RWMutexLock > | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
Protected Types inherited from RWTMonitor< RWMutexLock > | |
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > | UnlockGuard |
Class RWSynchronizedCharInputStreamImp implements a simple lock stream that is used with narrow 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 narrow characters.
sourceStream | The input stream that will serve as the source of narrow characters. |
|
inlinestatic |
Constructs an RWSynchronizedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. Throws no exceptions.
sourceStream | The output stream that will serve as the source of narrow characters. |
|
virtual |
Reads narrow character(s) from the attached source stream until the last character read is equal to delim, or the end of the input sequence is reached. The narrow character(s) read are stored in a narrow string object.
string | A string object receiving the narrow character(s) extracted from the stream. |
delim | The narrow character used as a delimiter. |
Reimplemented from RWFilteredCharInputStreamImp.
|
virtual |
Reads narrow character(s) from the attached source stream until the last narrow character read is equal to delim, or maxSize narrow character(s) have been read, or the end of the input sequence is reached. The narrow character(s) read are stored in charArray. The function returns the actual number of narrow character(s) read from the stream.
charArray | A pointer to the array receiving the narrow character(s) extracted from the stream. |
maxSize | The maximum number of narrow character(s) to be read. |
delim | The narrow character value used as a delimiter. |
Reimplemented from RWFilteredCharInputStreamImp.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |