ICU 49.1.1  49.1.1
bmsearch.h
Go to the documentation of this file.
1 /*
2  ******************************************************************************
3  * Copyright (C) 1996-2011, International Business Machines *
4  * Corporation and others. All Rights Reserved. *
5  ******************************************************************************
6  */
7 
14 #ifndef B_M_SEARCH_H
15 #define B_M_SEARCH_H
16 
17 #include "unicode/utypes.h"
18 
19 #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
20 
21 #include "unicode/uobject.h"
22 #include "unicode/ucol.h"
23 
24 #include "unicode/colldata.h"
25 
27 
28 class BadCharacterTable;
29 class GoodSuffixTable;
30 class Target;
31 
32 #ifndef U_HIDE_INTERNAL_API
33 
109 {
110 public:
126  BoyerMooreSearch(CollData *theData, const UnicodeString &patternString, const UnicodeString *targetString, UErrorCode &status);
127 
133  ~BoyerMooreSearch();
134 
142  UBool empty();
143 
155  UBool search(int32_t offset, int32_t &start, int32_t &end);
156 
165  void setTargetString(const UnicodeString *targetString, UErrorCode &status);
166 
167  // **** no longer need these? ****
175  CollData *getData();
176 
184  CEList *getPatternCEs();
185 
193  BadCharacterTable *getBadCharacterTable();
194 
202  GoodSuffixTable *getGoodSuffixTable();
203 
208  virtual UClassID getDynamicClassID() const;
213  static UClassID getStaticClassID();
214 
215 private:
216  CollData *data;
217  CEList *patCEs;
218  BadCharacterTable *badCharacterTable;
219  GoodSuffixTable *goodSuffixTable;
220  UnicodeString pattern;
221  Target *target;
222 };
223 #endif /* U_HIDE_INTERNAL_API */
224 
226 
227 #endif // #if !UCONFIG_NO_COLLATION
228 #endif // #ifndef B_M_SEARCH_H