2 **********************************************************************
3 * Copyright (C) 2001-2010, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * Date Name Description
7 * 07/03/01 aliu Creation.
8 **********************************************************************
13 #include "unicode/utypes.h"
15 #if !UCONFIG_NO_TRANSLITERATION
17 #include "unicode/translit.h"
18 #include "unicode/normalizer2.h"
23 * A transliterator that performs normalization.
26 class NormalizationTransliterator
: public Transliterator
{
27 const Normalizer2
&fNorm2
;
34 virtual ~NormalizationTransliterator();
39 NormalizationTransliterator(const NormalizationTransliterator
&);
43 * @return A copy of the object.
45 virtual Transliterator
* clone(void) const;
48 * ICU "poor man's RTTI", returns a UClassID for the actual class.
50 virtual UClassID
getDynamicClassID() const;
53 * ICU "poor man's RTTI", returns a UClassID for this class.
55 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
60 * Implements {@link Transliterator#handleTransliterate}.
61 * @param text the buffer holding transliterated and
62 * untransliterated text
63 * @param offset the start and limit of the text, the position
64 * of the cursor, and the start and limit of transliteration.
65 * @param incremental if true, assume more text may be coming after
66 * pos.contextLimit. Otherwise, assume the text is complete.
68 virtual void handleTransliterate(Replaceable
& text
, UTransPosition
& offset
,
69 UBool isIncremental
) const;
73 * System registration hook. Public to Transliterator only.
75 static void registerIDs();
79 // Transliterator::Factory methods
80 static Transliterator
* _create(const UnicodeString
& ID
,
84 * Constructs a transliterator. This method is private.
85 * Public users must use the factory method createInstance().
87 NormalizationTransliterator(const UnicodeString
& id
, const Normalizer2
&norm2
);
91 * Assignment operator.
93 NormalizationTransliterator
& operator=(const NormalizationTransliterator
&);
98 #endif /* #if !UCONFIG_NO_TRANSLITERATION */