diff options
author | Peng Wu <alexepico@gmail.com> | 2011-11-16 14:45:18 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-11-16 14:48:10 +0800 |
commit | 9fa01b9621b7cdc102f7efda35fac5260cbf622d (patch) | |
tree | 23d4e91971e282e7b0de337a4b49dc520a487466 /src/storage/pinyin_parser2.h | |
parent | 5af041d0ecb0eeff49be8c35a2223e8458a93120 (diff) | |
download | libpinyin-9fa01b9621b7cdc102f7efda35fac5260cbf622d.tar.gz libpinyin-9fa01b9621b7cdc102f7efda35fac5260cbf622d.tar.xz libpinyin-9fa01b9621b7cdc102f7efda35fac5260cbf622d.zip |
update pinyin parsers interface
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r-- | src/storage/pinyin_parser2.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index 1ac47c0..2065119 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -87,9 +87,9 @@ public: * @param str snput string in UTF-8 encoding, in most case this string is just a plain ASCII string. * @param len the length of str, in number of chars rather than bytes. * - * @return the number of chars were actually used. + * @return whether the entire string is parsed as one key. */ - virtual int parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const = 0; + virtual bool parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const = 0; /** * @brief Translate the source string into a set of ChewingKeys. @@ -124,7 +124,7 @@ public: g_array_free(m_parse_steps, TRUE); } - virtual int parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; virtual int parse (guint32 options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const; }; @@ -139,7 +139,7 @@ class DoublePinyinParser2 : public PinyinParser2 public: virtual ~DoublePinyinParser2 () {} - virtual int parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; virtual int parse (guint32 options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const; @@ -169,7 +169,7 @@ class ChewingParser2 : public PinyinParser2 public: virtual ~ChewingParser2 () {} - virtual int parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; virtual int parse (guint32 options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const; |