summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-15 17:52:28 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-15 17:52:28 +0800
commit3d258a59568cb9d6114b8f80784d94abcb1b7905 (patch)
tree788f902afd1c79ea56f7ba6969fee4bd7a848f3a /src/storage/pinyin_parser2.cpp
parent4e5e619a20c4d7c9cc1229a2f3e26a7219bf6841 (diff)
downloadlibpinyin-3d258a59568cb9d6114b8f80784d94abcb1b7905.tar.gz
libpinyin-3d258a59568cb9d6114b8f80784d94abcb1b7905.tar.xz
libpinyin-3d258a59568cb9d6114b8f80784d94abcb1b7905.zip
update m_table_index name
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r--src/storage/pinyin_parser2.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index c7bf71b..4e3cbc2 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -70,21 +70,21 @@ static bool check_chewing_options(guint32 options, const chewing_index_item_t *
/* methods for Chewing Keys to access pinyin parser table. */
const char * ChewingKeyRest::get_pinyin_string(){
- if (m_index == 0)
+ if (m_table_index == 0)
return NULL;
/* check end boundary. */
- assert(m_index < G_N_ELEMENTS(content_table));
- return content_table[m_index].m_pinyin_str;
+ assert(m_table_index < G_N_ELEMENTS(content_table));
+ return content_table[m_table_index].m_pinyin_str;
}
const char * ChewingKeyRest::get_chewing_string(){
- if (m_index == 0)
+ if (m_table_index == 0)
return NULL;
/* check end boundary. */
- assert(m_index < G_N_ELEMENTS(content_table));
- return content_table[m_index].m_chewing_str;
+ assert(m_table_index < G_N_ELEMENTS(content_table));
+ return content_table[m_table_index].m_chewing_str;
}
@@ -133,8 +133,8 @@ int FullPinyinParser2::parse_one_key (guint32 options, ChewingKey & key,
if (!check_pinyin_options(options, index))
continue;
- key_rest.m_index = index->m_table_index;
- key = content_table[key_rest.m_index].m_chewing_key;
+ key_rest.m_table_index = index->m_table_index;
+ key = content_table[key_rest.m_table_index].m_chewing_key;
break;
}
}
@@ -151,3 +151,10 @@ int FullPinyinParser2::parse_one_key (guint32 options, ChewingKey & key,
g_free(input);
return parsed_len;
}
+
+
+int FullPinyinParser2::parse (guint32 options, ChewingKeyVector & keys,
+ ChewingKeyRestVector & key_rests,
+ const char *str, int len) const {
+ assert(FALSE);
+}