]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/titletrn.h
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / i18n / titletrn.h
CommitLineData
b75a7d8f
A
1/*
2**********************************************************************
374ca955 3* Copyright (C) 2001-2004, International Business Machines
b75a7d8f
A
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
12
13#include "unicode/utypes.h"
14
15#if !UCONFIG_NO_TRANSLITERATION
16
17#include "unicode/translit.h"
18#include "unicode/locid.h"
374ca955
A
19#include "ucase.h"
20#include "casetrn.h"
b75a7d8f
A
21
22U_NAMESPACE_BEGIN
23
24/**
25 * A transliterator that converts all letters (as defined by
26 * <code>UCharacter.isLetter()</code>) to lower case, except for those
27 * letters preceded by non-letters. The latter are converted to title
28 * case using <code>u_totitle()</code>.
29 * @author Alan Liu
30 */
374ca955 31class U_I18N_API TitlecaseTransliterator : public CaseMapTransliterator {
b75a7d8f
A
32 public:
33
34 /**
35 * Constructs a transliterator.
36 * @param loc the given locale.
37 */
38 TitlecaseTransliterator(const Locale& loc = Locale::getDefault());
39
40 /**
41 * Destructor.
42 */
43 virtual ~TitlecaseTransliterator();
44
45 /**
46 * Copy constructor.
47 */
48 TitlecaseTransliterator(const TitlecaseTransliterator&);
49
50 /**
51 * Assignment operator.
52 */
53 TitlecaseTransliterator& operator=(const TitlecaseTransliterator&);
54
55 /**
56 * Transliterator API.
57 * @return a copy of the object.
58 */
374ca955 59 virtual Transliterator* clone(void) const;
b75a7d8f
A
60
61 /**
62 * ICU "poor man's RTTI", returns a UClassID for the actual class.
63 *
64 * @draft ICU 2.2
65 */
374ca955 66 virtual UClassID getDynamicClassID() const;
b75a7d8f
A
67
68 /**
69 * ICU "poor man's RTTI", returns a UClassID for this class.
70 *
71 * @draft ICU 2.2
72 */
374ca955 73 static UClassID U_EXPORT2 getStaticClassID();
b75a7d8f
A
74
75 protected:
76
77 /**
78 * Implements {@link Transliterator#handleTransliterate}.
79 * @param text the buffer holding transliterated and
80 * untransliterated text
81 * @param offset the start and limit of the text, the position
82 * of the cursor, and the start and limit of transliteration.
83 * @param incremental if true, assume more text may be coming after
84 * pos.contextLimit. Otherwise, assume the text is complete.
85 */
374ca955 86 virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
b75a7d8f 87 UBool isIncremental) const;
b75a7d8f
A
88};
89
90U_NAMESPACE_END
91
92#endif /* #if !UCONFIG_NO_TRANSLITERATION */
93
94#endif