1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
6 * Copyright (C) 2001-2008, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 *******************************************************************************
10 * file name: casetrn.h
12 * tab size: 8 (not used)
15 * created on: 2004sep03
16 * created by: Markus W. Scherer
18 * Implementation class for lower-/upper-/title-casing transliterators.
24 #include "unicode/utypes.h"
26 #if !UCONFIG_NO_TRANSLITERATION
28 #include "unicode/translit.h"
34 * A transliterator that performs locale-sensitive
37 class CaseMapTransliterator
: public Transliterator
{
40 * Constructs a transliterator.
41 * @param loc the given locale.
42 * @param id the transliterator ID.
43 * @param map the full case mapping function (see ucase.h)
45 CaseMapTransliterator(const UnicodeString
&id
, UCaseMapFull
*map
);
50 virtual ~CaseMapTransliterator();
55 CaseMapTransliterator(const CaseMapTransliterator
&);
59 * @return a copy of the object.
61 virtual Transliterator
* clone(void) const = 0;
64 * ICU "poor man's RTTI", returns a UClassID for the actual class.
66 //virtual UClassID getDynamicClassID() const;
69 * ICU "poor man's RTTI", returns a UClassID for this class.
71 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
75 * Implements {@link Transliterator#handleTransliterate}.
76 * @param text the buffer holding transliterated and
77 * untransliterated text
78 * @param offset the start and limit of the text, the position
79 * of the cursor, and the start and limit of transliteration.
80 * @param incremental if true, assume more text may be coming after
81 * pos.contextLimit. Otherwise, assume the text is complete.
83 virtual void handleTransliterate(Replaceable
& text
,
84 UTransPosition
& offsets
,
85 UBool isIncremental
) const;
91 * Assignment operator.
93 CaseMapTransliterator
& operator=(const CaseMapTransliterator
&);
99 /** case context iterator using a Replaceable. This must be a C function because it is a callback. */
100 U_CFUNC UChar32 U_CALLCONV
101 utrans_rep_caseContextIterator(void *context
, int8_t dir
);
103 #endif /* #if !UCONFIG_NO_TRANSLITERATION */