00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef XAPIAN_INCLUDED_VALUESETMATCHDECIDER_H
00024 #define XAPIAN_INCLUDED_VALUESETMATCHDECIDER_H
00025
00026 #include <xapian/enquire.h>
00027 #include <xapian/types.h>
00028
00029 #include <string>
00030 #include <set>
00031
00032 namespace Xapian {
00033
00034 class Document;
00035
00039 class XAPIAN_VISIBILITY_DEFAULT ValueSetMatchDecider : public MatchDecider {
00041 std::set<std::string> testset;
00042
00044 valueno valuenum;
00045
00051 bool inclusive;
00052
00053 public:
00063 ValueSetMatchDecider(Xapian::valueno valuenum, bool inclusive);
00064
00069 void add_value(const std::string& value)
00070 {
00071 testset.insert(value);
00072 }
00073
00078 void remove_value(const std::string& value)
00079 {
00080 testset.erase(value);
00081 }
00082
00088 bool operator()(const Xapian::Document& doc) const;
00089 };
00090
00091 }
00092
00093 #endif