From 0555fdd296f422c202098d42486c83f4a576dd93 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 12 Nov 2012 13:27:12 +0800 Subject: write mask out for facade tables --- src/storage/facade_chewing_table.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/storage/facade_chewing_table.h') diff --git a/src/storage/facade_chewing_table.h b/src/storage/facade_chewing_table.h index 50683eb..572ce04 100644 --- a/src/storage/facade_chewing_table.h +++ b/src/storage/facade_chewing_table.h @@ -174,7 +174,7 @@ public: int add_index(int phrase_length, /* in */ ChewingKey keys[], /* in */ phrase_token_t token) { if (NULL == m_user_chewing_table) - return false; + return ERROR_NO_USER_TABLE; return m_user_chewing_table->add_index(phrase_length, keys, token); } @@ -191,9 +191,24 @@ public: int remove_index(int phrase_length, /* in */ ChewingKey keys[], /* in */ phrase_token_t token) { if (NULL == m_user_chewing_table) - return false; + return ERROR_NO_USER_TABLE; return m_user_chewing_table->remove_index(phrase_length, keys, token); } + + /** + * FacadeChewingTable::mask_out: + * @mask: the mask. + * @value: the value. + * @returns: whether the mask out operation is successful. + * + * Mask out the matched chewing index. + * + */ + bool mask_out(phrase_token_t mask, phrase_token_t value) { + if (NULL == m_user_chewing_table) + return false; + return m_user_chewing_table->mask_out(mask, value); + } }; }; -- cgit