00001 /* 00002 * Copyright (C) 1999-2003, International Business Machines Corporation and others. 00003 * All Rights Reserved. 00004 ********************************************************************** 00005 * Date Name Description 00006 * 11/17/99 aliu Creation. 00007 ********************************************************************** 00008 */ 00009 #ifndef UNIFILT_H 00010 #define UNIFILT_H 00011 00012 #include "unicode/unifunct.h" 00013 #include "unicode/unimatch.h" 00014 00015 U_NAMESPACE_BEGIN 00016 00024 #define U_ETHER ((UChar)0xFFFF) 00025 00051 class U_COMMON_API UnicodeFilter : public UnicodeFunctor, public UnicodeMatcher { 00052 00053 public: 00058 virtual ~UnicodeFilter(); 00059 00067 virtual UBool contains(UChar32 c) const = 0; 00068 00074 virtual UnicodeMatcher* toMatcher() const; 00075 00080 virtual UMatchDegree matches(const Replaceable& text, 00081 int32_t& offset, 00082 int32_t limit, 00083 UBool incremental); 00084 00089 virtual void setData(const TransliterationRuleData*); 00090 00096 virtual UClassID getDynamicClassID() const = 0; 00097 00098 /* 00099 * ICU "poor man's RTTI", returns a UClassID for this class. 00100 * 00101 * @stable ICU 2.2 00102 */ 00103 /* static UClassID getStaticClassID() { return (UClassID)&fgClassID; }*/ 00104 00105 protected: 00106 00107 /* 00108 * Since this class has pure virtual functions, 00109 * a constructor can't be used. 00110 * @stable ICU 2.0 00111 */ 00112 /* UnicodeFilter();*/ 00113 00114 private: 00115 00116 /* 00117 * The address of this static class variable serves as this class's ID 00118 * for ICU "poor man's RTTI". 00119 */ 00120 /* static const char fgClassID;*/ 00121 }; 00122 00123 /*inline UnicodeFilter::UnicodeFilter() {}*/ 00124 00125 U_NAMESPACE_END 00126 00127 #endif