2 **********************************************************************
3 * Copyright (C) 2001-2007, 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/normlzr.h"
23 * A transliterator that performs normalization.
26 class NormalizationTransliterator
: public Transliterator
{
29 * The normalization mode of this transliterator.
31 UNormalizationMode fMode
;
34 * Normalization options for this transliterator.
43 virtual ~NormalizationTransliterator();
48 NormalizationTransliterator(const NormalizationTransliterator
&);
52 * @return A copy of the object.
54 virtual Transliterator
* clone(void) const;
57 * ICU "poor man's RTTI", returns a UClassID for the actual class.
59 virtual UClassID
getDynamicClassID() const;
62 * ICU "poor man's RTTI", returns a UClassID for this class.
64 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
69 * Implements {@link Transliterator#handleTransliterate}.
70 * @param text the buffer holding transliterated and
71 * untransliterated text
72 * @param offset the start and limit of the text, the position
73 * of the cursor, and the start and limit of transliteration.
74 * @param incremental if true, assume more text may be coming after
75 * pos.contextLimit. Otherwise, assume the text is complete.
77 virtual void handleTransliterate(Replaceable
& text
, UTransPosition
& offset
,
78 UBool isIncremental
) const;
82 * System registration hook. Public to Transliterator only.
84 static void registerIDs();
88 // Transliterator::Factory methods
89 static Transliterator
* _create(const UnicodeString
& ID
,
93 * Constructs a transliterator. This method is private.
94 * Public users must use the factory method createInstance().
96 NormalizationTransliterator(const UnicodeString
& id
,
97 UNormalizationMode mode
, int32_t opt
);
101 * Assignment operator.
103 NormalizationTransliterator
& operator=(const NormalizationTransliterator
&);
108 #endif /* #if !UCONFIG_NO_TRANSLITERATION */