diff options
author | Peng Wu <alexepico@gmail.com> | 2015-10-15 11:01:35 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-10-15 11:01:35 +0800 |
commit | dcc594e5c54f5d3bbae442434e080bab52f9b9cf (patch) | |
tree | 4150d3734eead24764811330d8bd88fbf759c7ba /src/storage/pinyin_parser2.h | |
parent | 7bcaabf8549d55b8c51d9c74ac7841fd635d18b8 (diff) | |
download | libpinyin-dcc594e5c54f5d3bbae442434e080bab52f9b9cf.tar.gz libpinyin-dcc594e5c54f5d3bbae442434e080bab52f9b9cf.tar.xz libpinyin-dcc594e5c54f5d3bbae442434e080bab52f9b9cf.zip |
write PinyinDirectParser2
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r-- | src/storage/pinyin_parser2.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index a24d600..6faee17 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -229,6 +229,23 @@ public: bool set_scheme(DoublePinyinScheme scheme); }; +/* Direct Parser for Pinyin table load. */ +class PinyinDirectParser2 : public PhoneticParser2 +{ + const pinyin_index_item_t * m_pinyin_index; + size_t m_pinyin_index_len; + +public: + PinyinDirectParser2(); + + virtual ~PinyinDirectParser2() {} + + 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; +}; + + /** * ZhuyinParser2: * @@ -365,7 +382,7 @@ public: }; -/* Direct Parser for Chewing table load. */ +/* Direct Parser for Zhuyin table load. */ class ZhuyinDirectParser2 : public PhoneticParser2 { const chewing_index_item_t * m_chewing_index; |