summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lookup/pinyin_lookup2.cpp22
1 files changed, 22 insertions, 0 deletions
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);
+}
+