SourcePro® API Reference Guide

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

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (const RWHandleBase &second)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (void)
 
 ~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() [1/2]

RWUCharArrayOutputStream::RWUCharArrayOutputStream ( RWUCharArrayOutputStreamImp * body)
inlineexplicit

Constructor.

Parameters
bodyA pointer to an implementation class supporting the abstract interface RWUCharArrayOutputStreamImp.

◆ RWUCharArrayOutputStream() [2/2]

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

◆ clear()

void RWUCharArrayOutputStream::clear ( )
inline

Resets the underlying buffer.

◆ getUCharacterArray()

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[].

◆ getUCharacterArraySize()

RWSize RWUCharArrayOutputStream::getUCharacterArraySize ( ) const
inline

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

◆ operator=()

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