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

Handle a string range. More...

+ Inheritance diagram for Xapian::StringValueRangeProcessor:

Public Member Functions

 StringValueRangeProcessor (Xapian::valueno slot_)
 Constructor. More...
 
 StringValueRangeProcessor (Xapian::valueno slot_, const std::string &str_, bool prefix_=true)
 Constructor. More...
 
Xapian::valueno operator() (std::string &begin, std::string &end)
 Check for a valid string range. More...
 
- Public Member Functions inherited from Xapian::ValueRangeProcessor
 ValueRangeProcessor ()
 Default constructor.
 
virtual ~ValueRangeProcessor ()
 Destructor.
 
ValueRangeProcessorrelease ()
 
const ValueRangeProcessorrelease () const
 

Protected Attributes

Xapian::valueno valno
 
bool prefix
 
std::string str
 

Detailed Description

Handle a string range.

The end points can be any strings.

Deprecated:
Use Xapian::RangeProcessor instead (added in 1.3.6).

Constructor & Destructor Documentation

Xapian::StringValueRangeProcessor::StringValueRangeProcessor ( Xapian::valueno  slot_)
inlineexplicit

Constructor.

Parameters
slot_The value number to return from operator().
Xapian::StringValueRangeProcessor::StringValueRangeProcessor ( Xapian::valueno  slot_,
const std::string &  str_,
bool  prefix_ = true 
)
inline

Constructor.

Parameters
slot_The value number to return from operator().
str_A string to look for to recognise values as belonging to this range.
prefix_Flag specifying whether to check for str_ as a prefix or a suffix.

Member Function Documentation

Xapian::valueno Xapian::StringValueRangeProcessor::operator() ( std::string &  begin,
std::string &  end 
)
virtual

Check for a valid string range.

Parameters
[in,out]beginThe start of the range as specified in the query string by the user. This parameter is a non-const reference so the ValueRangeProcessor can modify it to return the value to start the range with.
[in,out]endThe end of the range. This is also a non-const reference so it can be modified.
Returns
A StringValueRangeProcessor always accepts a range it is offered, and returns the value of slot_ passed at construction time. It doesn't modify begin or end.

Implements Xapian::ValueRangeProcessor.

Reimplemented in Xapian::NumberValueRangeProcessor, and Xapian::DateValueRangeProcessor.


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.