summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_index.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-10-26 14:49:11 +0800
committerPeng Wu <alexepico@gmail.com>2012-10-26 14:56:59 +0800
commit39434b7b560399eba0050024bec19aefc772b457 (patch)
tree66af59470449c76fdc2c9174b5e11a59ba5b6326 /src/storage/phrase_index.h
parentbdb3f3ae7ecfba97abcf0553b4325fe97725c3ed (diff)
downloadlibpinyin-39434b7b560399eba0050024bec19aefc772b457.tar.gz
libpinyin-39434b7b560399eba0050024bec19aefc772b457.tar.xz
libpinyin-39434b7b560399eba0050024bec19aefc772b457.zip
write mask out method
Diffstat (limited to 'src/storage/phrase_index.h')
-rw-r--r--src/storage/phrase_index.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h
index 7eb79fc..75813bf 100644
--- a/src/storage/phrase_index.h
+++ b/src/storage/phrase_index.h
@@ -420,6 +420,16 @@ public:
*/
int remove_phrase_item(phrase_token_t token, /* out */ PhraseItem * & item);
+ /**
+ * SubPhraseIndex::mask_out:
+ * @mask: the mask.
+ * @value: the value.
+ * @returns: whether the mask out operation is successful.
+ *
+ * Mask out the matched phrase items.
+ *
+ */
+ bool mask_out(phrase_token_t mask, phrase_token_t value);
};
/**
@@ -558,6 +568,21 @@ public:
bool compact();
/**
+ * FacadePhraseIndex::mask_out:
+ * @phrase_index: the index of sub phrase index.
+ * @mask: the mask.
+ * @value: the value.
+ * @returns: whether the mask out operation is successful.
+ *
+ * Mask out the matched phrase items.
+ *
+ * Note: should call compact() after the mask out operation.
+ *
+ */
+ bool mask_out(guint8 phrase_index,
+ phrase_token_t mask, phrase_token_t value);
+
+ /**
* FacadePhraseIndex::get_sub_phrase_range:
* @min_index: the minimal sub phrase index.
* @max_index: the maximal sub phrase index.
@@ -823,7 +848,7 @@ extern const pinyin_table_info_t pinyin_phrase_files[PHRASE_INDEX_LIBRARY_COUNT]
PhraseIndexLogger * mask_out_phrase_index_logger
(PhraseIndexLogger * oldlogger, phrase_token_t mask, phrase_token_t value);
-
+
};
#endif