summaryrefslogtreecommitdiffstats
path: root/src/storage/chewing_key.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-12-14 13:06:11 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-14 13:06:11 +0800
commit2970679b136f91607f7db1d1a64c3158b1d60881 (patch)
tree33ce2f3f32ef8f91eab4d9028845204c9002300c /src/storage/chewing_key.h
parent23e34dfe67ef11c44b196337cd42e4f000f9b9fc (diff)
downloadlibpinyin-2970679b136f91607f7db1d1a64c3158b1d60881.tar.gz
libpinyin-2970679b136f91607f7db1d1a64c3158b1d60881.tar.xz
libpinyin-2970679b136f91607f7db1d1a64c3158b1d60881.zip
add get string to chewing key
Diffstat (limited to 'src/storage/chewing_key.h')
-rw-r--r--src/storage/chewing_key.h12
1 files changed, 12 insertions, 0 deletions
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. */