1 | // © 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html |
3 | /* |
4 | ********************************************************************** |
5 | * Copyright (c) 2001-2007, International Business Machines |
6 | * Corporation and others. All Rights Reserved. |
7 | ********************************************************************** |
8 | * Date Name Description |
9 | * 04/02/2001 aliu Creation. |
10 | ********************************************************************** |
11 | */ |
12 | #ifndef REMTRANS_H |
13 | #define REMTRANS_H |
14 | |
15 | #include "unicode/utypes.h" |
16 | |
17 | #if !UCONFIG_NO_TRANSLITERATION |
18 | |
19 | #include "unicode/translit.h" |
20 | |
21 | U_NAMESPACE_BEGIN |
22 | |
23 | /** |
24 | * A transliterator that removes text. |
25 | * @author Alan Liu |
26 | */ |
27 | class RemoveTransliterator : public Transliterator { |
28 | |
29 | public: |
30 | |
31 | /** |
32 | * Constructs a transliterator. |
33 | */ |
34 | RemoveTransliterator(); |
35 | |
36 | /** |
37 | * Destructor. |
38 | */ |
39 | virtual ~RemoveTransliterator(); |
40 | |
41 | /** |
42 | * System registration hook. |
43 | */ |
44 | static void registerIDs(); |
45 | |
46 | /** |
47 | * Transliterator API. |
48 | * @return A copy of the object. |
49 | */ |
50 | virtual RemoveTransliterator* clone() const; |
51 | |
52 | /** |
53 | * Implements {@link Transliterator#handleTransliterate}. |
54 | * @param text the buffer holding transliterated and |
55 | * untransliterated text |
56 | * @param offset the start and limit of the text, the position |
57 | * of the cursor, and the start and limit of transliteration. |
58 | * @param incremental if true, assume more text may be coming after |
59 | * pos.contextLimit. Otherwise, assume the text is complete. |
60 | */ |
61 | virtual void handleTransliterate(Replaceable& text, UTransPosition& offset, |
62 | UBool isIncremental) const; |
63 | |
64 | /** |
65 | * ICU "poor man's RTTI", returns a UClassID for the actual class. |
66 | */ |
67 | virtual UClassID getDynamicClassID() const; |
68 | |
69 | /** |
70 | * ICU "poor man's RTTI", returns a UClassID for this class. |
71 | */ |
72 | U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); |
73 | |
74 | }; |
75 | |
76 | U_NAMESPACE_END |
77 | |
78 | #endif /* #if !UCONFIG_NO_TRANSLITERATION */ |
79 | |
80 | #endif |
81 | |