Public Member Functions | Protected Attributes | List of all members
Xapian::RangeProcessor Class Reference

Base class for range processors. More...

+ Inheritance diagram for Xapian::RangeProcessor:

Public Member Functions

 RangeProcessor ()
 Default constructor. More...
 
 RangeProcessor (Xapian::valueno slot_, const std::string &str_=std::string(), unsigned flags_=0)
 Constructor. More...
 
virtual ~RangeProcessor ()
 Destructor.
 
Xapian::Query check_range (const std::string &b, const std::string &e)
 
virtual Xapian::Query operator() (const std::string &begin, const std::string &end)
 Check for a valid range of this type. More...
 
RangeProcessorrelease ()
 
const RangeProcessorrelease () const
 

Protected Attributes

Xapian::valueno slot
 
std::string str
 
unsigned flags
 

Detailed Description

Base class for range processors.

Constructor & Destructor Documentation

Xapian::RangeProcessor::RangeProcessor ( )
inline

Default constructor.

Xapian::RangeProcessor::RangeProcessor ( Xapian::valueno  slot_,
const std::string &  str_ = std::string(),
unsigned  flags_ = 0 
)
inline

Constructor.

Parameters
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:
  • Xapian::RP_SUFFIX - require str_ as a suffix instead of a prefix.
  • Xapian::RP_REPEATED - optionally allow str_ on both ends of the range - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the end (e.g. 2..12kg).

Member Function Documentation

virtual Xapian::Query Xapian::RangeProcessor::operator() ( const std::string &  begin,
const std::string &  end 
)
virtual

Check for a valid range of this type.

Parameters
beginThe start of the range as specified in the query string by the user.
endThe end of the range as specified in the query string by the user (empty string for no upper limit).
Returns
An OP_VALUE_RANGE Query object (or if end.empty(), an OP_VALUE_GE Query object).

Reimplemented in Xapian::NumberRangeProcessor, and Xapian::DateRangeProcessor.

Referenced by Xapian::QueryParser::add_valuerangeprocessor().


The documentation for this class was generated from the following file:

Documentation for Xapian (version 1.4.0).
Generated on Wed Oct 12 2016 by Doxygen 1.8.11.