xapian-core
1.4.27
|
Base class for range processors. More...
#include <queryparser.h>
Public Member Functions | |
RangeProcessor () | |
Default constructor. | |
RangeProcessor (Xapian::valueno slot_, const std::string &str_=std::string(), unsigned flags_=0) | |
Constructor. | |
virtual | ~RangeProcessor () |
Destructor. | |
Xapian::Query | check_range (const std::string &b, const std::string &e) |
Check prefix/suffix on range. | |
virtual Xapian::Query | operator() (const std::string &begin, const std::string &end) |
Check for a valid range of this type. | |
RangeProcessor * | release () |
Start reference counting this object. | |
const RangeProcessor * | release () const |
Start reference counting this object. | |
Protected Attributes | |
Xapian::valueno | slot |
The value slot to process. | |
std::string | str |
The prefix (or suffix with RP_SUFFIX) string to look for. | |
unsigned | flags |
Flags. | |
Base class for range processors.
|
inlineexplicit |
Constructor.
slot_ | Which value slot to generate ranges over. |
str_ | A string to look for to recognise values as belonging to this range (as a prefix by default, or as a suffix if flags Xapian::RP_SUFFIX is specified). |
flags_ | Zero or more of the following flags, combined with bitwise-or (| in C++):
|
Xapian::Query Xapian::RangeProcessor::check_range | ( | const std::string & | b, |
const std::string & | e | ||
) |
Check prefix/suffix on range.
If they match, remove the prefix/suffix and then call operator()() to try to handle the range.
|
virtual |
Check for a valid range of this type.
Override this method to implement your own range handling.
begin | The start of the range as specified in the query string by the user. |
end | The end of the range as specified in the query string by the user (empty string for no upper limit). |
Reimplemented in Xapian::DateRangeProcessor, and Xapian::NumberRangeProcessor.
|
inline |
Start reference counting this object.
You can transfer ownership of a dynamically allocated RangeProcessor object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required.
|
inline |
Start reference counting this object.
You can transfer ownership of a dynamically allocated RangeProcessor object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required.
|
protected |
Flags.
Bitwise-or (| in C++) of zero or more of the following:
|
protected |
The value slot to process.
If this range processor isn't value-based, it can ignore this member.