rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWUCharToUTF8ByteOutputStreamImp Class Reference
[Streams]

Concrete class connecting a UTF-16 character stream to a UTF-8 output binary stream. More...

#include <rw/stream/RWUCharToUTF8ByteOutputStreamImp.h>

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

List of all members.

Public Member Functions

virtual ~RWUCharToUTF8ByteOutputStreamImp ()
virtual void close ()
virtual void flush ()
virtual bool isBad () const
virtual bool isFail () const
virtual bool isGood () const
virtual void write (RWUChar unicodeValue)
virtual void write (const RWUChar *unicodeArray, RWSize numUChars)

Static Public Member Functions

static RWUCharOutputStream make (const RWByteOutputStream &sink)

Protected Member Functions

 RWUCharToUTF8ByteOutputStreamImp (const RWByteOutputStream &sinkStream)
RWByteOutputStreamgetSinkStream ()
const RWByteOutputStreamgetSinkStream () const

Detailed Description

Concrete class connecting a UTF-16 character stream to a UTF-8 binary stream. The UTF-16 characters are transformed as a sequence of UTF-8 bytes. UTF-8 is a variable length encoding of the Unicode Standard using 8-bit sequences, where the high bits indicate which part of the sequence a byte belongs to. Implements the body idiom from the handle-body pattern.


Constructor & Destructor Documentation

virtual RWUCharToUTF8ByteOutputStreamImp::~RWUCharToUTF8ByteOutputStreamImp (  )  [virtual]

Destructor.

RWUCharToUTF8ByteOutputStreamImp::RWUCharToUTF8ByteOutputStreamImp ( const RWByteOutputStream sinkStream  )  [protected]

Initializes the reference to the binary stream that will be used as the sink of bytes.

Parameters:
sinkStream The binary stream that will serve as the sink of bytes.

Member Function Documentation

virtual void RWUCharToUTF8ByteOutputStreamImp::close (  )  [virtual]

This function is forwarded to the binary stream used as the sink of bytes.

Reimplemented from RWOutputStreamImp.

virtual void RWUCharToUTF8ByteOutputStreamImp::flush (  )  [virtual]

This function is forwarded to the binary stream used as the sink of bytes.

Implements RWOutputStreamImp.

const RWByteOutputStream& RWUCharToUTF8ByteOutputStreamImp::getSinkStream (  )  const [inline, protected]

Returns a reference to the binary stream that is used as the sink of bytes. Throw no exceptions.

RWByteOutputStream& RWUCharToUTF8ByteOutputStreamImp::getSinkStream (  )  [inline, protected]

Returns a reference to the binary stream that is used as the sink of bytes. Throw no exceptions.

virtual bool RWUCharToUTF8ByteOutputStreamImp::isBad (  )  const [virtual]

This function is forwarded to the binary stream used as the sink of bytes. Throws no exceptions.

Implements RWStreamImp.

virtual bool RWUCharToUTF8ByteOutputStreamImp::isFail (  )  const [virtual]

This function is forwarded to the binary stream used as the sink of bytes. Throws no exceptions.

Implements RWStreamImp.

virtual bool RWUCharToUTF8ByteOutputStreamImp::isGood (  )  const [virtual]

This function is forwarded to the binary stream used as the sink of bytes. Throws no exceptions.

Implements RWStreamImp.

static RWUCharOutputStream RWUCharToUTF8ByteOutputStreamImp::make ( const RWByteOutputStream sink  )  [inline, static]

Constructs an RWUCharToUTF8ByteOutputStreamImp instance that uses sink as its sink of bytes, and returns a handle to it. Throws no exceptions.

Parameters:
sink The binary stream that is used as the sink of bytes.
virtual void RWUCharToUTF8ByteOutputStreamImp::write ( const RWUChar unicodeArray,
RWSize  numUChars 
) [virtual]

Encodes, and writes an array of UTF-16 characters to the stream used as the sink of bytes.

Parameters:
unicodeArray A pointer to the first element of the array.
numUChars The number of UTF-16 characters to be encoded.

Implements RWUCharOutputStreamImp.

virtual void RWUCharToUTF8ByteOutputStreamImp::write ( RWUChar  unicodeValue  )  [virtual]

Encodes, and writes a single UTF-16 character to the binary stream used as the sink of bytes.

Parameters:
unicodeValue The UTF-16 character to be encoded.

Implements RWUCharOutputStreamImp.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.