ICU 4.8.1.1  4.8.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bmsearch.h
Go to the documentation of this file.
1 /*
2  ******************************************************************************
3  * Copyright (C) 1996-2010, 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 
108 {
109 public:
125  BoyerMooreSearch(CollData *theData, const UnicodeString &patternString, const UnicodeString *targetString, UErrorCode &status);
126 
132  ~BoyerMooreSearch();
133 
141  UBool empty();
142 
154  UBool search(int32_t offset, int32_t &start, int32_t &end);
155 
164  void setTargetString(const UnicodeString *targetString, UErrorCode &status);
165 
166  // **** no longer need these? ****
174  CollData *getData();
175 
183  CEList *getPatternCEs();
184 
192  BadCharacterTable *getBadCharacterTable();
193 
201  GoodSuffixTable *getGoodSuffixTable();
202 
207  virtual UClassID getDynamicClassID() const;
212  static UClassID getStaticClassID();
213 
214 private:
215  CollData *data;
216  CEList *patCEs;
217  BadCharacterTable *badCharacterTable;
218  GoodSuffixTable *goodSuffixTable;
219  UnicodeString pattern;
220  Target *target;
221 };
222 
224 
225 #endif // #if !UCONFIG_NO_COLLATION
226 #endif // #ifndef B_M_SEARCH_H