|
ICU 73.2
73.2
|
00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 * Copyright (C) 2001-2005, International Business Machines Corporation and others. All Rights Reserved. 00005 ********************************************************************** 00006 * Date Name Description 00007 * 07/18/01 aliu Creation. 00008 ********************************************************************** 00009 */ 00010 #ifndef UNIMATCH_H 00011 #define UNIMATCH_H 00012 00013 #include "unicode/utypes.h" 00014 00020 #if U_SHOW_CPLUSPLUS_API 00021 00022 U_NAMESPACE_BEGIN 00023 00024 class Replaceable; 00025 class UnicodeString; 00026 class UnicodeSet; 00027 00033 enum UMatchDegree { 00041 U_MISMATCH, 00042 00053 U_PARTIAL_MATCH, 00054 00063 U_MATCH 00064 }; 00065 00071 class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ { 00072 00073 public: 00078 virtual ~UnicodeMatcher(); 00079 00126 virtual UMatchDegree matches(const Replaceable& text, 00127 int32_t& offset, 00128 int32_t limit, 00129 UBool incremental) = 0; 00130 00143 virtual UnicodeString& toPattern(UnicodeString& result, 00144 UBool escapeUnprintable = false) const = 0; 00145 00153 virtual UBool matchesIndexValue(uint8_t v) const = 0; 00154 00161 virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0; 00162 }; 00163 00164 U_NAMESPACE_END 00165 00166 #endif /* U_SHOW_CPLUSPLUS_API */ 00167 00168 #endif
1.7.6.1