Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | ********************************************************************** |
michael@0 | 3 | * Copyright (C) 2001-2007, International Business Machines |
michael@0 | 4 | * Corporation and others. All Rights Reserved. |
michael@0 | 5 | ********************************************************************** |
michael@0 | 6 | * Date Name Description |
michael@0 | 7 | * 05/24/01 aliu Creation. |
michael@0 | 8 | ********************************************************************** |
michael@0 | 9 | */ |
michael@0 | 10 | #ifndef TITLETRN_H |
michael@0 | 11 | #define TITLETRN_H |
michael@0 | 12 | |
michael@0 | 13 | #include "unicode/utypes.h" |
michael@0 | 14 | |
michael@0 | 15 | #if !UCONFIG_NO_TRANSLITERATION |
michael@0 | 16 | |
michael@0 | 17 | #include "unicode/translit.h" |
michael@0 | 18 | #include "ucase.h" |
michael@0 | 19 | #include "casetrn.h" |
michael@0 | 20 | |
michael@0 | 21 | U_NAMESPACE_BEGIN |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * A transliterator that converts all letters (as defined by |
michael@0 | 25 | * <code>UCharacter.isLetter()</code>) to lower case, except for those |
michael@0 | 26 | * letters preceded by non-letters. The latter are converted to title |
michael@0 | 27 | * case using <code>u_totitle()</code>. |
michael@0 | 28 | * @author Alan Liu |
michael@0 | 29 | */ |
michael@0 | 30 | class TitlecaseTransliterator : public CaseMapTransliterator { |
michael@0 | 31 | public: |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Constructs a transliterator. |
michael@0 | 35 | * @param loc the given locale. |
michael@0 | 36 | */ |
michael@0 | 37 | TitlecaseTransliterator(); |
michael@0 | 38 | |
michael@0 | 39 | /** |
michael@0 | 40 | * Destructor. |
michael@0 | 41 | */ |
michael@0 | 42 | virtual ~TitlecaseTransliterator(); |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * Copy constructor. |
michael@0 | 46 | */ |
michael@0 | 47 | TitlecaseTransliterator(const TitlecaseTransliterator&); |
michael@0 | 48 | |
michael@0 | 49 | /** |
michael@0 | 50 | * Transliterator API. |
michael@0 | 51 | * @return a copy of the object. |
michael@0 | 52 | */ |
michael@0 | 53 | virtual Transliterator* clone(void) const; |
michael@0 | 54 | |
michael@0 | 55 | /** |
michael@0 | 56 | * ICU "poor man's RTTI", returns a UClassID for the actual class. |
michael@0 | 57 | */ |
michael@0 | 58 | virtual UClassID getDynamicClassID() const; |
michael@0 | 59 | |
michael@0 | 60 | /** |
michael@0 | 61 | * ICU "poor man's RTTI", returns a UClassID for this class. |
michael@0 | 62 | */ |
michael@0 | 63 | U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); |
michael@0 | 64 | |
michael@0 | 65 | protected: |
michael@0 | 66 | |
michael@0 | 67 | /** |
michael@0 | 68 | * Implements {@link Transliterator#handleTransliterate}. |
michael@0 | 69 | * @param text the buffer holding transliterated and |
michael@0 | 70 | * untransliterated text |
michael@0 | 71 | * @param offset the start and limit of the text, the position |
michael@0 | 72 | * of the cursor, and the start and limit of transliteration. |
michael@0 | 73 | * @param incremental if true, assume more text may be coming after |
michael@0 | 74 | * pos.contextLimit. Otherwise, assume the text is complete. |
michael@0 | 75 | */ |
michael@0 | 76 | virtual void handleTransliterate(Replaceable& text, UTransPosition& offset, |
michael@0 | 77 | UBool isIncremental) const; |
michael@0 | 78 | |
michael@0 | 79 | private: |
michael@0 | 80 | /** |
michael@0 | 81 | * Assignment operator. |
michael@0 | 82 | */ |
michael@0 | 83 | TitlecaseTransliterator& operator=(const TitlecaseTransliterator&); |
michael@0 | 84 | }; |
michael@0 | 85 | |
michael@0 | 86 | U_NAMESPACE_END |
michael@0 | 87 | |
michael@0 | 88 | #endif /* #if !UCONFIG_NO_TRANSLITERATION */ |
michael@0 | 89 | |
michael@0 | 90 | #endif |