SourcePro® 2024.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) |
![]() | |
virtual | ~RWCharInputStreamImp () |
virtual RWCharInputStream | acquire () |
virtual void | release () |
![]() | |
virtual | ~RWInputStreamImp () |
![]() | |
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 |
![]() | |
RWCharInputStreamImp () | |
![]() | |
RWInputStreamImp () | |
![]() | |
RWStreamImp () | |
![]() | |
RWBodyBase (const RWBodyBase &second) | |
RWBodyBase (RWStaticCtor) | |
RWBodyBase (void) | |
virtual | ~RWBodyBase (void) |
RWBodyBase & | operator= (const RWBodyBase &second) |
![]() | |
RWTCountingBody (const RWTCountingBody< RWMutexLock > &second) | |
RWTCountingBody (RWStaticCtor) | |
RWTCountingBody (unsigned initCount=0) | |
RWTCountingBody< RWMutexLock > & | operator= (const RWTCountingBody< RWMutexLock > &second) |
~RWTCountingBody (void) | |
unsigned | addReference (void) |
unsigned | references (void) const |
unsigned | removeReference (void) |
![]() | |
RWTMonitor (const RWTMonitor< RWMutexLock > &second) | |
RWTMonitor (RWStaticCtor) | |
RWTMonitor (void) | |
~RWTMonitor (void) | |
void | acquire (void) |
bool | isAcquired (void) const |
RWTMonitor< RWMutexLock > & | monitor (void) const |
RWMutexLock & | mutex (void) |
RWTMonitor< RWMutexLock > & | operator= (const RWTMonitor< RWMutexLock > &) |
void | release (void) |
bool | tryAcquire (void) |
Additional Inherited Members | |
![]() | |
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 |
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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |