rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWChainedCharArrayOutputStreamImp Class Reference
[Streams]

Concrete class implementing the narrow character array output stream interface. More...

#include <rw/stream/RWChainedCharArrayOutputStreamImp.h>

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

List of all members.

Public Member Functions

virtual ~RWChainedCharArrayOutputStreamImp ()
virtual char * getCharacterArray ()
virtual RWCString getString ()
virtual RWSize getCharacterArraySize () const
virtual void clear ()
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 RWCharArrayOutputStream make ()

Protected Member Functions

 RWChainedCharArrayOutputStreamImp ()
RWChainedMemoryStreambufgetSinkBuff ()
const RWChainedMemoryStreambufgetSinkBuff () const

Detailed Description

Concrete class implementing the narrow character array output stream interface. Characters inserted into an instance of class RWChainedCharArrayOutputStreamImp are stored in memory using an instance of class RWChainedMemoryStreambuf. Implements the body idiom from the handle-body pattern.


Constructor & Destructor Documentation

virtual RWChainedCharArrayOutputStreamImp::~RWChainedCharArrayOutputStreamImp (  )  [virtual]

Destructor.

RWChainedCharArrayOutputStreamImp::RWChainedCharArrayOutputStreamImp (  )  [inline, protected]

Constructor.


Member Function Documentation

virtual void RWChainedCharArrayOutputStreamImp::clear (  )  [virtual]

Resets the underlying buffer.

Implements RWCharArrayOutputStreamImp.

virtual void RWChainedCharArrayOutputStreamImp::close (  )  [virtual]

This function calls flush().

Reimplemented from RWOutputStreamImp.

virtual void RWChainedCharArrayOutputStreamImp::flush (  )  [virtual]

Forwards the flush() request to the internal RWChainedMemoryStreambuf object.

Implements RWOutputStreamImp.

virtual char* RWChainedCharArrayOutputStreamImp::getCharacterArray (  )  [virtual]

Returns a pointer to an array of narrow characters containing the characters inserted into the stream since its creation, or since the last invocation of function getCharacterArray(), or function clear(). Users are responsible for freeing the memory associated with the array returned by this function using operator delete[]

Implements RWCharArrayOutputStreamImp.

virtual RWSize RWChainedCharArrayOutputStreamImp::getCharacterArraySize (  )  const [virtual]

Returns the size of the narrow character array that would be returned by a call to function getCharacterArray().

Implements RWCharArrayOutputStreamImp.

const RWChainedMemoryStreambuf& RWChainedCharArrayOutputStreamImp::getSinkBuff (  )  const [inline, protected]

Returns a reference to the RWChainedMemoryStreambuf, which is used as the sink of bytes.

RWChainedMemoryStreambuf& RWChainedCharArrayOutputStreamImp::getSinkBuff (  )  [inline, protected]

Returns a reference to the RWChainedMemoryStreambuf, which is used as the sink of bytes.

virtual RWCString RWChainedCharArrayOutputStreamImp::getString (  )  [virtual]

Returns a narrow character string object containing the characters inserted into the stream since its creation.

Implements RWCharArrayOutputStreamImp.

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

Returns true if the last operation performed on the internal RWChainedMemoryStreambuf object failed. Throws no exceptions.

Implements RWStreamImp.

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

Returns true if the last operation performed on the external RWChainedMemoryStreambuf object failed

Implements RWStreamImp.

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

Returns true if the last operation performed on the internal RWChainedMemoryStreambuf object succeeded.

Implements RWStreamImp.

static RWCharArrayOutputStream RWChainedCharArrayOutputStreamImp::make ( void   )  [inline, static]

Constructs an RWChainedCharArrayOutputStreamImp instance that uses an instance of class RWChainedMemoryStreambuf to store narrow characters. The function returns a handle to the implementation class.

virtual void RWChainedCharArrayOutputStreamImp::write ( const char *  charArray,
RWSize  numChars 
) [virtual]

Writes an array of narrow characters to the stream.

Parameters:
charArray A pointer to the first element of the array.
numChars The number of narrow characters to be written to the stream.

Implements RWCharOutputStreamImp.

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

Writes a single narrow character to the stream.

Parameters:
charValue The narrow character to be written to the stream.

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.