21 #ifndef XAPIAN_INCLUDED_EXPANDDECIDER_H 22 #define XAPIAN_INCLUDED_EXPANDDECIDER_H 24 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD 25 # error Never use <xapian/expanddecider.h> directly; include <xapian.h> instead. 53 virtual bool operator()(
const std::string &term)
const = 0;
66 opt_intrusive_base::release();
78 opt_intrusive_base::release();
100 : first(&first_), second(&second_) { }
109 : first(first_), second(second_) { }
111 virtual bool operator()(
const std::string &term)
const;
131 template<
class Iterator>
133 : rejects(reject_begin, reject_end) { }
135 virtual bool operator()(
const std::string &term)
const;
151 : prefix(prefix_) { }
153 virtual bool operator() (
const std::string &term)
const;
158 #endif // XAPIAN_INCLUDED_EXPANDDECIDER_H The Xapian namespace contains public interfaces for the Xapian library.
ExpandDecider subclass which restrict terms to a particular prefix.
ExpandDecider subclass which rejects terms in a specified list.
ExpandDeciderFilterTerms(Iterator reject_begin, Iterator reject_end)
The two iterators specify a list of terms to be rejected.
Internal::opt_intrusive_ptr< const ExpandDecider > second
ExpandDecider()
Default constructor.
std::set< std::string > rejects
ExpandDecider subclass which rejects terms using two ExpandDeciders.
Virtual base class for expand decider functor.
#define XAPIAN_VISIBILITY_DEFAULT
ExpandDecider * release()
Start reference counting this object.
ExpandDeciderAnd(const ExpandDecider &first_, const ExpandDecider &second_)
Terms will be checked with first, and if accepted, then checked with second.
Define XAPIAN_VISIBILITY_* macros.
const ExpandDecider * release() const
Start reference counting this object.
Base class for objects managed by opt_intrusive_ptr.
ExpandDeciderAnd(const ExpandDecider *first_, const ExpandDecider *second_)
Compatibility method.
A smart pointer that optionally uses intrusive reference counting.
ExpandDeciderFilterPrefix(const std::string &prefix_)
The parameter specify the prefix of terms to be retained.