Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

unimatch.h

00001 /*
00002 * Copyright (C) 2001-2003, International Business Machines Corporation and others. All Rights Reserved.
00003 **********************************************************************
00004 *   Date        Name        Description
00005 *   07/18/01    aliu        Creation.
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 class UnicodeSet;
00018 
00024 enum UMatchDegree {
00032     U_MISMATCH,
00033     
00044     U_PARTIAL_MATCH,
00045     
00054     U_MATCH
00055 };
00056 
00062 class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ {
00063 
00064 public:
00069     virtual ~UnicodeMatcher();
00070 
00117     virtual UMatchDegree matches(const Replaceable& text,
00118                                  int32_t& offset,
00119                                  int32_t limit,
00120                                  UBool incremental) = 0;
00121 
00134     virtual UnicodeString& toPattern(UnicodeString& result,
00135                                      UBool escapeUnprintable = FALSE) const = 0;
00136 
00144     virtual UBool matchesIndexValue(uint8_t v) const = 0;
00145 
00152     virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0;
00153 };
00154 
00155 U_NAMESPACE_END
00156 
00157 #endif

Generated on Tue Oct 26 18:11:09 2004 for ICU 2.8 by  doxygen 1.3.9.1