SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Concrete class connecting a narrow character stream to an iostreams narrow character buffer. More...
#include <rw/stream/RWCharFromStreambufInputStreamImp.h>
Public Member Functions | |
virtual | ~RWCharFromStreambufInputStreamImp () |
virtual RWSize | available () const |
virtual void | close () |
virtual bool | isBad () const |
virtual bool | isEof () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual char | read () |
virtual RWSize | read (char *charArray, RWSize numChars) |
virtual void | readStringUntil (RWCString &string, char delim) |
virtual RWSize | readUntil (char *charArray, RWSize maxSize, char delim) |
virtual RWSize | skip (RWSize numUnits) |
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 (std::streambuf &source) |
Protected Member Functions | |
RWCharFromStreambufInputStreamImp (std::streambuf &sourceBuff) | |
std::streambuf & | getSourceBuff () |
const std::streambuf & | getSourceBuff () const |
Protected Member Functions inherited from RWCharInputStreamImp | |
RWCharInputStreamImp () | |
Protected Member Functions inherited from RWInputStreamImp | |
RWInputStreamImp () | |
Protected Member Functions inherited from RWStreamImp | |
RWStreamImp () | |
Protected Member Functions inherited from RWBodyBase | |
RWBodyBase (void) | |
RWBodyBase (RWStaticCtor) | |
RWBodyBase (const RWBodyBase &second) | |
virtual | ~RWBodyBase (void) |
RWBodyBase & | operator= (const RWBodyBase &second) |
Protected Member Functions inherited from RWTCountingBody< RWMutexLock > | |
RWTCountingBody (unsigned initCount=0) | |
RWTCountingBody (RWStaticCtor) | |
RWTCountingBody (const RWTCountingBody< RWMutexLock > &second) | |
RWTCountingBody< RWMutexLock > & | operator= (const RWTCountingBody< RWMutexLock > &second) |
~RWTCountingBody (void) | |
unsigned | addReference (void) |
unsigned | references (void) const |
unsigned | removeReference (void) |
Protected Member Functions inherited from RWTMonitor< RWMutexLock > | |
RWTMonitor () | |
RWTMonitor (RWStaticCtor) | |
RWTMonitor (const RWTMonitor< RWMutexLock > &second) | |
~RWTMonitor () | |
void | acquire () |
bool | isAcquired () const |
RWTMonitor< RWMutexLock > & | monitor () const |
RWMutexLock & | mutex () |
RWTMonitor< RWMutexLock > & | operator= (const RWTMonitor< RWMutexLock > &) |
void | release () |
bool | tryAcquire () |
Additional Inherited Members | |
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 |
Concrete class connecting a narrow character stream, to an iostreams narrow character buffer. The iostreams buffer is used as the source for the data read from the binary stream. The iostreams buffer must be opened in binary mode. Implements the body idiom from the handle-body pattern.
|
virtual |
Destructor.
|
inlineprotected |
Initializes the reference to the iostreams std::streambuf, that will be used as the source of narrow characters. Throws no exceptions.
sourceBuff | The iostreams std::streambuf that will serve as the source of narrow characters. |
|
virtual |
Returns the number of narrow characters that can be read from the iostreams std::streambuf, which is used as the source of narrow characters without blocking.
Implements RWInputStreamImp.
|
virtual |
This function does nothing. The user is responsible for closing the iostreams std::streambuf, which is used as the source of narrow characters.
Implements RWStreamImp.
|
inlineprotected |
These functions return a reference to the iostreams std::streambuf, which is used as the source of narrow characters.
|
inlineprotected |
These functions return a reference to the iostreams std::streambuf, which is used as the source of narrow characters.
|
virtual |
These functions return true
if the last operation performed on the iostreams std::streambuf failed.
Implements RWStreamImp.
|
virtual |
Returns true
if there is no narrow character available from the iostreams std::streambuf, used as the source of narrow characters.
Implements RWInputStreamImp.
|
virtual |
These functions return true
if the last operation performed on the iostreams std::streambuf failed.
Implements RWStreamImp.
|
virtual |
Returns true
if the last operation performed on the iostreams std::streambuf succeeded.
Implements RWStreamImp.
|
inlinestatic |
Constructs an RWCharFromStreambufInputStreamImp instance that uses source as its source of narrow characters, and returns a handle to it. Throws no exceptions.
source | The iostreams std::streambuf that is used as the source of narrow characters. |
|
virtual |
Reads a single narrow character from the iostreams std::streambuf used as the source of narrow characters. Throws exception RWExternalStreamException and propagates any other exception thrown by the internal iostreams stream buffer object.
Implements RWCharInputStreamImp.
|
virtual |
Reads an array of narrow characters from the iostreams std::streambuf used as the source of narrow characters. The array must be pre-allocated to contain at least numChars elements. The function returns the actual number of narrow characters extracted from the iostreams std::streambuf. Throws exception RWExternalStreamException and propagates any other exception thrown by the internal iostreams stream buffer object.
charArray | A pointer to the first element of the array. |
numChars | The number of narrow characters to be read from the stream. |
Implements RWCharInputStreamImp.
|
virtual |
Reads narrow characters from the iostreams std::streambuf used as the source of narrow characters until the last narrow character read is equal to delim, or until the end of the input sequence is reached. The narrow characters read are stored in string. If the last narrow character extracted is equal to delim, then it is not stored in string.
string | Reference to the narrow string receiving the narrow characters extracted from the iostreams std::streambuf. |
delim | Narrow character value used as a delimiter. |
Implements RWCharInputStreamImp.
|
virtual |
Reads narrow character(s) from the iostreams std::streambuf, used as its source of narrow characters, 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) inserted into charArray. If the last narrow character extracted is equal to delim, then it is not stored in charArray.
charArray | A pointer to the array receiving the narrow characters(s) extracted from the iostreams std::streambuf. |
maxSize | The maximum number of narrow character(s) to be read. |
delim | The narrow character value used as a delimiter. |
Implements RWCharInputStreamImp.
Skips numUnits narrow characters from the input sequence if possible. The function returns the actual number of narrow characters skipped, which can be any value between 0 and numUnits.
numUnits | The number of narrow characters to be skipped. |
Implements RWInputStreamImp.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |