00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef DBBI_H
00012
#define DBBI_H
00013
00014
#include "unicode/rbbi.h"
00015
00016
#if !UCONFIG_NO_BREAK_ITERATION
00017
00018
U_NAMESPACE_BEGIN
00019
00020
00021
class DictionaryBasedBreakIteratorTables;
00022
00062 class U_COMMON_API DictionaryBasedBreakIterator :
public RuleBasedBreakIterator {
00063
00064
private:
00065
00072 int32_t* cachedBreakPositions;
00073
00077 int32_t numCachedBreakPositions;
00078
00083 int32_t positionInCache;
00084
00085 DictionaryBasedBreakIteratorTables *fTables;
00086
00100 DictionaryBasedBreakIterator(
UDataMemory* tablesImage,
const char* dictionaryFilename,
UErrorCode& status);
00101
00102
public:
00103
00104
00105
00106
00111
virtual ~DictionaryBasedBreakIterator();
00112
00119 DictionaryBasedBreakIterator();
00120
00127 DictionaryBasedBreakIterator(
const DictionaryBasedBreakIterator &other);
00128
00135 DictionaryBasedBreakIterator& operator=(
const DictionaryBasedBreakIterator& that);
00136
00143
virtual BreakIterator*
clone(
void)
const;
00144
00145
00146
00147
00153
virtual int32_t
previous(
void);
00154
00162
virtual int32_t following(int32_t offset);
00163
00171
virtual int32_t preceding(int32_t offset);
00172
00184
static UClassID getStaticClassID(
void);
00185
00197
virtual UClassID getDynamicClassID(
void)
const;
00198
00199
protected:
00200
00201
00202
00211
virtual int32_t
handleNext(
void);
00212
00218
virtual void reset(
void);
00219
00224
void init();
00225
00240
virtual BreakIterator * createBufferClone(
void *stackBuffer,
00241 int32_t &BufferSize,
00242
UErrorCode &status);
00243
00244
00245
private:
00257
void divideUpDictionaryRange(int32_t startPos, int32_t endPos,
UErrorCode &status);
00258
00259
00260
00261
00262
00263
00264
friend class DictionaryBasedBreakIteratorTables;
00265
friend class BreakIterator;
00266 };
00267
00268
U_NAMESPACE_END
00269
00270
#endif
00271
00272
#endif