summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-09-22 16:16:33 +0800
committerPeng Wu <alexepico@gmail.com>2013-09-22 16:16:38 +0800
commita1ed16081569a46afce162fc3cfb2510bd6763b5 (patch)
treebfe6dd25ee4d358303b826b13a1b98dbb3425085 /src/storage/pinyin_parser2.h
parent69f46d03e53398ba9df3f75d939353d18ac7c4ed (diff)
downloadlibzhuyin-a1ed16081569a46afce162fc3cfb2510bd6763b5.tar.gz
libzhuyin-a1ed16081569a46afce162fc3cfb2510bd6763b5.tar.xz
libzhuyin-a1ed16081569a46afce162fc3cfb2510bd6763b5.zip
begin to write ChewingDaChenCP26Parser2 class
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r--src/storage/pinyin_parser2.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h
index a58c7b6..948b0a3 100644
--- a/src/storage/pinyin_parser2.h
+++ b/src/storage/pinyin_parser2.h
@@ -195,6 +195,29 @@ public:
bool in_chewing_scheme(pinyin_option_t options, const char key, const char ** symbol) const;
};
+class ChewingDaChenCP26Parser2 : public PhoneticParser2
+{
+ /* some internal pointers to chewing scheme table. */
+ const chewing_index_item_t * m_chewing_index;
+ size_t m_chewing_index_len;
+ const chewing_symbol_item_t * m_initial_table;
+ const chewing_symbol_item_t * m_middle_table;
+ const chewing_symbol_item_t * m_final_table;
+ const chewing_tone_item_t * m_tone_table;
+
+public:
+ ChewingDaChenCP26Parser2();
+
+ virtual ~ChewingDaChenCP26Parser2() {}
+
+ virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const;
+
+ virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const;
+
+public:
+ bool in_chewing_scheme(pinyin_option_t options, const char key, const char ** symbol) const;
+};
+
/* compare pinyins with chewing internal representations. */
inline int pinyin_compare_initial2(pinyin_option_t options,
ChewingInitial lhs,