2005/5/9

     
 

class UCS2Decoder

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::locale::UCS2Decoder Class Reference

#include <UCS2Encoding.h>

Inheritance diagram for acdk::locale::UCS2Decoder:

acdk::locale::Decoder acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

decode 2 bytes unicode character with given endian order to String


Public Member Functions

 UCS2Decoder (IN(REncoding) encoding, UCSEndianess endian=NativeEndian, CodingErrorAction onMalformed=ReportCodingError, CodingErrorAction onUnmappable=ReplaceCodingError)
UCSEndianess getEndian ()
void setEndian (UCSEndianess endian)
virtual int decodeToChar (IN(acdk::io::RReader) in)
 decodes one char

virtual RString decodeToString (IN(acdk::io::RReader) in, int stopOn=-1)
 decodes from a byte stream to a string.

virtual RString decode (IN(RString) str)
 decodes a string from one encoding to another


Private Attributes

UCSEndianess _endian


Constructor & Destructor Documentation

acdk::locale::UCS2Decoder::UCS2Decoder IN(REncoding encoding,
UCSEndianess  endian = NativeEndian,
CodingErrorAction  onMalformed = ReportCodingError,
CodingErrorAction  onUnmappable = ReplaceCodingError
[inline]
 


Member Function Documentation

virtual RString acdk::locale::UCS2Decoder::decode IN(RString str  )  [virtual]
 

decodes a string from one encoding to another

Implements acdk::locale::Decoder.

virtual int acdk::locale::UCS2Decoder::decodeToChar IN(acdk::io::RReader in  )  [virtual]
 

decodes one char

Returns:
return ucchar or -1 if end of file, -2 if input is not mappable

Implements acdk::locale::Decoder.

virtual RString acdk::locale::UCS2Decoder::decodeToString IN(acdk::io::RReader in,
int  stopOn = -1
[virtual]
 

decodes from a byte stream to a string.

In normal cases the String contains a Ascii encoding if only 7bit character are in the byte stream.

Parameters:
in reader to read from
stopOn -1 = until end of string -2 = until internal 0 terminating character (normally '' >= 0 character number to write

Implements acdk::locale::Decoder.

UCSEndianess acdk::locale::UCS2Decoder::getEndian  )  [inline]
 

void acdk::locale::UCS2Decoder::setEndian UCSEndianess  endian  )  [inline]
 


Member Data Documentation

UCSEndianess acdk::locale::UCS2Decoder::_endian [private]