intl/icu/source/i18n/titletrn.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

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

mercurial