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
C++ API: Collation data used to compute minLengthInChars.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:521
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
C API: Collator.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:188
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:215
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
Definition: utypes.h:385
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:639
This object holds a list of CEs generated from a particular UnicodeString
Definition: colldata.h:66
Basic definitions for ICU, for both C and C++ APIs.
CollData.
Definition: colldata.h:279
BoyerMooreSearch.
Definition: bmsearch.h:107
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
int8_t UBool
The ICU boolean type.
Definition: umachine.h:228