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

UnicodeToHexTransliterator Class Reference

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

#include <unitohex.h>

Class diagram for UnicodeToHexTransliterator:

Transliterator

List of all members.


Public Members

 UnicodeToHexTransliterator (const UnicodeString& hexPrefix, bool_t isUppercase, UnicodeFilter* adoptedFilter = 0)
Constructs a transliterator. More...

 UnicodeToHexTransliterator (UnicodeFilter* adoptedFilter = 0)
Constructs a transliterator with the default prefix "\u" that outputs uppercase hex digits. More...

virtual ~UnicodeToHexTransliterator ()
Destructor. More...

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

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

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

virtual const UnicodeStringgetPrefix (void) const
Returns the string that precedes the four hex digits. More...

virtual void setPrefix (const UnicodeString& prefix)
Sets the string that precedes the four hex digits. More...

virtual bool_t isUppercase (void) const
Returns true if this transliterator outputs uppercase hex digits. More...

virtual void setUppercase (bool_t outputUppercase)
Sets if this transliterator outputs uppercase hex digits. More...

virtual void handleTransliterate (Replaceable& text, Position& offsets, bool_t isIncremental) const
Implements. More...


Detailed Description

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

It outputs a prefix specified in the constructor and optionally converts the hex digits to uppercase.

Author(s):
Alan Liu

Member Function Documentation

UnicodeToHexTransliterator::UnicodeToHexTransliterator (const UnicodeString & hexPrefix, bool_t isUppercase, UnicodeFilter * adoptedFilter = 0)

Constructs a transliterator.

Parameters:
prefix   the string that will precede the four hex digits for UNICODE_HEX transliterators. Ignored if direction is HEX_UNICODE.
uppercase   if true, the four hex digits will be converted to uppercase; otherwise they will be lowercase. Ignored if direction is HEX_UNICODE.
Stable:

UnicodeToHexTransliterator::UnicodeToHexTransliterator (UnicodeFilter * adoptedFilter = 0)

Constructs a transliterator with the default prefix "\u" that outputs uppercase hex digits.

Stable:

UnicodeToHexTransliterator::~UnicodeToHexTransliterator () [inline, virtual]

Destructor.

Stable:

UnicodeToHexTransliterator::UnicodeToHexTransliterator (const UnicodeToHexTransliterator &)

Copy constructor.

Stable:

UnicodeToHexTransliterator & UnicodeToHexTransliterator::operator= (const UnicodeToHexTransliterator &)

Assignment operator.

Stable:

virtual Transliterator * UnicodeToHexTransliterator::clone (void) const [virtual]

Transliterator API.

Stable:

Reimplemented from Transliterator.

virtual const UnicodeString & UnicodeToHexTransliterator::getPrefix (void) const [virtual]

Returns the string that precedes the four hex digits.

Returns:
prefix string
Stable:

virtual void UnicodeToHexTransliterator::setPrefix (const UnicodeString & prefix) [virtual]

Sets the string that precedes the four hex digits.

Callers must take care if a transliterator is in use by multiple threads. The prefix should not be changed by one thread while another thread may be transliterating.

Parameters:
prefix   prefix string
Stable:

virtual bool_t UnicodeToHexTransliterator::isUppercase (void) const [virtual]

Returns true if this transliterator outputs uppercase hex digits.

Stable:

virtual void UnicodeToHexTransliterator::setUppercase (bool_t outputUppercase) [virtual]

Sets if this transliterator outputs uppercase hex digits.

Callers must take care if a transliterator is in use by multiple threads. The uppercase mode should not be changed by one thread while another thread may be transliterating.

Parameters:
outputUppercase   if true, then this transliterator outputs uppercase hex digits.
Stable:

virtual void UnicodeToHexTransliterator::handleTransliterate (Replaceable & text, Position & offsets, bool_t isIncremental) const [virtual]

Implements.

Transliterator#handleTransliterate.

Draft:

Reimplemented from Transliterator.


The documentation for this class was generated from the following file:
Generated at Thu Feb 10 15:31:22 2000 for icu by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999