2 *******************************************************************************
4 * Copyright (C) 2001-2005, 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"
31 typedef int32_t U_CALLCONV
32 UCaseMapFull(const UCaseProps
*csp
, UChar32 c
,
33 UCaseContextIterator
*iter
, void *context
,
34 const UChar
**pString
,
35 const char *locale
, int32_t *locCache
);
42 * A transliterator that performs locale-sensitive
45 class U_I18N_API CaseMapTransliterator
: public Transliterator
{
48 * Constructs a transliterator.
49 * @param loc the given locale.
50 * @param id the transliterator ID.
51 * @param map the full case mapping function (see ucase.h)
53 CaseMapTransliterator(const UnicodeString
&id
, UCaseMapFull
*map
);
58 virtual ~CaseMapTransliterator();
63 CaseMapTransliterator(const CaseMapTransliterator
&);
66 * Assignment operator.
68 CaseMapTransliterator
& operator=(const CaseMapTransliterator
&);
72 * @return a copy of the object.
74 virtual Transliterator
* clone(void) const;
77 * ICU "poor man's RTTI", returns a UClassID for the actual class.
79 virtual UClassID
getDynamicClassID() const;
82 * ICU "poor man's RTTI", returns a UClassID for this class.
84 static UClassID U_EXPORT2
getStaticClassID();
88 * Implements {@link Transliterator#handleTransliterate}.
89 * @param text the buffer holding transliterated and
90 * untransliterated text
91 * @param offset the start and limit of the text, the position
92 * of the cursor, and the start and limit of transliteration.
93 * @param incremental if true, assume more text may be coming after
94 * pos.contextLimit. Otherwise, assume the text is complete.
96 virtual void handleTransliterate(Replaceable
& text
,
97 UTransPosition
& offsets
,
98 UBool isIncremental
) const;
100 const UCaseProps
*fCsp
;
106 /** case context iterator using a Replaceable. This must be a C function because it is a callback. */
107 U_CFUNC UChar32 U_CALLCONV
108 utrans_rep_caseContextIterator(void *context
, int8_t dir
);
110 #endif /* #if !UCONFIG_NO_TRANSLITERATION */