SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Concrete class connecting a binary stream to an iostreams narrow character buffer. More...
#include <rw/stream/RWByteToStreambufOutputStreamImp.h>
Public Member Functions | |
virtual | ~RWByteToStreambufOutputStreamImp () |
virtual void | close () |
virtual void | flush () |
virtual bool | isBad () const |
virtual bool | isFail () const |
virtual bool | isGood () const |
virtual void | write (const RWByte *byteArray, RWSize numBytes) |
virtual void | write (RWByte byteValue) |
Public Member Functions inherited from RWByteOutputStreamImp | |
virtual | ~RWByteOutputStreamImp () |
virtual RWByteOutputStream | 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 RWByteOutputStream | make (std::streambuf &sink) |
Protected Member Functions | |
RWByteToStreambufOutputStreamImp (std::streambuf &sinkBuff) | |
std::streambuf & | getSinkBuff () |
const std::streambuf & | getSinkBuff () const |
Protected Member Functions inherited from RWByteOutputStreamImp | |
RWByteOutputStreamImp () | |
Protected Member Functions inherited from RWOutputStreamImp | |
RWOutputStreamImp () | |
Protected Member Functions inherited from RWStreamImp | |
RWStreamImp () | |
Protected Member Functions inherited from RWBodyBase | |
RWBodyBase (const RWBodyBase &second) | |
RWBodyBase (RWStaticCtor) | |
RWBodyBase (void) | |
virtual | ~RWBodyBase (void) |
RWBodyBase & | operator= (const RWBodyBase &second) |
Protected Member Functions inherited from RWTCountingBody< RWMutexLock > | |
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) |
Protected Member Functions inherited from RWTMonitor< RWMutexLock > | |
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 | |
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 binary stream to an iostreams narrow character buffer. The iostreams buffer is used as the sink for the data written to 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
, used as the sink of bytes.
sinkBuff | The iostreams std::streambuf that will serve as the sink of bytes. |
|
virtual |
This function calls flush(). The user is responsible for closing the iostreams std::streambuf
used as the sink of bytes, if necessary. Throws RWExternalStreamException and propagates any other exception thrown by the internal std::iostreams
streambuf object.
Reimplemented from RWOutputStreamImp.
|
virtual |
Forward the flush request to the iostreams std::streambuf
. Throws RWExternalStreamException and propagates any other exception thrown by the internal iostreams std::streambuf
object.
Implements RWOutputStreamImp.
|
inlineprotected |
Returns a reference to the iostreams std::streambuf
, which is used as the sink of bytes.
|
inlineprotected |
Returns a const reference to the iostreams std::streambuf
, which is used as the sink of bytes.
|
virtual |
Returns 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
failed.
Implements RWStreamImp.
|
virtual |
Returns true
if the last operation performed on the iostreams std::streambuf
succeeded.
Implements RWStreamImp.
|
inlinestatic |
Constructs an RWByteToStreambufOutputStreamImp instance that uses sink as its sink of bytes, and returns a handle to it. Throws no exceptions.
sink | The iostreams std::streambuf that is used as the sink of bytes. |
|
virtual |
Writes an array of bytes to the iostreams std::streambuf
. Throws exception RWIncompleteStreamOperation and propagates any other exception thrown by the internal iostreams std::streambuf
object.
byteArray | A pointer to the first element of the array. |
numBytes | The number of bytes to be written. |
Implements RWByteOutputStreamImp.
|
virtual |
Writes a single byte to the iostreams std::streambuf
. Throws exception RWExternalStreamException and propagates any other exception thrown by the internal iostreams std::streambuf
object.
byteValue | The byte to be written. |
Implements RWByteOutputStreamImp.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |