diff options
author | Peng Wu <alexepico@gmail.com> | 2010-10-09 15:07:58 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-10-09 15:07:58 +0800 |
commit | 1f23a4aa0f7454d8e9dbc53e4366b7a3fe338aa7 (patch) | |
tree | b535dbd329c31d2aa2cb21985ad1f75655213819 /src/storage/phrase_large_table.h | |
parent | 6c9813e7e9afa18720912fa737cc21915756b84c (diff) | |
download | libpinyin-1f23a4aa0f7454d8e9dbc53e4366b7a3fe338aa7.tar.gz libpinyin-1f23a4aa0f7454d8e9dbc53e4366b7a3fe338aa7.tar.xz libpinyin-1f23a4aa0f7454d8e9dbc53e4366b7a3fe338aa7.zip |
re-factor phrase large table
Diffstat (limited to 'src/storage/phrase_large_table.h')
-rw-r--r-- | src/storage/phrase_large_table.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/storage/phrase_large_table.h b/src/storage/phrase_large_table.h index 3c140b9..42eeec4 100644 --- a/src/storage/phrase_large_table.h +++ b/src/storage/phrase_large_table.h @@ -55,41 +55,6 @@ public: int remove_index( int phrase_length, /* in */ utf16_t phrase[], /* out */ phrase_token_t & token); }; -class PhraseLengthIndexLevel{ -protected: - GArray* m_phrase_array_indexes; -public: - PhraseLengthIndexLevel(); - ~PhraseLengthIndexLevel(); - - /* load/store method */ - bool load(MemoryChunk * chunk, table_offset_t offset, table_offset_t end); - bool store(MemoryChunk * new_chunk, table_offset_t offset, table_offset_t & end); - - /* search/add_index/remove_index method */ - int search( int phrase_length, /* in */ utf16_t phrase[], - /* out */ phrase_token_t & token); - - int add_index( int phrase_length, /* in */ utf16_t phrase[], /* in */ phrase_token_t token); - int remove_index( int phrase_length, /* in */ utf16_t phrase[], /* out */ phrase_token_t & token); -}; - -template<size_t phrase_length> -class PhraseArrayIndexLevel{ -protected: - MemoryChunk m_chunk; -public: - bool load(MemoryChunk * chunk, table_offset_t offset, table_offset_t end); - bool store(MemoryChunk * new_chunk, table_offset_t offset, table_offset_t & end); - - /* search/add_index/remove_index method */ - int search( /* in */ utf16_t phrase[], - /* out */ phrase_token_t & token); - - int add_index(/* in */ utf16_t phrase[], /* in */ phrase_token_t token); - int remove_index(/* in */ utf16_t phrase[], /* out */ phrase_token_t & token); -}; - class PhraseLargeTable{ protected: PhraseBitmapIndexLevel m_bitmap_table; |