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

HexToUnicodeTransliterator Class Reference

A transliterator that converts from hexadecimal Unicode escape sequences to the characters they represent. More...

#include <hextouni.h>

Inheritance diagram for HexToUnicodeTransliterator::

Transliterator UObject List of all members.

Public Methods

 HexToUnicodeTransliterator (UnicodeFilter *adoptedFilter=0)
 Constructs a transliterator that recognizes the standard prefixes "&#92;u", "&#92;U", "u+", and "U+", each with no suffix. More...

 HexToUnicodeTransliterator (const UnicodeString &pattern, UErrorCode &status)
 Constructs a custom transliterator with the given pattern. More...

 HexToUnicodeTransliterator (const UnicodeString &pattern, UnicodeFilter *adoptedFilter, UErrorCode &status)
 Constructs a custom transliterator with the given pattern and filter. More...

virtual ~HexToUnicodeTransliterator ()
 Destructor. More...

 HexToUnicodeTransliterator (const HexToUnicodeTransliterator &)
 Copy constructor. More...

HexToUnicodeTransliterator & operator= (const HexToUnicodeTransliterator &)
 Assignment operator. More...

Transliteratorclone (void) const
 Transliterator API. More...

void applyPattern (const UnicodeString &thePattern, UErrorCode &status)
 Set the patterns recognized by this transliterator. More...

const UnicodeStringtoPattern (void) const
 Return this transliterator's pattern. More...

virtual void handleTransliterate (Replaceable &text, UTransPosition &offset, UBool isIncremental) const
 Implements Transliterator::handleTransliterate. More...

virtual UClassID getDynamicClassID () const
 ICU "poor man's RTTI", returns a UClassID for the actual class. More...


Static Public Methods

UClassID getStaticClassID ()
 ICU "poor man's RTTI", returns a UClassID for this class. More...


Private Types

enum  { SEMICOLON = 0x003B, ZERO = 0x0030, POUND = 0x0023, BACKSLASH = 0x005C }

Private Attributes

UnicodeString pattern
 The pattern for this transliterator. More...

UnicodeString affixes
 The processed pattern specification. More...

int32_t affixCount
 The number of different affix sets in affixes. More...


Static Private Attributes

const char _ID []
 ID for this transliterator. More...

const UChar DEFAULT_PATTERN []
 The pattern used by the default constructor. More...

const char fgClassID
 The address of this static class variable serves as this class's ID for ICU "poor man's RTTI". More...


Detailed Description

A transliterator that converts from hexadecimal Unicode escape sequences to the characters they represent.

For example, "U+0040" and '\u0040'. A default HexToUnicodeTransliterator recognizes the prefixes "U+", "u+", "&#92;U", and "&#92;u". Hex values may be upper- or lowercase. By calling the applyPattern() method, one or more custom prefix/suffix pairs may be specified. See applyPattern() for details.

Copyright © IBM Corporation 1999. All rights reserved.

Author:
Alan Liu
Deprecated:
To be removed after 2002-sep-30, use Transliterator::createInstance factory method.

Definition at line 31 of file hextouni.h.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
SEMICOLON 
ZERO 
POUND 
BACKSLASH 

Definition at line 44 of file hextouni.h.


Constructor & Destructor Documentation

HexToUnicodeTransliterator::HexToUnicodeTransliterator UnicodeFilter   adoptedFilter = 0
 

Constructs a transliterator that recognizes the standard prefixes "&#92;u", "&#92;U", "u+", and "U+", each with no suffix.

Deprecated:
To be removed after 2002-sep-30, use Transliterator::createInstance factory method.

HexToUnicodeTransliterator::HexToUnicodeTransliterator const UnicodeString   pattern,
UErrorCode   status
 

Constructs a custom transliterator with the given pattern.

See also:
applyPattern
Deprecated:
To be removed after 2002-sep-30, use Transliterator::createInstance factory method.

HexToUnicodeTransliterator::HexToUnicodeTransliterator const UnicodeString   pattern,
UnicodeFilter   adoptedFilter,
UErrorCode   status
 

Constructs a custom transliterator with the given pattern and filter.

See also:
applyPattern
Deprecated:
To be removed after 2002-sep-30, use Transliterator::createInstance factory method.

HexToUnicodeTransliterator::~HexToUnicodeTransliterator   [inline, virtual]
 

Destructor.

Deprecated:
To be removed after 2002-sep-30, use Transliterator dtor directly.

Definition at line 182 of file hextouni.h.

HexToUnicodeTransliterator::HexToUnicodeTransliterator const HexToUnicodeTransliterator &   
 

Copy constructor.

Deprecated:
To be removed after 2002-sep-30, use Transliterator::createInstance factory method


Member Function Documentation

void HexToUnicodeTransliterator::applyPattern const UnicodeString   thePattern,
UErrorCode   status
 

Set the patterns recognized by this transliterator.

One or more patterns may be specified, separated by semicolons (';'). Each pattern contains zero or more prefix characters, one or more digit characters, and zero or more suffix characters. The digit characters indicates optional digits ('#') followed by required digits ('0'). The total number of digits cannot exceed 4, and must be at least 1 required digit. Use a backslash ('\') to escape any of the special characters. An empty pattern is allowed; it specifies a transliterator that does nothing.

Example: "U+0000;<###0>" specifies two patterns. The first has a prefix of "U+", exactly four digits, and no suffix. The second has a prefix of "<", between one and four digits, and a suffix of ">".

 pattern := spec | ( pattern ';' spec )
 spec := prefix-char* digit-spec suffix-char*
 digit-spec := '#'* '0'+
 prefix-char := [^special-char] | '\' special-char
 suffix-char := [^special-char] | '\' special-char
 special-char := ';' | '0' | '#' | '\'
 
Deprecated:
To be removed after 2002-sep-30.

Transliterator* HexToUnicodeTransliterator::clone void    const [virtual]
 

Transliterator API.

Deprecated:
To be removed after 2002-sep-30.

Reimplemented from Transliterator.

virtual UClassID HexToUnicodeTransliterator::getDynamicClassID void    const [inline, virtual]
 

ICU "poor man's RTTI", returns a UClassID for the actual class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented from Transliterator.

Definition at line 172 of file hextouni.h.

UClassID HexToUnicodeTransliterator::getStaticClassID void    [inline, static]
 

ICU "poor man's RTTI", returns a UClassID for this class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented from Transliterator.

Definition at line 179 of file hextouni.h.

virtual void HexToUnicodeTransliterator::handleTransliterate Replaceable   text,
UTransPosition   offset,
UBool    isIncremental
const [virtual]
 

Implements Transliterator::handleTransliterate.

Deprecated:
To be removed after 2002-sep-30.

Reimplemented from Transliterator.

HexToUnicodeTransliterator& HexToUnicodeTransliterator::operator= const HexToUnicodeTransliterator &   
 

Assignment operator.

Deprecated:
To be removed after 2002-sep-30.

const UnicodeString& HexToUnicodeTransliterator::toPattern void    const
 

Return this transliterator's pattern.

Deprecated:
To be removed after 2002-sep-30.


Member Data Documentation

const UChar HexToUnicodeTransliterator::DEFAULT_PATTERN[] [static, private]
 

The pattern used by the default constructor.

Definition at line 41 of file hextouni.h.

const char HexToUnicodeTransliterator::_ID[] [static, private]
 

ID for this transliterator.

Definition at line 36 of file hextouni.h.

int32_t HexToUnicodeTransliterator::affixCount [private]
 

The number of different affix sets in affixes.

Definition at line 65 of file hextouni.h.

UnicodeString HexToUnicodeTransliterator::affixes [private]
 

The processed pattern specification.

See applyPattern() for details.

Definition at line 60 of file hextouni.h.

const char HexToUnicodeTransliterator::fgClassID [static, private]
 

The address of this static class variable serves as this class's ID for ICU "poor man's RTTI".

Reimplemented from Transliterator.

Definition at line 71 of file hextouni.h.

UnicodeString HexToUnicodeTransliterator::pattern [private]
 

The pattern for this transliterator.

Definition at line 54 of file hextouni.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 15 14:14:00 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001