SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWBodyBase &second)
 
 RWBodyBase (RWStaticCtor)
 
 RWBodyBase (void)
 
virtual ~RWBodyBase (void)
 
RWBodyBaseoperator= (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
 
RWMutexLockmutex (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
 

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

◆ ~RWChainedCharArrayOutputStreamImp()

virtual RWChainedCharArrayOutputStreamImp::~RWChainedCharArrayOutputStreamImp ( )
virtual

Destructor.

◆ RWChainedCharArrayOutputStreamImp()

RWChainedCharArrayOutputStreamImp::RWChainedCharArrayOutputStreamImp ( )
inlineprotected

Constructor.

Member Function Documentation

◆ clear()

virtual void RWChainedCharArrayOutputStreamImp::clear ( )
virtual

Resets the underlying buffer.

Implements RWCharArrayOutputStreamImp.

◆ close()

virtual void RWChainedCharArrayOutputStreamImp::close ( )
virtual

This function calls flush().

Reimplemented from RWOutputStreamImp.

◆ flush()

virtual void RWChainedCharArrayOutputStreamImp::flush ( )
virtual

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

Implements RWOutputStreamImp.

◆ getCharacterArray()

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.

◆ getCharacterArraySize()

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.

◆ getSinkBuff() [1/2]

RWChainedMemoryStreambuf & RWChainedCharArrayOutputStreamImp::getSinkBuff ( )
inlineprotected

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

◆ getSinkBuff() [2/2]

const RWChainedMemoryStreambuf & RWChainedCharArrayOutputStreamImp::getSinkBuff ( ) const
inlineprotected

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

◆ getString()

virtual RWCString RWChainedCharArrayOutputStreamImp::getString ( )
virtual

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

Implements RWCharArrayOutputStreamImp.

◆ isBad()

virtual bool RWChainedCharArrayOutputStreamImp::isBad ( ) const
virtual

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

Implements RWStreamImp.

◆ isFail()

virtual bool RWChainedCharArrayOutputStreamImp::isFail ( ) const
virtual

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

Implements RWStreamImp.

◆ isGood()

virtual bool RWChainedCharArrayOutputStreamImp::isGood ( ) const
virtual

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

Implements RWStreamImp.

◆ make()

static RWCharArrayOutputStream RWChainedCharArrayOutputStreamImp::make ( )
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.

◆ write() [1/2]

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.

◆ write() [2/2]

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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.