00001
00002
00003
00004
00005
00006
00007
00008 #ifndef UNIMATCH_H
00009 #define UNIMATCH_H
00010
00011 #include "unicode/utypes.h"
00012
00013 U_NAMESPACE_BEGIN
00014
00015 class Replaceable;
00016 class UnicodeString;
00017
00022 enum UMatchDegree {
00029 U_MISMATCH,
00030
00040 U_PARTIAL_MATCH,
00041
00049 U_MATCH
00050 };
00051
00056 class U_I18N_API UnicodeMatcher {
00057
00058 public:
00059
00105 virtual UMatchDegree matches(const Replaceable& text,
00106 int32_t& offset,
00107 int32_t limit,
00108 UBool incremental) = 0;
00109
00121 virtual UnicodeString& toPattern(UnicodeString& result,
00122 UBool escapeUnprintable = FALSE) const = 0;
00123
00130 virtual UBool matchesIndexValue(uint8_t v) const = 0;
00131 };
00132
00133 U_NAMESPACE_END
00134
00135 #endif