<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Xapian: API Documentation: xapian-core: Xapian::StringValueRangeProcessor 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.9 --> <script type="text/javascript"> <!-- function changeDisplayState (e){ var num=this.id.replace(/[^[0-9]/g,''); var button=this.firstChild; var sectionDiv=document.getElementById('dynsection'+num); if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ sectionDiv.style.display='block'; button.src='open.gif'; }else{ sectionDiv.style.display='none'; button.src='closed.gif'; } } function initDynSections(){ var divs=document.getElementsByTagName('div'); var sectionCounter=1; for(var i=0;i<divs.length-1;i++){ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ var header=divs[i]; var section=divs[i+1]; var button=header.firstChild; if (button!='IMG'){ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); button=document.createElement('img'); divs[i].insertBefore(button,divs[i].firstChild); } header.style.cursor='pointer'; header.onclick=changeDisplayState; header.id='dynheader'+sectionCounter; button.src='closed.gif'; section.id='dynsection'+sectionCounter; section.style.display='none'; section.style.marginLeft='14px'; sectionCounter++; } } } window.onload = initDynSections; --> </script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1StringValueRangeProcessor.html">StringValueRangeProcessor</a> </div> </div> <div class="contents"> <h1>Xapian::StringValueRangeProcessor Class Reference</h1><!-- doxytag: class="Xapian::StringValueRangeProcessor" --><!-- doxytag: inherits="Xapian::ValueRangeProcessor" -->Handle a string range. <a href="#_details">More...</a> <p> <div class="dynheader"> Inheritance diagram for Xapian::StringValueRangeProcessor:</div> <div class="dynsection"> <p><center><img src="classXapian_1_1StringValueRangeProcessor__inherit__graph.png" border="0" usemap="#Xapian_1_1StringValueRangeProcessor__inherit__map" alt="Inheritance graph"></center> <map name="Xapian_1_1StringValueRangeProcessor__inherit__map"> <area shape="rect" href="classXapian_1_1DateValueRangeProcessor.html" title="Handle a date range." alt="" coords="5,161,245,188"><area shape="rect" href="classXapian_1_1NumberValueRangeProcessor.html" title="Handle a number range." alt="" coords="269,161,531,188"><area shape="rect" href="structXapian_1_1ValueRangeProcessor.html" title="Base class for value range processors." alt="" coords="157,7,368,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classXapian_1_1StringValueRangeProcessor-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1StringValueRangeProcessor.html#5601dd9129f9b21e7b973881bb4a2187">StringValueRangeProcessor</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#5601dd9129f9b21e7b973881bb4a2187"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1StringValueRangeProcessor.html#e0f051c154c1395b0fbd0834df102c4f">StringValueRangeProcessor</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_, const std::string &str_, bool prefix_=true)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#e0f051c154c1395b0fbd0834df102c4f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1StringValueRangeProcessor.html#ac2cd6bf4645a3bb242cf5ad5022ae5e">operator()</a> (std::string &begin, std::string &end)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check for a valid string range. <a href="#ac2cd6bf4645a3bb242cf5ad5022ae5e"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Handle a string range. <p> The end points can be any strings. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="5601dd9129f9b21e7b973881bb4a2187"></a><!-- doxytag: member="Xapian::StringValueRangeProcessor::StringValueRangeProcessor" ref="5601dd9129f9b21e7b973881bb4a2187" args="(Xapian::valueno slot_)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Xapian::StringValueRangeProcessor::StringValueRangeProcessor </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> </td> <td class="paramname"> <em>slot_</em> </td> <td> ) </td> <td><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>slot_</em> </td><td>The value number to return from operator(). </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="e0f051c154c1395b0fbd0834df102c4f"></a><!-- doxytag: member="Xapian::StringValueRangeProcessor::StringValueRangeProcessor" ref="e0f051c154c1395b0fbd0834df102c4f" args="(Xapian::valueno slot_, const std::string &str_, bool prefix_=true)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Xapian::StringValueRangeProcessor::StringValueRangeProcessor </td> <td>(</td> <td class="paramtype"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> </td> <td class="paramname"> <em>slot_</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>str_</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>prefix_</em> = <code>true</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><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>slot_</em> </td><td>The value number to return from operator(). </td></tr> <tr><td valign="top"></td><td valign="top"><em>str_</em> </td><td>A string to look for to recognise values as belonging to this range. </td></tr> <tr><td valign="top"></td><td valign="top"><em>prefix_</em> </td><td>Flag specifying whether to check for str_ as a prefix or a suffix. </td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="ac2cd6bf4645a3bb242cf5ad5022ae5e"></a><!-- doxytag: member="Xapian::StringValueRangeProcessor::operator()" ref="ac2cd6bf4645a3bb242cf5ad5022ae5e" args="(std::string &begin, std::string &end)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> Xapian::StringValueRangeProcessor::operator() </td> <td>(</td> <td class="paramtype">std::string & </td> <td class="paramname"> <em>begin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">std::string & </td> <td class="paramname"> <em>end</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Check for a valid string range. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>begin</em> </td><td>The start of the range as specified in the query string by the user. This parameter is a non-const reference so the <a class="el" href="structXapian_1_1ValueRangeProcessor.html" title="Base class for value range processors.">ValueRangeProcessor</a> can modify it to return the value to start the range with. </td></tr> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>end</em> </td><td>The end of the range. This is also a non-const reference so it can be modified.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="classXapian_1_1StringValueRangeProcessor.html" title="Handle a string range.">StringValueRangeProcessor</a> always accepts a range it is offered, and returns the value of slot_ passed at construction time. It doesn't modify <em>begin</em> or <em>end</em>. </dd></dl> <p>Implements <a class="el" href="structXapian_1_1ValueRangeProcessor.html#a04e11c41e40ceed5f796c94348d2ad2">Xapian::ValueRangeProcessor</a>.</p> <p>Reimplemented in <a class="el" href="classXapian_1_1DateValueRangeProcessor.html#29c079d9156a872f38fca82195525a92">Xapian::DateValueRangeProcessor</a>, and <a class="el" href="classXapian_1_1NumberValueRangeProcessor.html#4a0951e57a4ea8fcdcd9bec6a8037514">Xapian::NumberValueRangeProcessor</a>.</p> </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> </div> <hr> <address><small> Documentation for Xapian (version 1.2.12).<br> Generated on 27 Jun 2012 by <a href="http://www.doxygen.org/">Doxygen 1.5.9</a>. </small></address> </body> </html>