Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXTextCodec Class Reference

Abstract base class for a stateless coder/decoder. More...

#include <FXTextCodec.h>

Inheritance diagram for FX::FXTextCodec:

FX::FXUTF16Codec FX::FXUTF32Codec FX::FXUTF8Codec List of all members.

Public Member Functions

virtual unsigned long fromUnicode (FXuchar *&dest, unsigned long m, const FXwchar *&src, unsigned long n)=0
virtual unsigned long toUnicode (FXwchar *&dest, unsigned long m, const FXuchar *&src, unsigned long n)=0
virtual const FXchar * mimeName () const =0
virtual FXint mibEnum () const =0
virtual ~FXTextCodec ()

Static Public Member Functions

FXbool registerCodec (const FXchar *name, FXTextCodec *codec)
FXTextCodeccodecForName (const FXchar *name)

Detailed Description

Abstract base class for a stateless coder/decoder.


Constructor & Destructor Documentation

virtual FX::FXTextCodec::~FXTextCodec  )  [inline, virtual]
 

Destructor.


Member Function Documentation

virtual unsigned long FX::FXTextCodec::fromUnicode FXuchar *&  dest,
unsigned long  m,
const FXwchar *&  src,
unsigned long  n
[pure virtual]
 

Convert a sequence of wide characters from Unicode to the specified 8-bit encoding.

Reads at most n wide characters from src and writes at most m bytes into dest. Returns the number of characters actually written into dest.

On exit, the src and dest pointers are updated to point to the next available character (or byte) for reading (writing).

Implemented in FX::FXUTF16Codec, FX::FXUTF32Codec, and FX::FXUTF8Codec.

virtual unsigned long FX::FXTextCodec::toUnicode FXwchar *&  dest,
unsigned long  m,
const FXuchar *&  src,
unsigned long  n
[pure virtual]
 

Convert a sequence of bytes in some 8-bit encoding to a sequence of wide characters (Unicode).

Reads at most n bytes from src and writes at most m characters into dest. Returns the number of characters actually read from src.

On exit, the src and dest pointers are updated to point to the next available byte (or character) for writing (reading).

Implemented in FX::FXUTF16Codec, FX::FXUTF32Codec, and FX::FXUTF8Codec.

virtual const FXchar* FX::FXTextCodec::mimeName  )  const [pure virtual]
 

Return the IANA mime name for this codec; this is used for example as "text/utf-8" in drag and drop protocols.

Implemented in FX::FXUTF16Codec, FX::FXUTF32Codec, and FX::FXUTF8Codec.

virtual FXint FX::FXTextCodec::mibEnum  )  const [pure virtual]
 

Return the Management Information Base (MIBenum) for the character set.

Implemented in FX::FXUTF16Codec, FX::FXUTF32Codec, and FX::FXUTF8Codec.

FXbool FX::FXTextCodec::registerCodec const FXchar *  name,
FXTextCodec codec
[static]
 

Register codec with this name.

Returns FALSE if a different codec has already been registered with this name, otherwise TRUE.

FXTextCodec* FX::FXTextCodec::codecForName const FXchar *  name  )  [static]
 

Return the codec associated with this name (or NULL if no match is found).

Copyright © 1997-2005 Jeroen van der Zijp