summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-23 15:18:49 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-23 15:18:49 +0800
commit9f17bdefd4303242d017f2cd3e0ee3bfba819af2 (patch)
treed8f695a6d51059e83e179021a8e02887f043516b /src/storage/pinyin_parser2.h
parent0f7b939fd5f21689448881fda1c598162eda9b51 (diff)
downloadlibpinyin-9f17bdefd4303242d017f2cd3e0ee3bfba819af2.tar.gz
libpinyin-9f17bdefd4303242d017f2cd3e0ee3bfba819af2.tar.xz
libpinyin-9f17bdefd4303242d017f2cd3e0ee3bfba819af2.zip
begin to write chewing parser2
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r--src/storage/pinyin_parser2.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h
index 869f3c6..b81240e 100644
--- a/src/storage/pinyin_parser2.h
+++ b/src/storage/pinyin_parser2.h
@@ -75,7 +75,7 @@ typedef struct {
typedef struct {
const char m_input;
- const char m_tone;
+ const char m_tone;
} chewing_tone_item_t;
typedef GArray * ChewingKeyVector;
@@ -195,9 +195,17 @@ public:
*/
class ChewingParser2 : public PinyinParser2
{
- /* Note: one internal pointer to chewing scheme table. */
+ /* Note: some internal pointers to chewing scheme table. */
+protected:
+ chewing_symbol_item_t * m_symbol_table;
+ chewing_tone_item_t * m_tone_table;
public:
+ ChewingParser2() {
+ m_symbol_table = NULL; m_tone_table = NULL;
+ set_scheme(CHEWING_DEFAULT);
+ }
+
virtual ~ChewingParser2() {}
virtual bool parse_one_key(guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const;