From 2970679b136f91607f7db1d1a64c3158b1d60881 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 14 Dec 2011 13:06:11 +0800 Subject: add get string to chewing key --- src/storage/chewing_key.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/storage/chewing_key.h') diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h index ec8c7a3..9f6526e 100644 --- a/src/storage/chewing_key.h +++ b/src/storage/chewing_key.h @@ -174,6 +174,13 @@ struct ChewingKey m_final = final; m_tone = CHEWING_ZERO_TONE; } + +public: + gint get_table_index(); + + /* Note: the return value should be freed by g_free. */ + gchar * get_pinyin_string(); + gchar * get_chewing_string(); }; static inline bool operator == (ChewingKey lhs, ChewingKey rhs) { @@ -190,6 +197,11 @@ static inline bool operator == (ChewingKey lhs, ChewingKey rhs) { struct ChewingKeyRest { + /* Note: the table index is deprecated, + * and will be removed in the next major release. + * Currently this is kept for debugging purpose. + * Please use get_table_index in ChewingKey. + */ guint16 m_table_index; /* the index in pinyin parser table. */ guint16 m_raw_begin; /* the begin of the raw input. */ guint16 m_raw_end; /* the end of the raw input. */ -- cgit