SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions
RWUCharArrayOutputStream Class Reference

Handle class for Unicode character output streams that support an extended interface. More...

#include <rw/stream/RWUCharArrayOutputStream.h>

Inheritance diagram for RWUCharArrayOutputStream:
RWUCharOutputStream RWHandleBase

Public Member Functions

 RWUCharArrayOutputStream (RWUCharArrayOutputStreamImp *body)
 
 RWUCharArrayOutputStream (const RWUCharArrayOutputStream &handle)
 
void clear ()
 
RWUChargetUCharacterArray ()
 
RWSize getUCharacterArraySize () const
 
RWUCharArrayOutputStreamoperator= (const RWUCharArrayOutputStream &handle)
 
- Public Member Functions inherited from RWUCharOutputStream
 RWUCharOutputStream (RWUCharOutputStreamImp *body)
 
 RWUCharOutputStream (const RWUCharOutputStream &handle)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWUCharOutputStreamoperator<< (RWUCharOutputStream &(*pf)(RWUCharOutputStream &))
 
RWUCharOutputStream operator<< (RWUCharOutputStream(*pf)(RWUCharOutputStream &))
 
RWUCharOutputStreamoperator<< (RWUChar unicodeValue)
 
RWUCharOutputStreamoperator= (const RWUCharOutputStream &handle)
 
void write (RWUChar unicodeValue)
 
void write (const RWUChar *unicodeArray, RWSize numUChars)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator< (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (void)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (const RWHandleBase &second)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

Handle class for Unicode character output streams that support an extended interface. This interface allows retrieval of the output stream's inserted data as a UTF-16 character array. Implements the handle idiom from the handle-body pattern.

Note
All Unicode-named variables, such as UChar or unicodeArray refer to the Unicode form UTF-16.

Constructor & Destructor Documentation

RWUCharArrayOutputStream::RWUCharArrayOutputStream ( RWUCharArrayOutputStreamImp body)
inlineexplicit

Constructor.

Parameters
bodyA pointer to an implementation class supporting the abstract interface RWUCharArrayOutputStreamImp.
RWUCharArrayOutputStream::RWUCharArrayOutputStream ( const RWUCharArrayOutputStream handle)
inline

Copy constructor.

Parameters
handleA UTF-16 character array stream handle used to initialize the newly created handle.

Member Function Documentation

void RWUCharArrayOutputStream::clear ( void  )
inline

Resets the underlying buffer.

RWUChar* RWUCharArrayOutputStream::getUCharacterArray ( )
inline

Returns a pointer to the array of UTF-16 characters inserted into the stream since its creation. Users are responsible for freeing the memory associated with the array returned by this function using operator delete[].

RWSize RWUCharArrayOutputStream::getUCharacterArraySize ( ) const
inline

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

RWUCharArrayOutputStream& RWUCharArrayOutputStream::operator= ( const RWUCharArrayOutputStream handle)
inline

Assignment operator. Throws no exceptions.

Parameters
handleA UTF-16 character array stream handle used to initialize this handle.

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