ICU 4.8.1.1
4.8.1.1
|
00001 /* 00002 ****************************************************************************** 00003 * Copyright (C) 1996-2010, International Business Machines * 00004 * Corporation and others. All Rights Reserved. * 00005 ****************************************************************************** 00006 */ 00007 00014 #ifndef B_M_SEARCH_H 00015 #define B_M_SEARCH_H 00016 00017 #include "unicode/utypes.h" 00018 00019 #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION 00020 00021 #include "unicode/uobject.h" 00022 #include "unicode/ucol.h" 00023 00024 #include "unicode/colldata.h" 00025 00026 U_NAMESPACE_BEGIN 00027 00028 class BadCharacterTable; 00029 class GoodSuffixTable; 00030 class Target; 00031 00107 class U_I18N_API BoyerMooreSearch : public UObject 00108 { 00109 public: 00125 BoyerMooreSearch(CollData *theData, const UnicodeString &patternString, const UnicodeString *targetString, UErrorCode &status); 00126 00132 ~BoyerMooreSearch(); 00133 00141 UBool empty(); 00142 00154 UBool search(int32_t offset, int32_t &start, int32_t &end); 00155 00164 void setTargetString(const UnicodeString *targetString, UErrorCode &status); 00165 00166 // **** no longer need these? **** 00174 CollData *getData(); 00175 00183 CEList *getPatternCEs(); 00184 00192 BadCharacterTable *getBadCharacterTable(); 00193 00201 GoodSuffixTable *getGoodSuffixTable(); 00202 00207 virtual UClassID getDynamicClassID() const; 00212 static UClassID getStaticClassID(); 00213 00214 private: 00215 CollData *data; 00216 CEList *patCEs; 00217 BadCharacterTable *badCharacterTable; 00218 GoodSuffixTable *goodSuffixTable; 00219 UnicodeString pattern; 00220 Target *target; 00221 }; 00222 00223 U_NAMESPACE_END 00224 00225 #endif // #if !UCONFIG_NO_COLLATION 00226 #endif // #ifndef B_M_SEARCH_H