00001 /* 00002 * Copyright (C) 1999, International Business Machines Corporation and others. All Rights Reserved. 00003 ********************************************************************** 00004 * Date Name Description 00005 * 11/17/99 aliu Creation. 00006 ********************************************************************** 00007 */ 00008 #ifndef UNIFILT_H 00009 #define UNIFILT_H 00010 00011 #include "unicode/unifunct.h" 00012 #include "unicode/unimatch.h" 00013 00014 U_NAMESPACE_BEGIN 00015 00041 class U_I18N_API UnicodeFilter : public UnicodeFunctor, public UnicodeMatcher { 00042 00043 public: 00048 virtual ~UnicodeFilter(); 00049 00057 virtual UBool contains(UChar32 c) const = 0; 00058 00063 virtual UnicodeMatcher* toMatcher() const; 00064 00068 UnicodeString& toPattern(UnicodeString& result, 00069 UBool escapeUnprintable) const; 00070 00074 UBool matchesIndexValue(uint8_t v) const; 00075 00079 virtual UMatchDegree matches(const Replaceable& text, 00080 int32_t& offset, 00081 int32_t limit, 00082 UBool incremental); 00083 00084 protected: 00085 00086 UnicodeFilter(); 00087 }; 00088 00089 inline UnicodeFilter::UnicodeFilter() {} 00090 inline UnicodeFilter::~UnicodeFilter() {} 00091 00092 U_NAMESPACE_END 00093 00094 #endif