ExtendedASCIICharacterSet Class Reference

The active extended-ascii character set encoding. Performs UTF-8 encoding and decoding of extended-ascii characters. More...

#include <convert.h>

Collaboration diagram for ExtendedASCIICharacterSet:
Collaboration graph
[legend]

Public Member Functions

 ExtendedASCIICharacterSet ()
void print () const
 Prints the (up to) 128 characters in the current extended-ascii character set. Useful for debugging.
const UTF8Characterdecode (char c) const
 Returns c decoded from extended-ascii to UTF-8. c must be an extended-ascii character.
char encode (const UTF8Character &c) const
 Returns c encoded to extended-ascii from UTF-8. c must map to an extended-ascii character.

Private Types

typedef char UTF8CharBuffer [6]

Private Attributes

UTF8CharBuffer m_converted [128]
UTF8Character m_decodeMap [128]
UTF8CharacterToExtendedASCII m_encodeMap [128]

Detailed Description

The active extended-ascii character set encoding. Performs UTF-8 encoding and decoding of extended-ascii characters.

Obtain the global instance with globalExtendedASCIICharacterSet().

Definition at line 148 of file convert.h.


Member Typedef Documentation

typedef char ExtendedASCIICharacterSet::UTF8CharBuffer[6] [private]

Definition at line 150 of file convert.h.


Constructor & Destructor Documentation

ExtendedASCIICharacterSet::ExtendedASCIICharacterSet (  )  [inline]

Member Function Documentation

const UTF8Character& ExtendedASCIICharacterSet::decode ( char  c  )  const [inline]

Returns c decoded from extended-ascii to UTF-8. c must be an extended-ascii character.

Definition at line 188 of file convert.h.

References char_is_ascii(), extended_ascii_to_index(), globalCharacterSet(), and m_decodeMap.

char ExtendedASCIICharacterSet::encode ( const UTF8Character c  )  const [inline]

Returns c encoded to extended-ascii from UTF-8. c must map to an extended-ascii character.

Definition at line 197 of file convert.h.

References UTF8Character::buffer, char_is_ascii(), globalCharacterSet(), and m_encodeMap.

Referenced by ostream_write().

void ExtendedASCIICharacterSet::print (  )  const [inline]

Prints the (up to) 128 characters in the current extended-ascii character set. Useful for debugging.

Definition at line 177 of file convert.h.

References extended_ascii_for_index(), CharacterSet::get(), globalCharacterSet(), i, and m_decodeMap.


Field Documentation

Definition at line 151 of file convert.h.

Referenced by ExtendedASCIICharacterSet().

Definition at line 152 of file convert.h.

Referenced by decode(), ExtendedASCIICharacterSet(), and print().

Definition at line 153 of file convert.h.

Referenced by encode(), and ExtendedASCIICharacterSet().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2