2 *******************************************************************************
4 * Copyright (C) 2001-2008, 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"
32 * A transliterator that performs locale-sensitive
35 class CaseMapTransliterator
: public Transliterator
{
38 * Constructs a transliterator.
39 * @param loc the given locale.
40 * @param id the transliterator ID.
41 * @param map the full case mapping function (see ucase.h)
43 CaseMapTransliterator(const UnicodeString
&id
, UCaseMapFull
*map
);
48 virtual ~CaseMapTransliterator();
53 CaseMapTransliterator(const CaseMapTransliterator
&);
57 * @return a copy of the object.
59 virtual Transliterator
* clone(void) const = 0;
62 * ICU "poor man's RTTI", returns a UClassID for the actual class.
64 //virtual UClassID getDynamicClassID() const;
67 * ICU "poor man's RTTI", returns a UClassID for this class.
69 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
73 * Implements {@link Transliterator#handleTransliterate}.
74 * @param text the buffer holding transliterated and
75 * untransliterated text
76 * @param offset the start and limit of the text, the position
77 * of the cursor, and the start and limit of transliteration.
78 * @param incremental if true, assume more text may be coming after
79 * pos.contextLimit. Otherwise, assume the text is complete.
81 virtual void handleTransliterate(Replaceable
& text
,
82 UTransPosition
& offsets
,
83 UBool isIncremental
) const;
85 const UCaseProps
*fCsp
;
90 * Assignment operator.
92 CaseMapTransliterator
& operator=(const CaseMapTransliterator
&);
98 /** case context iterator using a Replaceable. This must be a C function because it is a callback. */
99 U_CFUNC UChar32 U_CALLCONV
100 utrans_rep_caseContextIterator(void *context
, int8_t dir
);
102 #endif /* #if !UCONFIG_NO_TRANSLITERATION */