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 00021 U_NAMESPACE_BEGIN 00022 00023 class Replaceable; 00024 class UnicodeString; 00025 class UnicodeSet; 00026 00032 enum UMatchDegree { 00040 U_MISMATCH, 00041 00052 U_PARTIAL_MATCH, 00053 00062 U_MATCH 00063 }; 00064 00070 class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ { 00071 00072 public: 00077 virtual ~UnicodeMatcher(); 00078 00125 virtual UMatchDegree matches(const Replaceable& text, 00126 int32_t& offset, 00127 int32_t limit, 00128 UBool incremental) = 0; 00129 00142 virtual UnicodeString& toPattern(UnicodeString& result, 00143 UBool escapeUnprintable = FALSE) const = 0; 00144 00152 virtual UBool matchesIndexValue(uint8_t v) const = 0; 00153 00160 virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0; 00161 }; 00162 00163 U_NAMESPACE_END 00164 00165 #endif
1.6.1