+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (C) 2001, International Business Machines
+* Copyright (C) 2001-2007, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
#if !UCONFIG_NO_TRANSLITERATION
#include "unicode/translit.h"
+#include "unicode/uniset.h"
U_NAMESPACE_BEGIN
* It recognizes the Perl syntax \N{name}.
* @author Alan Liu
*/
-class U_I18N_API NameUnicodeTransliterator : public Transliterator {
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
-
- public:
+class NameUnicodeTransliterator : public Transliterator {
+public:
/**
* Constructs a transliterator.
*/
NameUnicodeTransliterator(const NameUnicodeTransliterator&);
- /**
- * Assignment operator.
- */
- NameUnicodeTransliterator& operator=(const NameUnicodeTransliterator&);
-
/**
* Transliterator API.
* @return A copy of the object.
*/
- Transliterator* clone(void) const;
+ virtual Transliterator* clone(void) const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
- *
- * @draft ICU 2.2
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
- *
- * @draft ICU 2.2
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
protected:
virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
UBool isIncremental) const;
- private:
-
- static const char _ID[];
+ /**
+ * Set of characters which occur in Unicode character names.
+ */
+ UnicodeSet legal;
+private:
+ /**
+ * Assignment operator.
+ */
+ NameUnicodeTransliterator& operator=(const NameUnicodeTransliterator&);
};
U_NAMESPACE_END