Xapian::DateValueRangeProcessor Class Reference

Handle a date range. More...

#include <queryparser.h>

Inheritance diagram for Xapian::DateValueRangeProcessor:

Inheritance graph
[legend]
Collaboration diagram for Xapian::DateValueRangeProcessor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DateValueRangeProcessor (Xapian::valueno valno_, bool prefer_mdy_=false, int epoch_year_=1970)
 Constructor.
Xapian::valueno operator() (std::string &begin, std::string &end)
 See if <begin>.

Private Attributes

Xapian::valueno valno
bool prefer_mdy
int epoch_year

Detailed Description

Handle a date range.

Begin and end must be dates in a recognised format.

Definition at line 125 of file queryparser.h.


Constructor & Destructor Documentation

Xapian::DateValueRangeProcessor::DateValueRangeProcessor ( Xapian::valueno  valno_,
bool  prefer_mdy_ = false,
int  epoch_year_ = 1970 
) [inline]

Constructor.

Parameters:
valno_ The value number to return from operator().
prefer_mdy_ Should ambiguous dates be interpreted as month/day/year rather than day/month/year? (default: false)
epoch_year_ Year to use as the epoch for dates with 2 digit years (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970).

Definition at line 141 of file queryparser.h.


Member Function Documentation

Xapian::valueno Xapian::DateValueRangeProcessor::operator() ( std::string &  begin,
std::string &  end 
) [virtual]

See if <begin>.

.<end> is a valid date value range.

If <begin>..<end> is a sensible date range, this method returns the value number of range filter on. Otherwise it returns Xapian::BAD_VALUENO.

Implements Xapian::ValueRangeProcessor.


Member Data Documentation

Xapian::valueno Xapian::DateValueRangeProcessor::valno [private]

Definition at line 126 of file queryparser.h.

bool Xapian::DateValueRangeProcessor::prefer_mdy [private]

Definition at line 127 of file queryparser.h.

int Xapian::DateValueRangeProcessor::epoch_year [private]

Definition at line 128 of file queryparser.h.


The documentation for this class was generated from the following file:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.