1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (C) 2001-2007, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * Date Name Description
9 * 06/07/01 aliu Creation.
10 **********************************************************************
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_TRANSLITERATION
19 #include "unicode/translit.h"
20 #include "unicode/uniset.h"
25 * A transliterator that performs name to character mapping.
26 * It recognizes the Perl syntax \N{name}.
29 class NameUnicodeTransliterator
: public Transliterator
{
33 * Constructs a transliterator.
34 * @param adoptedFilter the filter for this transliterator.
36 NameUnicodeTransliterator(UnicodeFilter
* adoptedFilter
= 0);
41 virtual ~NameUnicodeTransliterator();
46 NameUnicodeTransliterator(const NameUnicodeTransliterator
&);
50 * @return A copy of the object.
52 virtual NameUnicodeTransliterator
* clone() const;
55 * ICU "poor man's RTTI", returns a UClassID for the actual class.
57 virtual UClassID
getDynamicClassID() const;
60 * ICU "poor man's RTTI", returns a UClassID for this class.
62 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
67 * Implements {@link Transliterator#handleTransliterate}.
68 * @param text the buffer holding transliterated and
69 * untransliterated text
70 * @param offset the start and limit of the text, the position
71 * of the cursor, and the start and limit of transliteration.
72 * @param incremental if true, assume more text may be coming after
73 * pos.contextLimit. Otherwise, assume the text is complete.
75 virtual void handleTransliterate(Replaceable
& text
, UTransPosition
& offset
,
76 UBool isIncremental
) const;
79 * Set of characters which occur in Unicode character names.
84 * Assignment operator.
86 NameUnicodeTransliterator
& operator=(const NameUnicodeTransliterator
&);
91 #endif /* #if !UCONFIG_NO_TRANSLITERATION */