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