Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 2dc7ae7102ce788eb8a15dec0caf7708 > files > 131

xapian-core-devel-1.0.21-1.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: xapian-core: Xapian::NumberValueRangeProcessor Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<div class="nav">
<a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1NumberValueRangeProcessor.html">NumberValueRangeProcessor</a></div>
<h1>Xapian::NumberValueRangeProcessor Class Reference</h1><!-- doxytag: class="Xapian::NumberValueRangeProcessor" --><!-- doxytag: inherits="Xapian::ValueRangeProcessor" -->Handle a number range.  
<a href="#_details">More...</a>
<p>
Inheritance diagram for Xapian::NumberValueRangeProcessor:<p><center><img src="classXapian_1_1NumberValueRangeProcessor__inherit__graph.png" border="0" usemap="#Xapian_1_1NumberValueRangeProcessor__inherit__map" alt="Inheritance graph"></center>
<map name="Xapian_1_1NumberValueRangeProcessor__inherit__map">
<area shape="rect" href="structXapian_1_1ValueRangeProcessor.html" title="Base class for value range processors." alt="" coords="31,7,241,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classXapian_1_1NumberValueRangeProcessor-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1NumberValueRangeProcessor.html#540f3fbc93a2440e7db397b4001a1ca3">NumberValueRangeProcessor</a> (<a class="el" href="namespaceXapian.html#e163c06958fa73cfac44a38c3eea5c10">Xapian::valueno</a> valno_)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#540f3fbc93a2440e7db397b4001a1ca3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1NumberValueRangeProcessor.html#0dda2993abc6721c8ce30c5bdf500df2">NumberValueRangeProcessor</a> (<a class="el" href="namespaceXapian.html#e163c06958fa73cfac44a38c3eea5c10">Xapian::valueno</a> valno_, const std::string &amp;str_, bool prefix_=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#0dda2993abc6721c8ce30c5bdf500df2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#e163c06958fa73cfac44a38c3eea5c10">Xapian::valueno</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1NumberValueRangeProcessor.html#22c71cbf39d988104620c53492a147cb">operator()</a> (std::string &amp;begin, std::string &amp;end)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check for a valid range of this type.  <a href="#22c71cbf39d988104620c53492a147cb"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Handle a number range. 
<p>
This class must be used on values which have been encoded using <a class="el" href="namespaceXapian.html#d0de6c574088292e9277b35dfc542d0e" title="Convert a floating point number to a string, preserving sort order.">Xapian::sortable_serialise()</a> which turns numbers into strings which will sort in the same order as the numbers (the same values can be used to implement a numeric sort). 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="540f3fbc93a2440e7db397b4001a1ca3"></a><!-- doxytag: member="Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor" ref="540f3fbc93a2440e7db397b4001a1ca3" args="(Xapian::valueno valno_)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#e163c06958fa73cfac44a38c3eea5c10">Xapian::valueno</a>&nbsp;</td>
          <td class="paramname"> <em>valno_</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>valno_</em>&nbsp;</td><td>The value number to return from operator(). </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="0dda2993abc6721c8ce30c5bdf500df2"></a><!-- doxytag: member="Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor" ref="0dda2993abc6721c8ce30c5bdf500df2" args="(Xapian::valueno valno_, const std::string &amp;str_, bool prefix_=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#e163c06958fa73cfac44a38c3eea5c10">Xapian::valueno</a>&nbsp;</td>
          <td class="paramname"> <em>valno_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>str_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>prefix_</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>valno_</em>&nbsp;</td><td>The value number to return from operator().</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>str_</em>&nbsp;</td><td>A string to look for to recognise values as belonging to this numeric range.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>prefix_</em>&nbsp;</td><td>Whether to look for the string at the start or end of the values. If true, the string is a prefix; if false, the string is a suffix (default: true).</td></tr>
  </table>
</dl>
The string supplied in str_ is used by <em>operator()</em> to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_).<p>
If str_ is empty, the setting of prefix_ is irrelevant, and no special strings are required at the start or end of the strings defining the range.<p>
The remainder of both strings defining the endpoints must be valid floating point numbers. (FIXME: define format recognised).<p>
For example, if str_ is "$" and prefix_ is true, and the range processor has been added to the queryparser, the queryparser will accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as valid ranges. If str_ is "kg" and prefix_ is false, the queryparser will accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" as valid ranges. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="22c71cbf39d988104620c53492a147cb"></a><!-- doxytag: member="Xapian::NumberValueRangeProcessor::operator()" ref="22c71cbf39d988104620c53492a147cb" args="(std::string &amp;begin, std::string &amp;end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#e163c06958fa73cfac44a38c3eea5c10">Xapian::valueno</a> Xapian::NumberValueRangeProcessor::operator()           </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>end</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check for a valid range of this type. 
<p>
If BEGIN..END is a valid numeric value range, and has the appropriate prefix or suffix (if specified) required for this <a class="el" href="classXapian_1_1NumberValueRangeProcessor.html" title="Handle a number range.">NumberValueRangeProcessor</a>, this method returns the value number of range filter on, and sets begin and end to the appropriate serialised values needed to delimit the range. Otherwise it returns <a class="el" href="namespaceXapian.html#0a100329c2c04d4683a77615b7ed6e8e" title="Reserved value to indicate "no valueno".">Xapian::BAD_VALUENO</a>. 
<p>
Implements <a class="el" href="structXapian_1_1ValueRangeProcessor.html#0c3ee8124495c66c5caedbf93d54699b">Xapian::ValueRangeProcessor</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="queryparser_8h.html">queryparser.h</a></ul>
<hr>
<address><small>
Documentation for Xapian (version 1.0.21).<br>
Generated on 18 Jun 2010 by
<a href="http://www.doxygen.org/">Doxygen 1.5.2</a>.
</small></address>
</body>
</html>