2 *******************************************************************************
4 * Copyright (C) 2001-2004, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
10 * tab size: 8 (not used)
13 * created on: 2004sep03
14 * created by: Markus W. Scherer
16 * Implementation class for lower-/upper-/title-casing transliterators.
22 #include "unicode/utypes.h"
24 #if !UCONFIG_NO_TRANSLITERATION
26 #include "unicode/translit.h"
27 #include "unicode/locid.h"
32 typedef int32_t U_CALLCONV
33 UCaseMapFull(const UCaseProps
*csp
, UChar32 c
,
34 UCaseContextIterator
*iter
, void *context
,
35 const UChar
**pString
,
36 const char *locale
, int32_t *locCache
);
43 * A transliterator that performs locale-sensitive
46 class U_I18N_API CaseMapTransliterator
: public Transliterator
{
49 * Constructs a transliterator.
50 * @param loc the given locale.
51 * @param id the transliterator ID.
52 * @param map the full case mapping function (see ucase.h)
54 CaseMapTransliterator(const Locale
&loc
, const UnicodeString
&id
, UCaseMapFull
*map
);
59 virtual ~CaseMapTransliterator();
64 CaseMapTransliterator(const CaseMapTransliterator
&);
67 * Assignment operator.
69 CaseMapTransliterator
& operator=(const CaseMapTransliterator
&);
73 * @return a copy of the object.
75 virtual Transliterator
* clone(void) const;
78 * ICU "poor man's RTTI", returns a UClassID for the actual class.
80 virtual UClassID
getDynamicClassID() const;
83 * ICU "poor man's RTTI", returns a UClassID for this class.
85 static UClassID U_EXPORT2
getStaticClassID();
89 * Implements {@link Transliterator#handleTransliterate}.
90 * @param text the buffer holding transliterated and
91 * untransliterated text
92 * @param offset the start and limit of the text, the position
93 * of the cursor, and the start and limit of transliteration.
94 * @param incremental if true, assume more text may be coming after
95 * pos.contextLimit. Otherwise, assume the text is complete.
97 virtual void handleTransliterate(Replaceable
& text
,
98 UTransPosition
& offsets
,
99 UBool isIncremental
) const;
102 const char *fLocName
;
109 /** case context iterator using a Replaceable. This must be a C function because it is a callback. */
110 U_CFUNC UChar32 U_CALLCONV
111 utrans_rep_caseContextIterator(void *context
, int8_t dir
);
113 #endif /* #if !UCONFIG_NO_TRANSLITERATION */