ICU 73.2  73.2
unifilt.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 **********************************************************************
00005 * Copyright (C) 1999-2010, International Business Machines Corporation and others.
00006 * All Rights Reserved.
00007 **********************************************************************
00008 *   Date        Name        Description
00009 *   11/17/99    aliu        Creation.
00010 **********************************************************************
00011 */
00012 #ifndef UNIFILT_H
00013 #define UNIFILT_H
00014 
00015 #include "unicode/utypes.h"
00016 
00017 #if U_SHOW_CPLUSPLUS_API
00018 
00019 #include "unicode/unifunct.h"
00020 #include "unicode/unimatch.h"
00021 
00027 U_NAMESPACE_BEGIN
00028 
00037 #define U_ETHER ((char16_t)0xFFFF)
00038 
00065 class U_COMMON_API UnicodeFilter : public UnicodeFunctor, public UnicodeMatcher {
00066 
00067 public:
00072     virtual ~UnicodeFilter();
00073 
00080     virtual UnicodeFilter* clone() const override = 0;
00081 
00089     virtual UBool contains(UChar32 c) const = 0;
00090 
00096     virtual UnicodeMatcher* toMatcher() const override;
00097 
00102     virtual UMatchDegree matches(const Replaceable& text,
00103                                  int32_t& offset,
00104                                  int32_t limit,
00105                                  UBool incremental) override;
00106 
00111     virtual void setData(const TransliterationRuleData*) override;
00112 
00118     static UClassID U_EXPORT2 getStaticClassID();
00119 
00120 protected:
00121 
00122     /*
00123      * Since this class has pure virtual functions,
00124      * a constructor can't be used.
00125      * @stable ICU 2.0
00126      */
00127 /*    UnicodeFilter();*/
00128 };
00129 
00130 /*inline UnicodeFilter::UnicodeFilter() {}*/
00131 
00132 U_NAMESPACE_END
00133 
00134 #endif /* U_SHOW_CPLUSPLUS_API */
00135 
00136 #endif