diff options
author | Peng Wu <alexepico@gmail.com> | 2013-09-24 15:53:42 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-09-24 15:53:42 +0800 |
commit | 97807ae50bdeb9ae9222f415b32c0ff1424a7601 (patch) | |
tree | d22d5aeddf76d7434d3236e193f8f954633a1681 /src | |
parent | 2c9bb02d7f3e7b081952dac4746b901e8f76d77e (diff) | |
download | libzhuyin-97807ae50bdeb9ae9222f415b32c0ff1424a7601.tar.gz libzhuyin-97807ae50bdeb9ae9222f415b32c0ff1424a7601.tar.xz libzhuyin-97807ae50bdeb9ae9222f415b32c0ff1424a7601.zip |
begin to write ChewingDirectParser2
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/pinyin_parser2.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index 472ba5e..1cc6e2c 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -220,6 +220,23 @@ public: bool in_chewing_scheme(pinyin_option_t options, const char key, const char ** symbol) const; }; + +/* Direct Parser for Chewing table load. */ +class ChewingDirectParser2 : public PhoneticParser2 +{ + const chewing_index_item_t * m_chewing_index; + size_t m_chewing_index_len; + +public: + ChewingDirectParser2(); + + virtual ~ChewingDirectParser2() {} + + 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; +}; + /* compare pinyins with chewing internal representations. */ inline int pinyin_compare_initial2(pinyin_option_t options, ChewingInitial lhs, |