1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (C) 2001-2010, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * Date Name Description
9 * 07/03/01 aliu Creation.
10 **********************************************************************
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_TRANSLITERATION
19 #include "unicode/translit.h"
20 #include "unicode/normalizer2.h"
25 * A transliterator that performs normalization.
28 class NormalizationTransliterator
: public Transliterator
{
29 const Normalizer2
&fNorm2
;
36 virtual ~NormalizationTransliterator();
41 NormalizationTransliterator(const NormalizationTransliterator
&);
45 * @return A copy of the object.
47 virtual Transliterator
* clone(void) const;
50 * ICU "poor man's RTTI", returns a UClassID for the actual class.
52 virtual UClassID
getDynamicClassID() const;
55 * ICU "poor man's RTTI", returns a UClassID for this class.
57 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
62 * Implements {@link Transliterator#handleTransliterate}.
63 * @param text the buffer holding transliterated and
64 * untransliterated text
65 * @param offset the start and limit of the text, the position
66 * of the cursor, and the start and limit of transliteration.
67 * @param incremental if true, assume more text may be coming after
68 * pos.contextLimit. Otherwise, assume the text is complete.
70 virtual void handleTransliterate(Replaceable
& text
, UTransPosition
& offset
,
71 UBool isIncremental
) const;
75 * System registration hook. Public to Transliterator only.
77 static void registerIDs();
81 // Transliterator::Factory methods
82 static Transliterator
* _create(const UnicodeString
& ID
,
86 * Constructs a transliterator. This method is private.
87 * Public users must use the factory method createInstance().
89 NormalizationTransliterator(const UnicodeString
& id
, const Normalizer2
&norm2
);
93 * Assignment operator.
95 NormalizationTransliterator
& operator=(const NormalizationTransliterator
&);
100 #endif /* #if !UCONFIG_NO_TRANSLITERATION */