Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

brkdict.h

Go to the documentation of this file.
00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1999-2000 IBM and others. All rights reserved.
00004 **********************************************************************
00005 *   Date        Name        Description
00006 *   12/1/99     rtg         Ported from Java
00007 *   01/13/2000  helena      Added UErrorCode to ctors.
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     // data members
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     // deserialization
00096     //=================================================================================
00097 
00098 public:
00103     BreakDictionary(char* dictionaryFilename, UErrorCode& status);
00104 
00108     ~BreakDictionary();
00109 
00114     void readDictionaryFile(UMemoryStream* in);
00115 
00116     //=================================================================================
00117     // access to the words
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     // the following methods are never meant to be called and so are not defined
00158     // (if you don't declare them, you get default implementations)
00159     BreakDictionary(const BreakDictionary& that);
00160     BreakDictionary& operator=(const BreakDictionary& that);
00161 };
00162 
00163 
00164 #endif

Generated at Tue Dec 5 17:55:24 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000