- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Search for |

- File List
- Globals

# 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
    00206     virtual UClassID getDynamicClassID() const;
    00210     static UClassID getStaticClassID();
    00211
    00212 private:
    00213     CollData *data;
    00214     CEList *patCEs;
    00215     BadCharacterTable *badCharacterTable;
    00216     GoodSuffixTable   *goodSuffixTable;
    00217     UnicodeString pattern;
    00218     Target *target;
    00219 };
    00220
    00221 U_NAMESPACE_END
    00222
    00223 #endif // #if !UCONFIG_NO_COLLATION
    00224 #endif // #ifndef B_M_SEARCH_H