00001
00002
00003
00004
00005
00006
00007
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 {
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
00167
00168 #endif