diff options
author | Peng Wu <alexepico@gmail.com> | 2010-08-25 17:39:04 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-08-25 17:39:04 +0800 |
commit | 5b86b689d2bdf08778888d05faa9babe39d91464 (patch) | |
tree | a94e95100945f23d2205ffe9ff8636a6f29a8e32 /src/storage/phrase_large_table.h | |
parent | 7a5db88ba5e7a4c38e9206fcfb8286073201f1f9 (diff) | |
download | libpinyin-5b86b689d2bdf08778888d05faa9babe39d91464.tar.gz libpinyin-5b86b689d2bdf08778888d05faa9babe39d91464.tar.xz libpinyin-5b86b689d2bdf08778888d05faa9babe39d91464.zip |
write phrase large table in progress
Diffstat (limited to 'src/storage/phrase_large_table.h')
-rw-r--r-- | src/storage/phrase_large_table.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/storage/phrase_large_table.h b/src/storage/phrase_large_table.h index 1d18100..007c392 100644 --- a/src/storage/phrase_large_table.h +++ b/src/storage/phrase_large_table.h @@ -28,7 +28,7 @@ namespace novel{ -const size_t PHRASE_Number_Of_Bitmap_Index = 1<<16; +const size_t PHRASE_Number_Of_Bitmap_Index = 1<< (sizeof(utf16_t) * 8); class PhraseLengthIndexLevel; @@ -36,7 +36,14 @@ class PhraseBitmapIndexLevel{ protected: PhraseLengthIndexLevel * m_phrase_length_indexes[PHRASE_Number_Of_Bitmap_Index]; //shift one utf16_t for class PhraseLengthIndexLevel, just like PinyinLengthIndexLevel. + void reset(); public: + PhraseBitmapIndexLevel(); + ~PhraseBitmapIndex(){ + reset(); + } + + /* 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); |