00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef BRKDICT_H
00012 #define BRKDICT_H
00013
00014 #include "ucmp8.h"
00015 #include "umemstrm.h"
00016
00028 class BreakDictionary {
00029
00030
00031
00032 private:
00033
00038 CompactByteArray* columnMap;
00039
00043 int32_t numCols;
00044
00050 int32_t numColGroups;
00051
00063 int16_t* table;
00064
00068 int16_t* rowIndex;
00069
00076 int32_t* rowIndexFlags;
00077
00086 int16_t* rowIndexFlagsIndex;
00087
00092 int8_t* rowIndexShifts;
00093
00094
00095
00096
00097
00098 public:
00103 BreakDictionary(char* dictionaryFilename, UErrorCode& status);
00104
00108 ~BreakDictionary();
00109
00114 void readDictionaryFile(UMemoryStream* in);
00115
00116
00117
00118
00119
00127 int16_t at(int32_t row, UChar ch) const;
00128
00140 int16_t at(int32_t row, int32_t col) const;
00141
00142 private:
00147 UBool cellIsPopulated(int32_t row, int32_t col) const;
00148
00155 int16_t internalAt(int32_t row, int32_t col) const;
00156
00157
00158
00159 BreakDictionary(const BreakDictionary& that);
00160 BreakDictionary& operator=(const BreakDictionary& that);
00161 };
00162
00163
00164 #endif