SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Implements a buffer that can be used with narrow character input streams. More...
#include <rw/stream/RWBufferedCharInputStreamImp.h>
Public Member Functions | |
virtual void | readStringUntil (RWCString &string, char delim) |
Public Member Functions inherited from RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp > | |
virtual | ~RWTInputStreamBufferImp () |
virtual RWSize | available () const |
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 RWSize | readUntil (element_type *array, RWSize maxSize, element_type delim) |
virtual RWSize | skip (RWSize numUnits) |
Public Member Functions inherited from RWFilteredCharInputStreamImp | |
virtual | ~RWFilteredCharInputStreamImp () |
virtual void | close () |
virtual RWSize | read (char *charArray, RWSize numChars) |
virtual RWSize | readUntil (char *charArray, RWSize maxSize, char delim) |
Public Member Functions inherited from RWCharInputStreamImp | |
virtual | ~RWCharInputStreamImp () |
virtual RWCharInputStream | acquire () |
virtual void | release () |
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 RWCharInputStream | make (const RWCharInputStream &sourceStream, RWSize bufSize) |
static RWCharInputStream | make (const RWCharInputStream &sourceStream, char *buffer, RWSize bufSize) |
Static Public Member Functions inherited from RWTInputStreamBufferImp< RWCharInputStream, RWFilteredCharInputStreamImp > | |
static RWCharInputStream | make (const RWCharInputStream &sourceStream) |
static RWCharInputStream | make (const RWCharInputStream &sourceStream, RWSize bufSize) |
static RWCharInputStream | make (const RWCharInputStream &sourceStream, element_type *buffer, RWSize bufSize) |
Additional Inherited Members | |
Public Types inherited from RWTInputStreamBufferImp< 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 RWBufferedCharInputStreamImp implements a buffer that can be used with narrow character input streams. The size of the buffer is specified in its static member make() function, which is used to create it.
|
protected |
Initializes the reference to the input stream that will be used as the source of narrow characters, as well as the internal buffer capacity, which will be equal to RW_STREAM_BUFFER_SIZE.
RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
sourceStream | Input stream that will serve as the source of narrow characters. |
|
protected |
Initializes the reference to the input stream that will be used as the source of narrow characters, as well as the buffer capacity.
RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
sourceStream | Input stream that will serve as the source of narrow characters. |
bufSize | Buffer capacity in number of narrow characters. |
|
protected |
Initializes the reference to the input stream that will be used as the source of narrow characters, as well as the internal buffer.
RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
sourceStream | Input stream that will serve as the source of narrow characters. |
buffer | Pre-allocated buffer of size bufSize to be used internally by the constructed RWBufferedCharInputStreamImp object. |
bufSize | Buffer capacity in number of narrow characters. |
|
inlinestatic |
Constructs a RWBufferedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. The internal buffer is dynamically allocated to be of size RW_STREAM_BUFFER_SIZE.
RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
sourceStream | Input stream that will serve as the source of narrow characters. |
|
inlinestatic |
Constructs a RWBufferedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. The internal buffer is dynamically allocated to be of size bufSize.
RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
sourceStream | The input stream that will serve as the source of narrow characters. |
bufSize | The buffer capacity in number of narrow characters. |
|
inlinestatic |
Constructs an RWBufferedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. The internal buffer is initialized using the pre-allocated narrow character's array of size bufSize.
RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
sourceStream | The input stream that will serve as the source of narrow characters. |
buffer | A pre-allocated buffer of size bufSize to be used internally by the constructed RWBufferedCharInputStreamImp object. |
bufSize | The buffer capacity in number 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.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |