Concrete class connecting a narrow character stream to an iostreams narrow character buffer. More...
#include <rw/stream/RWCharToStreambufOutputStreamImp.h>
Public Member Functions | |
virtual | ~RWCharToStreambufOutputStreamImp () |
virtual void | close () |
virtual void | flush () |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual void | write (char charValue) |
virtual void | write (const char *charArray, RWSize numChars) |
Public Member Functions inherited from RWCharOutputStreamImp | |
virtual | ~RWCharOutputStreamImp () |
virtual RWCharOutputStream | acquire () |
virtual void | release () |
Public Member Functions inherited from RWOutputStreamImp | |
virtual | ~RWOutputStreamImp () |
Public Member Functions inherited from RWStreamImp | |
virtual | ~RWStreamImp () |
Static Public Member Functions | |
static RWCharOutputStream | make (std::streambuf &sink) |
Protected Member Functions | |
RWCharToStreambufOutputStreamImp (std::streambuf &sinkBuff) | |
std::streambuf & | getSinkBuff () |
const std::streambuf & | getSinkBuff () const |
Protected Member Functions inherited from RWCharOutputStreamImp | |
RWCharOutputStreamImp () | |
Protected Member Functions inherited from RWOutputStreamImp | |
RWOutputStreamImp () | |
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 sink for the data written to the narrow character stream. 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 sink of narrow characters.
sinkBuff | The iostreams std::streambuf that will serve as the sink of narrow characters. |
|
virtual |
This function calls flush(). The user is responsible for closing the iostreams std::streambuf
used as the sink of narrow characters if necessary.
RWExternalStreamException | Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur. |
Reimplemented from RWOutputStreamImp.
|
virtual |
Forward the flush request to the iostreams std::streambuf
.
RWExternalStreamException | Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur. |
Implements RWOutputStreamImp.
|
inlineprotected |
Returns a reference to the iostreams std::streambuf
, which is used as the sink of narrow characters. Throws no exceptions.
|
inlineprotected |
Returns a reference to the iostreams std::streambuf
, which is used as the sink of narrow characters. Throws no exceptions.
|
virtual |
Returns true
if the last operation performed on the iostreams std::streambuf
failed. Throws no exceptions.
Implements RWStreamImp.
|
virtual |
Returns true
if the last operation performed on the iostreams std::streambuf
failed. Throws no exceptions.
Implements RWStreamImp.
|
virtual |
Returns true
if the last operation performed on the iostreams std::streambuf
succeeded. Throws no exceptions.
Implements RWStreamImp.
|
inlinestatic |
Constructs an RWCharToStreambufOutputStreamImp instance that uses sink as its sink of narrow characters, and returns a handle to it. Throws no exceptions.
sink | The iostreams std::streambuf that is used as the sink of narrow characters. |
|
virtual |
Writes a single narrow character to the iostreams std::streambuf
.
RWExternalStreamException | Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur. |
charValue | The narrow character to be written. |
Implements RWCharOutputStreamImp.
|
virtual |
Writes an array of narrow characters to the iostreams std::streambuf
.
RWIncompleteStreamOperation | Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur. |
charArray | A pointer to the first element of the array. |
numChars | The number of narrow characters to be written. |
Implements RWCharOutputStreamImp.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |