summaryrefslogtreecommitdiffstats
path: root/src/storage/chewing_large_table.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-04-18 11:26:23 +0800
committerPeng Wu <alexepico@gmail.com>2013-04-18 11:26:23 +0800
commitcb827e2511b9557e41acec74a3d6ebcfaed862f8 (patch)
tree1da7c29c8bef4d3f231b5e996fb967678be25fd8 /src/storage/chewing_large_table.h
parent0ee1b6a1b63ae2d55684bd982a95a6a9389f12d2 (diff)
downloadlibpinyin-cb827e2511b9557e41acec74a3d6ebcfaed862f8.tar.gz
libpinyin-cb827e2511b9557e41acec74a3d6ebcfaed862f8.tar.xz
libpinyin-cb827e2511b9557e41acec74a3d6ebcfaed862f8.zip
add const modifiers for chewing table
Diffstat (limited to 'src/storage/chewing_large_table.h')
-rw-r--r--src/storage/chewing_large_table.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/storage/chewing_large_table.h b/src/storage/chewing_large_table.h
index 6ec218f..30ae9aa 100644
--- a/src/storage/chewing_large_table.h
+++ b/src/storage/chewing_large_table.h
@@ -43,16 +43,17 @@ protected:
[CHEWING_NUMBER_OF_FINALS][CHEWING_NUMBER_OF_TONES];
/* search functions */
- int initial_level_search(int phrase_length, /* in */ ChewingKey keys[],
+ int initial_level_search(int phrase_length,
+ /* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const;
int middle_and_final_level_search(ChewingInitial initial,
int phrase_length,
- /* in */ ChewingKey keys[],
+ /* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const;
int tone_level_search(ChewingInitial initial, ChewingMiddle middle,
ChewingFinal final, int phrase_length,
- /* in */ ChewingKey keys[],
+ /* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const;
void reset();
@@ -74,13 +75,13 @@ public:
table_offset_t & end);
/* search method */
- int search(int phrase_length, /* in */ ChewingKey keys[],
+ int search(int phrase_length, /* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const;
/* add/remove index method */
- int add_index(int phrase_length, /* in */ ChewingKey keys[],
+ int add_index(int phrase_length, /* in */ const ChewingKey keys[],
/* in */ phrase_token_t token);
- int remove_index(int phrase_length, /* in */ ChewingKey keys[],
+ int remove_index(int phrase_length, /* in */ const ChewingKey keys[],
/* in */ phrase_token_t token);
/* mask out method */
@@ -126,18 +127,18 @@ public:
bool load_text(FILE * file);
/* search method */
- int search(int phrase_length, /* in */ ChewingKey keys[],
+ int search(int phrase_length, /* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const {
return m_bitmap_table.search(phrase_length, keys, ranges);
}
/* add/remove index method */
- int add_index(int phrase_length, /* in */ ChewingKey keys[],
+ int add_index(int phrase_length, /* in */ const ChewingKey keys[],
/* in */ phrase_token_t token) {
return m_bitmap_table.add_index(phrase_length, keys, token);
}
- int remove_index(int phrase_length, /* in */ ChewingKey keys[],
+ int remove_index(int phrase_length, /* in */ const ChewingKey keys[],
/* in */ phrase_token_t token) {
return m_bitmap_table.remove_index(phrase_length, keys, token);
}