From d963dc50f1d00f9d70bbe4ed51ad65329da22542 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 21 Feb 2013 11:23:21 +0800 Subject: add get_shengmu/yunmu_string --- src/storage/pinyin_parser2.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/storage/pinyin_parser2.cpp') diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 131231c..f4ea2dd 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -94,6 +94,20 @@ gchar * ChewingKey::get_pinyin_string() { } } +gchar * ChewingKey::get_shengmu_string() { + gint index = get_table_index(); + assert(index < G_N_ELEMENTS(content_table)); + const content_table_item_t & item = content_table[index]; + return g_strdup(item.m_shengmu_str); +} + +gchar * ChewingKey::get_yunmu_string() { + gint index = get_table_index(); + assert(index < G_N_ELEMENTS(content_table)); + const content_table_item_t & item = content_table[index]; + return g_strdup(item.m_yunmu_str); +} + gchar * ChewingKey::get_chewing_string() { assert(m_tone < CHEWING_NUMBER_OF_TONES); gint index = get_table_index(); -- cgit