From a99fe32edd9a7d3e0600d1d13396ae84128688f7 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 10 Sep 2012 13:08:51 +0800 Subject: begin to write pinyin lookup2 --- src/lookup/pinyin_lookup2.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp index 7b8095c..820f594 100644 --- a/src/lookup/pinyin_lookup2.cpp +++ b/src/lookup/pinyin_lookup2.cpp @@ -182,3 +182,25 @@ static void clear_steps(GPtrArray * steps_index, GPtrArray * steps_content){ } } + +PinyinLookup2::PinyinLookup2(pinyin_option_t options, + FacadeChewingTable * pinyin_table, + FacadePhraseIndex * phrase_index, + Bigram * system_bigram, + Bigram * user_bigram){ + m_options = options; + m_pinyin_table = pinyin_table; + m_phrase_index = phrase_index; + m_system_bigram = system_bigram; + m_user_bigram = user_bigram; + + m_steps_index = g_ptr_array_new(); + m_steps_content = g_ptr_array_new(); +} + +PinyinLookup2::~PinyinLookup2(){ + clear_steps(m_steps_index, m_steps_content); + g_ptr_array_free(m_steps_index, TRUE); + g_ptr_array_free(m_steps_content, TRUE); +} + -- cgit