|
xapian-core
2.0.0
|
Base class for range processors. More...
#include <queryparser.h>
Inheritance diagram for Xapian::RangeProcessor:
Collaboration diagram for Xapian::RangeProcessor:Public Member Functions | |
| RangeProcessor () | |
| Default constructor. More... | |
| RangeProcessor (Xapian::valueno slot_, std::string_view str_={}, unsigned flags_=0) | |
| Constructor. More... | |
| virtual | ~RangeProcessor () |
| Destructor. More... | |
| Xapian::Query | check_range (const std::string &b, const std::string &e) |
| Check prefix/suffix on range. More... | |
| virtual Xapian::Query | operator() (const std::string &begin, const std::string &end) |
| Check for a valid range of this type. More... | |
| RangeProcessor * | release () |
| Start reference counting this object. More... | |
| const RangeProcessor * | release () const |
| Start reference counting this object. More... | |
Public Member Functions inherited from Xapian::Internal::opt_intrusive_base | |
| opt_intrusive_base (const opt_intrusive_base &) | |
| opt_intrusive_base & | operator= (const opt_intrusive_base &) |
| opt_intrusive_base () | |
| Construct object which is initially not reference counted. More... | |
| virtual | ~opt_intrusive_base () |
| void | ref () const |
| void | unref () const |
Protected Attributes | |
| Xapian::valueno | slot |
| The value slot to process. More... | |
| std::string | str |
| The prefix (or suffix with RP_SUFFIX) string to look for. More... | |
| unsigned | flags |
| Flags. More... | |
Private Member Functions | |
| void | operator= (const RangeProcessor &) |
| Don't allow assignment. More... | |
| RangeProcessor (const RangeProcessor &) | |
| Don't allow copying. More... | |
Additional Inherited Members | |
Public Attributes inherited from Xapian::Internal::opt_intrusive_base | |
| unsigned | _refs |
| Reference count. More... | |
Protected Member Functions inherited from Xapian::Internal::opt_intrusive_base | |
| void | release () const |
| Start reference counting. More... | |
Base class for range processors.
Definition at line 139 of file queryparser.h.
|
private |
Don't allow copying.
|
inline |
Default constructor.
Definition at line 172 of file queryparser.h.
|
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++):
|
Definition at line 192 of file queryparser.h.
|
virtual |
Destructor.
Definition at line 56 of file queryparser.cc.
| 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.
Definition at line 123 of file valuerangeproc.cc.
References endswith(), Xapian::Query::OP_INVALID, Xapian::RP_REPEATED, Xapian::RP_SUFFIX, startswith(), and Xapian::Internal::str().
|
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::UnitRangeProcessor, Xapian::NumberRangeProcessor, Xapian::DateRangeProcessor, AuthorRangeProcessor, and TestRangeProcessor.
Definition at line 177 of file valuerangeproc.cc.
References Xapian::Query::OP_VALUE_GE, and Xapian::Query::OP_VALUE_RANGE.
Referenced by AuthorRangeProcessor::operator()().
|
private |
Don't allow assignment.
|
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.
Definition at line 232 of file queryparser.h.
Referenced by DEFINE_TESTCASE().
|
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.
Definition at line 244 of file queryparser.h.
|
protected |
Flags.
Bitwise-or (| in C++) of zero or more of the following:
Definition at line 168 of file queryparser.h.
|
protected |
The value slot to process.
If this range processor isn't value-based, it can ignore this member.
Definition at line 152 of file queryparser.h.
|
protected |
The prefix (or suffix with RP_SUFFIX) string to look for.
Definition at line 155 of file queryparser.h.