~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to source/i18n/nortrans.h

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
**********************************************************************
 
3
*   Copyright (C) 2001, International Business Machines
 
4
*   Corporation and others.  All Rights Reserved.
 
5
**********************************************************************
 
6
*   Date        Name        Description
 
7
*   07/03/01    aliu        Creation.
 
8
**********************************************************************
 
9
*/
 
10
#ifndef NORTRANS_H
 
11
#define NORTRANS_H
 
12
 
 
13
#include "unicode/utypes.h"
 
14
#include "unicode/translit.h"
 
15
#include "unicode/normlzr.h"
 
16
 
 
17
U_NAMESPACE_BEGIN
 
18
 
 
19
/**
 
20
 * A transliterator that performs normalization.
 
21
 * @author Alan Liu
 
22
 * @version $RCSfile: nortrans.h,v $ $Revision: 1.2 $ $Date: 2001/12/03 20:50:11 $
 
23
 */
 
24
class U_I18N_API NormalizationTransliterator : public Transliterator {
 
25
 
 
26
    /**
 
27
     * The normalization mode of this transliterator.
 
28
     */
 
29
    UNormalizationMode fMode;
 
30
 
 
31
    /**
 
32
     * Normalization options for this transliterator.
 
33
     */
 
34
    int32_t options;
 
35
 
 
36
    /**
 
37
     * Alias to skippables set.  NOT OWNED.
 
38
     */
 
39
    UnicodeSet* skippable;
 
40
 
 
41
 public:
 
42
 
 
43
    /**
 
44
     * Destructor.
 
45
     */
 
46
    virtual ~NormalizationTransliterator();
 
47
 
 
48
    /**
 
49
     * Copy constructor.
 
50
     */
 
51
    NormalizationTransliterator(const NormalizationTransliterator&);
 
52
 
 
53
    /**
 
54
     * Assignment operator.
 
55
     */
 
56
    NormalizationTransliterator& operator=(const NormalizationTransliterator&);
 
57
 
 
58
    /**
 
59
     * Transliterator API.
 
60
     */
 
61
    Transliterator* clone(void) const;
 
62
 
 
63
 protected:
 
64
 
 
65
    /**
 
66
     * Implements {@link Transliterator#handleTransliterate}.
 
67
     */
 
68
    void handleTransliterate(Replaceable& text, UTransPosition& offset,
 
69
                             UBool isIncremental) const;
 
70
 public:
 
71
 
 
72
    /**
 
73
     * System registration hook.  Public to Transliterator only.
 
74
     */
 
75
    static void registerIDs();
 
76
 
 
77
    /**
 
78
     * Static memory cleanup function.
 
79
     */
 
80
    static void cleanup();
 
81
 
 
82
 private:
 
83
 
 
84
    // Transliterator::Factory methods
 
85
    static Transliterator* _create(const UnicodeString& ID,
 
86
                                   Token context);
 
87
 
 
88
    /**
 
89
     * Constructs a transliterator.  This method is private.
 
90
     * Public users must use the factory method createInstance().
 
91
     */
 
92
    NormalizationTransliterator(const UnicodeString& id,
 
93
                                UNormalizationMode mode, int32_t opt);
 
94
 
 
95
    static void initStatics();
 
96
};
 
97
 
 
98
U_NAMESPACE_END
 
99
 
 
100
#endif