rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWCharToStreambufOutputStreamImp Class Reference
[Streams]

Concrete class connecting a narrow character stream to an iostreams narrow character buffer. More...

#include <rw/stream/RWCharToStreambufOutputStreamImp.h>

Inheritance diagram for RWCharToStreambufOutputStreamImp:
RWCharOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

List of all members.

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)

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

Detailed Description

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.


Constructor & Destructor Documentation

virtual RWCharToStreambufOutputStreamImp::~RWCharToStreambufOutputStreamImp (  )  [virtual]

Destructor.

RWCharToStreambufOutputStreamImp::RWCharToStreambufOutputStreamImp ( std::streambuf &  sinkBuff  )  [inline, protected]

Initializes the reference to the iostreams std::streambuf, that will be used as the sink of narrow characters.

Parameters:
sinkBuff The iostreams std::streambuf that will serve as the sink of narrow characters.

Member Function Documentation

virtual void RWCharToStreambufOutputStreamImp::close (  )  [virtual]

This function calls flush(). The user is responsible for closing the iostreams std::streambuf used as the sink of narrow characters if necessary.

Exceptions:
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 void RWCharToStreambufOutputStreamImp::flush (  )  [virtual]

Forward the flush request to the iostreams std::streambuf.

Exceptions:
RWExternalStreamException Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur.

Implements RWOutputStreamImp.

const std::streambuf& RWCharToStreambufOutputStreamImp::getSinkBuff (  )  const [inline, protected]

Returns a reference to the iostreams std::streambuf, which is used as the sink of narrow characters. Throws no exceptions.

std::streambuf& RWCharToStreambufOutputStreamImp::getSinkBuff (  )  [inline, protected]

Returns a reference to the iostreams std::streambuf, which is used as the sink of narrow characters. Throws no exceptions.

virtual bool RWCharToStreambufOutputStreamImp::isBad (  )  const [virtual]

Returns true if the last operation performed on the iostreams std::streambuf failed. Throws no exceptions.

Implements RWStreamImp.

virtual bool RWCharToStreambufOutputStreamImp::isFail (  )  const [virtual]

Returns true if the last operation performed on the iostreams std::streambuf failed. Throws no exceptions.

Implements RWStreamImp.

virtual bool RWCharToStreambufOutputStreamImp::isGood (  )  const [virtual]

Returns true if the last operation performed on the iostreams std::streambuf succeeded. Throws no exceptions.

Implements RWStreamImp.

static RWCharOutputStream RWCharToStreambufOutputStreamImp::make ( std::streambuf &  sink  )  [inline, static]

Constructs an RWCharToStreambufOutputStreamImp instance that uses sink as its sink of narrow characters, and returns a handle to it. Throws no exceptions.

Parameters:
sink The iostreams std::streambuf that is used as the sink of narrow characters.
virtual void RWCharToStreambufOutputStreamImp::write ( const char *  charArray,
RWSize  numChars 
) [virtual]

Writes an array of narrow characters to the iostreams std::streambuf.

Exceptions:
RWIncompleteStreamOperation Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur.
Parameters:
charArray A pointer to the first element of the array.
numChars The number of narrow characters to be written.

Implements RWCharOutputStreamImp.

virtual void RWCharToStreambufOutputStreamImp::write ( char  charValue  )  [virtual]

Writes a single narrow character to the iostreams std::streambuf.

Exceptions:
RWExternalStreamException Thrown when the call to the internal iostreams std::streambuf object fails or any propagated exceptions from that call occur.
Parameters:
charValue The narrow character to be written.

Implements RWCharOutputStreamImp.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.