SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
RWChainedCharArrayOutputStreamImp Class Reference

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 >

Public Member Functions

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

Protected Member Functions

 RWChainedCharArrayOutputStreamImp ()
 
RWChainedMemoryStreambufgetSinkBuff ()
 
const RWChainedMemoryStreambufgetSinkBuff () const
 
- Protected Member Functions inherited from RWCharArrayOutputStreamImp
 RWCharArrayOutputStreamImp ()
 
- 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)
 
RWBodyBaseoperator= (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
 
RWMutexLockmutex ()
 
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
 

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 ( )
inlineprotected

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.

RWChainedMemoryStreambuf& RWChainedCharArrayOutputStreamImp::getSinkBuff ( )
inlineprotected

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

const RWChainedMemoryStreambuf& RWChainedCharArrayOutputStreamImp::getSinkBuff ( ) const
inlineprotected

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  )
inlinestatic

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 ( char  charValue)
virtual

Writes a single narrow character to the stream.

Parameters
charValueThe narrow character to be written to the stream.

Implements RWCharOutputStreamImp.

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

Writes an array of narrow characters to the stream.

Parameters
charArrayA pointer to the first element of the array.
numCharsThe number of narrow characters to be written to the stream.

Implements RWCharOutputStreamImp.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.