1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: xapian-core: Xapian::ValueWeightPostingSource 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_1ValueWeightPostingSource.html">ValueWeightPostingSource</a>
</div>
</div>
<div class="contents">
<h1>Xapian::ValueWeightPostingSource Class Reference</h1><!-- doxytag: class="Xapian::ValueWeightPostingSource" --><!-- doxytag: inherits="Xapian::ValuePostingSource" -->A posting source which reads weights from a value slot.
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for Xapian::ValueWeightPostingSource:</div>
<div class="dynsection">
<p><center><img src="classXapian_1_1ValueWeightPostingSource__inherit__graph.png" border="0" usemap="#Xapian_1_1ValueWeightPostingSource__inherit__map" alt="Inheritance graph"></center>
<map name="Xapian_1_1ValueWeightPostingSource__inherit__map">
<area shape="rect" href="classXapian_1_1DecreasingValueWeightPostingSource.html" title="Read weights from a value which is known to decrease as docid increases." alt="" coords="5,239,317,265"><area shape="rect" href="classXapian_1_1ValuePostingSource.html" title="A posting source which generates weights from a value slot." alt="" coords="61,84,261,111"><area shape="rect" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings." alt="" coords="80,7,243,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classXapian_1_1ValueWeightPostingSource-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_1ValueWeightPostingSource.html#53b029396164d214d54eb3b3c8640243">ValueWeightPostingSource</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot_)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1ValueWeightPostingSource.html" title="A posting source which reads weights from a value slot.">ValueWeightPostingSource</a>. <a href="#53b029396164d214d54eb3b3c8640243"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#b9159e5e12e909272fa2b776bb95cdaa">get_weight</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the weight contribution for the current document. <a href="#b9159e5e12e909272fa2b776bb95cdaa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html">ValueWeightPostingSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#a157a293a1b54a3d70d1d55f5de26895">clone</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Clone the posting source. <a href="#a157a293a1b54a3d70d1d55f5de26895"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#35d0b218fa9db907c36e62d60b900808">name</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the posting source class. <a href="#35d0b218fa9db907c36e62d60b900808"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#1bdc574c2f1c02472a4ec5fee697af87">serialise</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Serialise object parameters into a string. <a href="#1bdc574c2f1c02472a4ec5fee697af87"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html">ValueWeightPostingSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#ff018c57b785507a3bba82e85ec7fb63">unserialise</a> (const std::string &s) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create object given string serialisation returned by <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#1bdc574c2f1c02472a4ec5fee697af87" title="Serialise object parameters into a string.">serialise()</a>. <a href="#ff018c57b785507a3bba82e85ec7fb63"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#c3844351e28448d1de38fe089d626db4">init</a> (const <a class="el" href="classXapian_1_1Database.html">Database</a> &db_)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> to the start of the list of postings. <a href="#c3844351e28448d1de38fe089d626db4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#f39ca50c3edcd5b8e2cde72db07a4382">get_description</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return a string describing this object. <a href="#f39ca50c3edcd5b8e2cde72db07a4382"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A posting source which reads weights from a value slot.
<p>
This returns entries for all documents in the given database which have a non empty values in the specified slot. It returns a weight calculated by applying sortable_unserialise to the value stored in the slot (so the values stored should probably have been calculated by applying sortable_serialise to a floating point number at index time).<p>
The upper bound on the weight returned is set using the upper bound on the values in the specified slot, or DBL_MAX if value bounds aren't supported by the current backend.<p>
For efficiency, this posting source doesn't check that the stored values are valid in any way, so it will never raise an exception due to invalid stored values. In particular, it doesn't ensure that the unserialised values are positive, which is a requirement for weights. The behaviour if the slot contains values which unserialise to negative values is undefined. <hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="53b029396164d214d54eb3b3c8640243"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::ValueWeightPostingSource" ref="53b029396164d214d54eb3b3c8640243" args="(Xapian::valueno slot_)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Xapian::ValueWeightPostingSource::ValueWeightPostingSource </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></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct a <a class="el" href="classXapian_1_1ValueWeightPostingSource.html" title="A posting source which reads weights from a value slot.">ValueWeightPostingSource</a>.
<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 slot to read values from. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a157a293a1b54a3d70d1d55f5de26895"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::clone" ref="a157a293a1b54a3d70d1d55f5de26895" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html">ValueWeightPostingSource</a>* Xapian::ValueWeightPostingSource::clone </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Clone the posting source.
<p>
The clone should inherit the configuration of the parent, but need not inherit the state. ie, the clone does not need to be in the same iteration position as the original: the matcher will always call <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#c3844351e28448d1de38fe089d626db4" title="Set this PostingSource to the start of the list of postings.">init()</a> on the clone before attempting to move the iterator, or read the information about the current position of the iterator.<p>
This may return NULL to indicate that cloning is not supported. In this case, the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> may only be used with a single-database search.<p>
The default implementation returns NULL.<p>
Note that the returned object will be deallocated by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> after use with "delete". If you want to handle the deletion in a special way (for example when wrapping the <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> API for use from another language) then you can define a static <code>operator delete</code> method in your subclass as shown here: <a href="http://trac.xapian.org/ticket/554#comment:1">http://trac.xapian.org/ticket/554#comment:1</a>
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#ecd88a39155ec5e04c752360b657f315">Xapian::PostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#fcaba0011386e195aeb81836fd0adc5d">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<a class="anchor" name="f39ca50c3edcd5b8e2cde72db07a4382"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::get_description" ref="f39ca50c3edcd5b8e2cde72db07a4382" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string Xapian::ValueWeightPostingSource::get_description </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return a string describing this object.
<p>
This default implementation returns a generic answer. This default it provided to avoid forcing those deriving their own <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclass from having to implement this (they may not care what <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#f39ca50c3edcd5b8e2cde72db07a4382" title="Return a string describing this object.">get_description()</a> gives for their subclass).
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#47d794241880cc691df1c3a3896d1050">Xapian::PostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#b9ec69881499b156c9317bc9d491ef91">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<a class="anchor" name="b9159e5e12e909272fa2b776bb95cdaa"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::get_weight" ref="b9159e5e12e909272fa2b776bb95cdaa" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> Xapian::ValueWeightPostingSource::get_weight </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the weight contribution for the current document.
<p>
This default implementation always returns 0, for convenience when implementing "weight-less" <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclasses.<p>
This method may assume that it will only be called when there is a "current document". In detail: <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will always call <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#c3844351e28448d1de38fe089d626db4" title="Set this PostingSource to the start of the list of postings.">init()</a> on a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> before calling this for the first time. It will also only call this if the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> reports that it is pointing to a valid document (ie, it will not call it before calling at least one of <a class="el" href="classXapian_1_1ValuePostingSource.html#87b22aac8422f80124b50a456d1d85b0" title="Advance the current position to the next matching document.">next()</a>, <a class="el" href="classXapian_1_1ValuePostingSource.html#f11095a4355f96d7bc12074a5a91cd93" title="Advance to the specified docid.">skip_to()</a> or <a class="el" href="classXapian_1_1ValuePostingSource.html#71868e54627098425820f7a76e259197" title="Check if the specified docid occurs.">check()</a>, and will ensure that the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> is not at the end by calling <a class="el" href="classXapian_1_1ValuePostingSource.html#4bb7ea314dbd569f90f89731204cdc40" title="Return true if the current position is past the last entry in this list.">at_end()</a>).
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#2e7637a323a90bea45f2dc68c916ea00">Xapian::PostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#1f302377fd46ed471987939be3f24bab">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<a class="anchor" name="c3844351e28448d1de38fe089d626db4"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::init" ref="c3844351e28448d1de38fe089d626db4" args="(const Database &db_)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xapian::ValueWeightPostingSource::init </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classXapian_1_1Database.html">Database</a> & </td>
<td class="paramname"> <em>db</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> to the start of the list of postings.
<p>
This is called automatically by the matcher prior to each query being processed.<p>
If a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> is used for multiple searches, <em><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#c3844351e28448d1de38fe089d626db4" title="Set this PostingSource to the start of the list of postings.">init()</a></em> will therefore be called multiple times, and must handle this by using the database passed in the most recent call.<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>db</em> </td><td>The database which the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> should iterate through.</td></tr>
</table>
</dl>
Note: the database supplied to this method must not be modified: in particular, the reopen() method should not be called on it.<p>
Note: in the case of a multi-database search, a separate <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> will be used for each database (the separate PostingSources will be obtained using <em><a class="el" href="classXapian_1_1ValueWeightPostingSource.html#a157a293a1b54a3d70d1d55f5de26895" title="Clone the posting source.">clone()</a></em>), and each <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> will be passed one of the sub-databases as the <em>db</em> parameter here. The <em>db</em> parameter will therefore always refer to a single database. All docids passed to, or returned from, the <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> refer to docids in that single database, rather than in the multi-database.
<p>Reimplemented from <a class="el" href="classXapian_1_1ValuePostingSource.html#764328b2a7085e24393a94eb1d2b91e0">Xapian::ValuePostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#abbd9d95d77e2aa947377c44d1bb733c">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<a class="anchor" name="35d0b218fa9db907c36e62d60b900808"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::name" ref="35d0b218fa9db907c36e62d60b900808" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string Xapian::ValueWeightPostingSource::name </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Name of the posting source class.
<p>
This is used when serialising and unserialising posting sources; for example, for performing remote searches.<p>
If the subclass is in a C++ namespace, the namespace should be included in the name, using "::" as a separator. For example, for a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclass called "FooPostingSource" in the "Xapian" namespace the result of this call should be "Xapian::FooPostingSource".<p>
This should only be implemented if <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#1bdc574c2f1c02472a4ec5fee697af87" title="Serialise object parameters into a string.">serialise()</a> and <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#ff018c57b785507a3bba82e85ec7fb63" title="Create object given string serialisation returned by serialise().">unserialise()</a> are also implemented. The default implementation returns an empty string.<p>
If this returns an empty string, <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> will assume that <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#1bdc574c2f1c02472a4ec5fee697af87" title="Serialise object parameters into a string.">serialise()</a> and <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#ff018c57b785507a3bba82e85ec7fb63" title="Create object given string serialisation returned by serialise().">unserialise()</a> are not implemented.
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#7b5c506178f996e59ed641ad62520734">Xapian::PostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#9f1d3ffcfbea32d66ebc690426d9be90">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<a class="anchor" name="1bdc574c2f1c02472a4ec5fee697af87"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::serialise" ref="1bdc574c2f1c02472a4ec5fee697af87" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string Xapian::ValueWeightPostingSource::serialise </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Serialise object parameters into a string.
<p>
The serialised parameters should represent the configuration of the posting source, but need not (indeed, should not) represent the current iteration state.<p>
If you don't want to support the remote backend, you can use the default implementation which simply throws <a class="el" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature.">Xapian::UnimplementedError</a>.
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#6ad26dc173cf1ab175dea945ba2622e0">Xapian::PostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#2d3b48128b61bfd904163706c87065a8">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<a class="anchor" name="ff018c57b785507a3bba82e85ec7fb63"></a><!-- doxytag: member="Xapian::ValueWeightPostingSource::unserialise" ref="ff018c57b785507a3bba82e85ec7fb63" args="(const std::string &s) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classXapian_1_1ValueWeightPostingSource.html">ValueWeightPostingSource</a>* Xapian::ValueWeightPostingSource::unserialise </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"> <em>s</em> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create object given string serialisation returned by <a class="el" href="classXapian_1_1ValueWeightPostingSource.html#1bdc574c2f1c02472a4ec5fee697af87" title="Serialise object parameters into a string.">serialise()</a>.
<p>
Note that the returned object will be deallocated by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> after use with "delete". If you want to handle the deletion in a special way (for example when wrapping the <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> API for use from another language) then you can define a static <code>operator delete</code> method in your subclass as shown here: <a href="http://trac.xapian.org/ticket/554#comment:1">http://trac.xapian.org/ticket/554#comment:1</a><p>
If you don't want to support the remote backend, you can use the default implementation which simply throws <a class="el" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature.">Xapian::UnimplementedError</a>.<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>s</em> </td><td>A serialised instance of this <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an "external" source of postings.">PostingSource</a> subclass. </td></tr>
</table>
</dl>
<p>Reimplemented from <a class="el" href="classXapian_1_1PostingSource.html#b3312a9172b1881c354faf3d2d9b585d">Xapian::PostingSource</a>.</p>
<p>Reimplemented in <a class="el" href="classXapian_1_1DecreasingValueWeightPostingSource.html#5ef4c786055fcfe85ebc99cb98ba8409">Xapian::DecreasingValueWeightPostingSource</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="postingsource_8h.html">postingsource.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>
|