Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

dbbi.h

00001 /* 00002 ********************************************************************** 00003 * Copyright (C) 1999-2003 IBM Corp. All rights reserved. 00004 ********************************************************************** 00005 * Date Name Description 00006 * 12/1/99 rgillam Complete port from Java. 00007 * 01/13/2000 helena Added UErrorCode to ctors. 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 /* forward declaration */ 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 // boilerplate 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 // BreakIterator overrides 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 // implementation 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 * HSYS : Please revisit with Rich, the ctors of the DBBI class is currently 00262 * marked as private. 00263 */ 00264 friend class DictionaryBasedBreakIteratorTables; 00265 friend class BreakIterator; 00266 }; 00267 00268 U_NAMESPACE_END 00269 00270 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ 00271 00272 #endif

Generated on Wed Sep 15 17:18:08 2004 for ICU 2.8 by doxygen 1.3.8