From b2f0a76e79eb8cc05adf31c36a70bc82c8b1f03d Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 14 Dec 2011 14:23:15 +0800 Subject: refine parse_one_key method --- src/storage/pinyin_parser2.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/storage/pinyin_parser2.h') diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index 04bbffc..9988889 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -105,7 +105,7 @@ public: * * @return whether the entire string is parsed as one key. */ - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const = 0; + virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const = 0; /** * @brief Translate the source string into a set of ChewingKeys. @@ -117,9 +117,6 @@ public: * * @return the number of chars were actually used. */ - /* Note: - * the parse method will use dynamic programming to drive parse_one_key. - */ virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const = 0; }; @@ -147,8 +144,11 @@ public: g_array_free(m_parse_steps, TRUE); } - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const; + /* Note: + * the parse method will use dynamic programming to drive parse_one_key. + */ virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const; }; @@ -170,7 +170,7 @@ public: virtual ~DoublePinyinParser2() {} - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + 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; @@ -207,7 +207,7 @@ public: virtual ~ChewingParser2() {} - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + 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; -- cgit