ICU-3668 make getters const

X-SVN-Rev: 14787
This commit is contained in:
Alan Liu 2004-03-27 07:05:32 +00:00
parent 3f63c576e8
commit 3f4f09f5a9
6 changed files with 10 additions and 10 deletions

View File

@ -189,7 +189,7 @@ RBBIDataWrapper *RBBIDataWrapper::addReference() {
// getRuleSourceString
//
//-----------------------------------------------------------------------------
const UnicodeString &RBBIDataWrapper::getRuleSourceString() {
const UnicodeString &RBBIDataWrapper::getRuleSourceString() const {
return fRuleString;
}

View File

@ -144,7 +144,7 @@ public:
void removeReference();
UBool operator ==(const RBBIDataWrapper &other) const;
int32_t hashCode();
const UnicodeString &getRuleSourceString();
const UnicodeString &getRuleSourceString() const;
#ifdef RBBI_DEBUG
void printData();
void printTable(const char *heading, const RBBIStateTable *table);

View File

@ -265,7 +265,7 @@ void RBBISetBuilder::build() {
// getTrieSize() Return the size that will be required to serialize the Trie.
//
//-----------------------------------------------------------------------------------
int32_t RBBISetBuilder::getTrieSize() {
int32_t RBBISetBuilder::getTrieSize() /*const*/ {
fTrieSize = utrie_serialize(fTrie,
NULL, // Buffer
0, // Capacity
@ -339,7 +339,7 @@ void RBBISetBuilder::addValToSets(UVector *sets, uint32_t val) {
// getNumOutputSets
//
//------------------------------------------------------------------------
int32_t RBBISetBuilder::getNumCharCategories() {
int32_t RBBISetBuilder::getNumCharCategories() const {
return fGroupCount + 1;
}
@ -351,7 +351,7 @@ int32_t RBBISetBuilder::getNumCharCategories() {
// the first UChar32 that is in the set of chars
// in the category.
//------------------------------------------------------------------------
UChar32 RBBISetBuilder::getFirstChar(int32_t category) {
UChar32 RBBISetBuilder::getFirstChar(int32_t category) const {
RangeDescriptor *rlRange;
UChar32 retVal = (UChar32)-1;
for (rlRange = fRangeList; rlRange!=0; rlRange=rlRange->fNext) {

View File

@ -80,12 +80,12 @@ public:
void build();
void addValToSets(UVector *sets, uint32_t val);
int32_t getNumCharCategories(); // CharCategories are the same as input symbol set to the
int32_t getNumCharCategories() const; // CharCategories are the same as input symbol set to the
// runtime state machine, which are the same as
// columns in the DFA state table
int32_t getTrieSize(); // Size in bytes of the serialized Trie.
int32_t getTrieSize() /*const*/; // Size in bytes of the serialized Trie.
void serializeTrie(uint8_t *where); // write out the serialized Trie.
UChar32 getFirstChar(int32_t val);
UChar32 getFirstChar(int32_t val) const;
#ifdef RBBI_DEBUG
void printSets();
void printRanges();

View File

@ -887,7 +887,7 @@ void RBBITableBuilder::printPosSets(RBBINode *n) {
// state transition table.
//
//-----------------------------------------------------------------------------
int32_t RBBITableBuilder::getTableSize() {
int32_t RBBITableBuilder::getTableSize() const {
int32_t size = 0;
int32_t numRows;
int32_t numCols;

View File

@ -38,7 +38,7 @@ public:
~RBBITableBuilder();
void build();
int32_t getTableSize(); // Return the runtime size in bytes of
int32_t getTableSize() const; // Return the runtime size in bytes of
// the built state table
void exportTable(void *where); // fill in the runtime state table.
// Sufficient memory must exist at