Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > 7ccba03a8b2ff4bf6e75bb07a270a9d9 > files > 214

libxapian-devel-1.2.12-3.mga3.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: xapian-core: Xapian::ValueIterator 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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</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="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1ValueIterator.html">ValueIterator</a>
  </div>
</div>
<div class="contents">
<h1>Xapian::ValueIterator Class Reference</h1><!-- doxytag: class="Xapian::ValueIterator" -->Class for iterating over document values.  
<a href="#_details">More...</a>
<p>

<p>
<a href="classXapian_1_1ValueIterator-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"><a class="anchor" name="e8f251e2647b9b73b1b516c8bc2a15e4"></a><!-- doxytag: member="Xapian::ValueIterator::ValueIterator" ref="e8f251e2647b9b73b1b516c8bc2a15e4" args="(const ValueIterator &amp;o)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#e8f251e2647b9b73b1b516c8bc2a15e4">ValueIterator</a> (const <a class="el" href="classXapian_1_1ValueIterator.html">ValueIterator</a> &amp;o)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dcd37a282ae544724ffd37dca408406"></a><!-- doxytag: member="Xapian::ValueIterator::operator=" ref="1dcd37a282ae544724ffd37dca408406" args="(const ValueIterator &amp;o)" -->
<a class="el" href="classXapian_1_1ValueIterator.html">ValueIterator</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#1dcd37a282ae544724ffd37dca408406">operator=</a> (const <a class="el" href="classXapian_1_1ValueIterator.html">ValueIterator</a> &amp;o)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment. <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_1ValueIterator.html#4084631b78f8c9f95b3bc1f5546549dc">ValueIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#4084631b78f8c9f95b3bc1f5546549dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a3c9c62e2667580261ef312758942ae"></a><!-- doxytag: member="Xapian::ValueIterator::~ValueIterator" ref="5a3c9c62e2667580261ef312758942ae" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#5a3c9c62e2667580261ef312758942ae">~ValueIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ebc5e56d09b4c49770e8fb19f600a288"></a><!-- doxytag: member="Xapian::ValueIterator::operator*" ref="ebc5e56d09b4c49770e8fb19f600a288" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#ebc5e56d09b4c49770e8fb19f600a288">operator*</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value at the current position. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e76c157616ca36ce63409846649fc666"></a><!-- doxytag: member="Xapian::ValueIterator::operator++" ref="e76c157616ca36ce63409846649fc666" args="()" -->
<a class="el" href="classXapian_1_1ValueIterator.html">ValueIterator</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#e76c157616ca36ce63409846649fc666">operator++</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the iterator to the next position. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a101b6f08ac0cbd9ec306ecf154892d4"></a><!-- doxytag: member="Xapian::ValueIterator::operator++" ref="a101b6f08ac0cbd9ec306ecf154892d4" args="(int)" -->
DerefWrapper_&lt; std::string &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#a101b6f08ac0cbd9ec306ecf154892d4">operator++</a> (int)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the iterator to the next position (postfix version). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#5abfc1ae8f35819b3b71f502092646a8">get_docid</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the docid at the current position.  <a href="#5abfc1ae8f35819b3b71f502092646a8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#7ad3cc981f6563e8d2d2d875bcee78a5">get_valueno</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value slot number for the current position.  <a href="#7ad3cc981f6563e8d2d2d875bcee78a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#ecff65bcb208c551bfee41fec244fbbf">skip_to</a> (<a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a> docid_or_slot)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the iterator to document id or value slot <em>docid_or_slot</em>.  <a href="#ecff65bcb208c551bfee41fec244fbbf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#e41c268fb5e79b1e4f8cd90a62ec92dd">check</a> (<a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a> <a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">docid</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the specified docid occurs.  <a href="#e41c268fb5e79b1e4f8cd90a62ec92dd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74bed1979654824aa8186c3708cfd921"></a><!-- doxytag: member="Xapian::ValueIterator::get_description" ref="74bed1979654824aa8186c3708cfd921" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueIterator.html#74bed1979654824aa8186c3708cfd921">get_description</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a string describing this object. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class for iterating over document values. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="4084631b78f8c9f95b3bc1f5546549dc"></a><!-- doxytag: member="Xapian::ValueIterator::ValueIterator" ref="4084631b78f8c9f95b3bc1f5546549dc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::ValueIterator::ValueIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default constructor. 
<p>
Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e41c268fb5e79b1e4f8cd90a62ec92dd"></a><!-- doxytag: member="Xapian::ValueIterator::check" ref="e41c268fb5e79b1e4f8cd90a62ec92dd" args="(Xapian::docid docid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Xapian::ValueIterator::check           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a>&nbsp;</td>
          <td class="paramname"> <em>docid</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if the specified docid occurs. 
<p>
The caller is required to ensure that the specified document id <em>did</em> actually exists in the database.<p>
This method acts like <a class="el" href="classXapian_1_1ValueIterator.html#ecff65bcb208c551bfee41fec244fbbf" title="Advance the iterator to document id or value slot docid_or_slot.">skip_to()</a> if that can be done at little extra cost, in which case it then returns true. This is how brass and chert databases behave because they store values in streams which allow for an efficient implementation of <a class="el" href="classXapian_1_1ValueIterator.html#ecff65bcb208c551bfee41fec244fbbf" title="Advance the iterator to document id or value slot docid_or_slot.">skip_to()</a>.<p>
Otherwise it simply checks if a particular docid is present. If it is, it returns true. If it isn't, it returns false, and leaves the position unspecified (and hence the result of calling methods which depends on the current position, such as <a class="el" href="classXapian_1_1ValueIterator.html#5abfc1ae8f35819b3b71f502092646a8" title="Return the docid at the current position.">get_docid()</a>, are also unspecified). In this state, next() will advance to the first matching position after document <em>did</em>, and <a class="el" href="classXapian_1_1ValueIterator.html#ecff65bcb208c551bfee41fec244fbbf" title="Advance the iterator to document id or value slot docid_or_slot.">skip_to()</a> will act as it would if the position was the first matching position after document <em>did</em>.<p>
Currently the inmemory, flint, and remote backends behave in the latter way because they don't support streamed values and so <a class="el" href="classXapian_1_1ValueIterator.html#ecff65bcb208c551bfee41fec244fbbf" title="Advance the iterator to document id or value slot docid_or_slot.">skip_to()</a> must check each document it skips over which is significantly slower.<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>docid</em>&nbsp;</td><td>The document id to check. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="5abfc1ae8f35819b3b71f502092646a8"></a><!-- doxytag: member="Xapian::ValueIterator::get_docid" ref="5abfc1ae8f35819b3b71f502092646a8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a> Xapian::ValueIterator::get_docid           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the docid at the current position. 
<p>
If we're iterating over values of a document, this method will throw <a class="el" href="classXapian_1_1InvalidOperationError.html" title="InvalidOperationError indicates the API was used in an invalid way.">Xapian::InvalidOperationError</a>. 
</div>
</div><p>
<a class="anchor" name="7ad3cc981f6563e8d2d2d875bcee78a5"></a><!-- doxytag: member="Xapian::ValueIterator::get_valueno" ref="7ad3cc981f6563e8d2d2d875bcee78a5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> Xapian::ValueIterator::get_valueno           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the value slot number for the current position. 
<p>
If the iterator is over all values in a slot, this returns that slot's number. If the iterator is over the values in a particular document, it returns the number of each slot in turn. 
</div>
</div><p>
<a class="anchor" name="ecff65bcb208c551bfee41fec244fbbf"></a><!-- doxytag: member="Xapian::ValueIterator::skip_to" ref="ecff65bcb208c551bfee41fec244fbbf" args="(Xapian::docid docid_or_slot)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::ValueIterator::skip_to           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">Xapian::docid</a>&nbsp;</td>
          <td class="paramname"> <em>docid_or_slot</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Advance the iterator to document id or value slot <em>docid_or_slot</em>. 
<p>
If this iterator is over values in a document, then this method advances the iterator to value slot <em>docid_or_slot</em>, or the first slot after it if there is no value in slot <em>slot</em>.<p>
If this iterator is over values in a particular slot, then this method advances the iterator to document id <em>docid_or_slot</em>, or the first document id after it if there is no value in the slot we're iterating over for document <em>docid_or_slot</em>.<p>
Note: The "two-faced" nature of this method is due to how C++ overloading works. <a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64" title="A unique identifier for a document.">Xapian::docid</a> and <a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea" title="The number for a value slot in a document.">Xapian::valueno</a> are both typedefs for the same unsigned integer type, so overloading can't distinguish them.<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>docid_or_slot</em>&nbsp;</td><td>The docid/slot to advance to. </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="valueiterator_8h.html">valueiterator.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>