SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWChainedUCharArrayOutputStreamImp Class Reference

Concrete class implementing the UTF-16 character array output stream interface. More...

#include <rw/stream/RWChainedUCharArrayOutputStreamImp.h>

Inheritance diagram for RWChainedUCharArrayOutputStreamImp:
RWUCharArrayOutputStreamImp RWUCharOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

Public Member Functions

virtual ~RWChainedUCharArrayOutputStreamImp ()
 
virtual void clear ()
 
virtual void close ()
 
virtual void flush ()
 
virtual RWUChargetUCharacterArray ()
 
virtual RWSize getUCharacterArraySize () const
 
virtual bool isBad () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
virtual void write (const RWUChar *unicodeArray, RWSize numUChars)
 
virtual void write (RWUChar unicodeValue)
 
- Public Member Functions inherited from RWUCharArrayOutputStreamImp
virtual ~RWUCharArrayOutputStreamImp ()
 
- Public Member Functions inherited from RWUCharOutputStreamImp
virtual ~RWUCharOutputStreamImp ()
 
virtual RWUCharOutputStream 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 RWUCharArrayOutputStream make ()
 

Protected Member Functions

 RWChainedUCharArrayOutputStreamImp ()
 
RWChainedMemoryStreambufgetSinkBuff ()
 
const RWChainedMemoryStreambufgetSinkBuff () const
 
- Protected Member Functions inherited from RWUCharArrayOutputStreamImp
 RWUCharArrayOutputStreamImp ()
 
- Protected Member Functions inherited from RWUCharOutputStreamImp
 RWUCharOutputStreamImp ()
 
- 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 UTF-16 character array output stream interface. UTF-16 characters inserted into an instance of class RWChainedUCharArrayOutputStreamImp are stored in memory using an instance of class RWChainedMemoryStreambuf. Implements the body idiom from the handle-body pattern.

Constructor & Destructor Documentation

◆ ~RWChainedUCharArrayOutputStreamImp()

virtual RWChainedUCharArrayOutputStreamImp::~RWChainedUCharArrayOutputStreamImp ( )
virtual

Destructor.

◆ RWChainedUCharArrayOutputStreamImp()

RWChainedUCharArrayOutputStreamImp::RWChainedUCharArrayOutputStreamImp ( )
inlineprotected

Constructor.

Member Function Documentation

◆ clear()

virtual void RWChainedUCharArrayOutputStreamImp::clear ( )
virtual

Reset the underlying buffer.

Implements RWUCharArrayOutputStreamImp.

◆ close()

virtual void RWChainedUCharArrayOutputStreamImp::close ( )
virtual

This function calls flush().

Reimplemented from RWOutputStreamImp.

◆ flush()

virtual void RWChainedUCharArrayOutputStreamImp::flush ( )
virtual

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

Implements RWOutputStreamImp.

◆ getSinkBuff() [1/2]

RWChainedMemoryStreambuf & RWChainedUCharArrayOutputStreamImp::getSinkBuff ( )
inlineprotected

Returns a reference to the RWChainedMemoryStreambuf, which is used as the sink of UTF-16 characters.

◆ getSinkBuff() [2/2]

const RWChainedMemoryStreambuf & RWChainedUCharArrayOutputStreamImp::getSinkBuff ( ) const
inlineprotected

Returns a reference to the RWChainedMemoryStreambuf, which is used as the sink of UTF-16 characters.

◆ getUCharacterArray()

virtual RWUChar * RWChainedUCharArrayOutputStreamImp::getUCharacterArray ( )
virtual

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

Implements RWUCharArrayOutputStreamImp.

◆ getUCharacterArraySize()

virtual RWSize RWChainedUCharArrayOutputStreamImp::getUCharacterArraySize ( ) const
virtual

Returns the size of the UTF-16 character array that would be returned by a call to function getUCharacterArray().

Implements RWUCharArrayOutputStreamImp.

◆ isBad()

virtual bool RWChainedUCharArrayOutputStreamImp::isBad ( ) const
virtual

These functions return true if the last operation performed on the internal RWChainedMemoryStreambuf object failed.

Implements RWStreamImp.

◆ isFail()

virtual bool RWChainedUCharArrayOutputStreamImp::isFail ( ) const
virtual

These functions return true if the last operation performed on the internal RWChainedMemoryStreambuf object failed.

Implements RWStreamImp.

◆ isGood()

virtual bool RWChainedUCharArrayOutputStreamImp::isGood ( ) const
virtual

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

Implements RWStreamImp.

◆ make()

static RWUCharArrayOutputStream RWChainedUCharArrayOutputStreamImp::make ( )
inlinestatic

Constructs an RWChainedUCharArrayOutputStreamImp instance that uses an instance of class RWChainedMemoryStreambuf to store UTF-16 characters. The function returns a handle to the implementation class.

◆ write() [1/2]

virtual void RWChainedUCharArrayOutputStreamImp::write ( const RWUChar * unicodeArray,
RWSize numUChars )
virtual

Writes an array of UTF-16 characters to the stream. Throws exception RWIncompleteStreamOperation.

Parameters
unicodeArrayA pointer to the first element of the array
numUCharsThe number of UTF-16 characters to be written.

Implements RWUCharOutputStreamImp.

◆ write() [2/2]

virtual void RWChainedUCharArrayOutputStreamImp::write ( RWUChar unicodeValue)
virtual

Writes a single UTF-16 character to the stream. Throws exception RWIncompleteStreamOperation.

Parameters
unicodeValueThe UTF-16 character to be written.

Implements RWUCharOutputStreamImp.

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