diff options
author | Peng Wu <alexepico@gmail.com> | 2016-02-05 15:42:24 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-02-05 15:42:24 +0800 |
commit | 94f9dcccec57f245c765eeac3a4fcd716ac733ec (patch) | |
tree | 8dee5acdd0965a0a47fc3d3c2579406d91ab21a6 /src/storage/phrase_large_table3_kyotodb.cpp | |
parent | 5cf152d3c98ca4e13c091455c26e8a8200751e0b (diff) | |
download | libpinyin-94f9dcccec57f245c765eeac3a4fcd716ac733ec.tar.gz libpinyin-94f9dcccec57f245c765eeac3a4fcd716ac733ec.tar.xz libpinyin-94f9dcccec57f245c765eeac3a4fcd716ac733ec.zip |
begin to write PhraseLargeTable3 for Kyoto Cabinet
Diffstat (limited to 'src/storage/phrase_large_table3_kyotodb.cpp')
-rw-r--r-- | src/storage/phrase_large_table3_kyotodb.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/storage/phrase_large_table3_kyotodb.cpp b/src/storage/phrase_large_table3_kyotodb.cpp index 3153f6e..32d8a8d 100644 --- a/src/storage/phrase_large_table3_kyotodb.cpp +++ b/src/storage/phrase_large_table3_kyotodb.cpp @@ -19,3 +19,30 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "phrase_large_table3_kyotodb.h" + + +namespace pinyin{ + +PhraseLargeTable3::PhraseLargeTable3() { + m_db = NULL; + m_entry = NULL; +} + +void PhraseLargeTable3::reset() { + if (m_db) { + m_db->synchronize(); + m_db->close(); + delete m_db; + m_db = NULL; + } + + m_chunk.set_size(0); + + if (m_entry) { + delete m_entry; + m_entry = NULL; + } +} + +}; |