+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (C) 2001-2004, International Business Machines
+* Copyright (C) 2001-2010, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
#if !UCONFIG_NO_TRANSLITERATION
#include "unicode/translit.h"
-#include "unicode/normlzr.h"
+#include "unicode/normalizer2.h"
U_NAMESPACE_BEGIN
* A transliterator that performs normalization.
* @author Alan Liu
*/
-class U_I18N_API NormalizationTransliterator : public Transliterator {
-
- /**
- * The normalization mode of this transliterator.
- */
- UNormalizationMode fMode;
-
- /**
- * Normalization options for this transliterator.
- */
- int32_t options;
+class NormalizationTransliterator : public Transliterator {
+ const Normalizer2 &fNorm2;
public:
*/
NormalizationTransliterator(const NormalizationTransliterator&);
- /**
- * Assignment operator.
- */
- NormalizationTransliterator& operator=(const NormalizationTransliterator&);
-
/**
* Transliterator API.
* @return A copy of the object.
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
- *
- * @draft ICU 2.2
*/
virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
- *
- * @draft ICU 2.2
*/
- static UClassID U_EXPORT2 getStaticClassID();
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
protected:
* @param incremental if true, assume more text may be coming after
* pos.contextLimit. Otherwise, assume the text is complete.
*/
- void handleTransliterate(Replaceable& text, UTransPosition& offset,
+ virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
UBool isIncremental) const;
public:
* Constructs a transliterator. This method is private.
* Public users must use the factory method createInstance().
*/
- NormalizationTransliterator(const UnicodeString& id,
- UNormalizationMode mode, int32_t opt);
+ NormalizationTransliterator(const UnicodeString& id, const Normalizer2 &norm2);
+
+private:
+ /**
+ * Assignment operator.
+ */
+ NormalizationTransliterator& operator=(const NormalizationTransliterator&);
};
U_NAMESPACE_END