Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

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

Public Member Functions

 HexToUnicodeTransliterator (UnicodeFilter *adoptedFilter=0)
 Constructs a transliterator that recognizes the standard prefixes "&#92;u", "&#92;U", "u+", and "U+", each with no suffix.
 HexToUnicodeTransliterator (const UnicodeString &pattern, UErrorCode &status)
 Constructs a custom transliterator with the given pattern.
 HexToUnicodeTransliterator (const UnicodeString &pattern, UnicodeFilter *adoptedFilter, UErrorCode &status)
 Constructs a custom transliterator with the given pattern and filter.
virtual ~HexToUnicodeTransliterator ()
 Destructor.
 HexToUnicodeTransliterator (const HexToUnicodeTransliterator &)
 Copy constructor.
HexToUnicodeTransliteratoroperator= (const HexToUnicodeTransliterator &)
 Assignment operator.
Transliteratorclone (void) const
 Transliterator API.
void applyPattern (const UnicodeString &thePattern, UErrorCode &status)
 Set the patterns recognized by this transliterator.
const UnicodeStringtoPattern (void) const
 Return this transliterator's pattern.
virtual void handleTransliterate (Replaceable &text, UTransPosition &offset, UBool isIncremental) const
 Implements Transliterator#handleTransliterate.

Detailed Description

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

For example, "U+0040" and ''. 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.


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.

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 void HexToUnicodeTransliterator::handleTransliterate Replaceable text,
UTransPosition offset,
UBool  isIncremental
const [virtual]
 

Implements Transliterator#handleTransliterate.

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

Implements 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.


The documentation for this class was generated from the following file:
Generated on Tue Jul 26 18:11:59 2005 for ICU 2.1 by  doxygen 1.4.3-20050530