bmsearch.h

Go to the documentation of this file.
00001 /*
00002  ******************************************************************************
00003  *   Copyright (C) 1996-2009, 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
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 
00203     /*
00204      * UObject glue...
00205      */
00206     virtual UClassID getDynamicClassID() const;
00207     static UClassID getStaticClassID();
00208     
00209 private:
00210     CollData *data;
00211     CEList *patCEs;
00212     BadCharacterTable *badCharacterTable;
00213     GoodSuffixTable   *goodSuffixTable;
00214     UnicodeString pattern;
00215     Target *target;
00216 };
00217 
00218 U_NAMESPACE_END
00219 
00220 #endif // #if !UCONFIG_NO_COLLATION
00221 #endif // #ifndef B_M_SEARCH_H

Generated on Sun Aug 22 15:43:57 2010 for ICU 4.0.1 by  doxygen 1.3.9.1