File: classXapian_1_1MultiValueKeyMaker.html

package info (click to toggle)
xapian-core 1.4.3-2%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 21,412 kB
  • sloc: cpp: 113,868; ansic: 8,723; sh: 4,433; perl: 836; makefile: 566; tcl: 317; python: 40
file content (223 lines) | stat: -rw-r--r-- 15,264 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: Xapian::MultiValueKeyMaker 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.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceXapian.html">Xapian</a></li><li class="navelem"><a class="el" href="classXapian_1_1MultiValueKeyMaker.html">MultiValueKeyMaker</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classXapian_1_1MultiValueKeyMaker-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Xapian::MultiValueKeyMaker Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classXapian_1_1KeyMaker.html" title="Virtual base class for key making functors. ">KeyMaker</a> subclass which combines several values.  
 <a href="classXapian_1_1MultiValueKeyMaker.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Xapian::MultiValueKeyMaker:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classXapian_1_1MultiValueKeyMaker__inherit__graph.png" border="0" usemap="#Xapian_1_1MultiValueKeyMaker_inherit__map" alt="Inheritance graph"/></div>
<map name="Xapian_1_1MultiValueKeyMaker_inherit__map" id="Xapian_1_1MultiValueKeyMaker_inherit__map">
<area shape="rect" id="node2" href="classXapian_1_1KeyMaker.html" title="Virtual base class for key making functors. " alt="" coords="36,80,165,107"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5fcff4d5e85b6248a3f12a1806e363f0"><td class="memTemplParams" colspan="2">template&lt;class Iterator &gt; </td></tr>
<tr class="memitem:a5fcff4d5e85b6248a3f12a1806e363f0"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classXapian_1_1MultiValueKeyMaker.html#a5fcff4d5e85b6248a3f12a1806e363f0">MultiValueKeyMaker</a> (Iterator begin, Iterator end)</td></tr>
<tr class="memdesc:a5fcff4d5e85b6248a3f12a1806e363f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1MultiValueKeyMaker.html" title="KeyMaker subclass which combines several values. ">MultiValueKeyMaker</a> from a pair of iterators.  <a href="#a5fcff4d5e85b6248a3f12a1806e363f0">More...</a><br /></td></tr>
<tr class="separator:a5fcff4d5e85b6248a3f12a1806e363f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84575318ca4709ae352dd85dd143cb89"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1MultiValueKeyMaker.html#a84575318ca4709ae352dd85dd143cb89">operator()</a> (const <a class="el" href="classXapian_1_1Document.html">Xapian::Document</a> &amp;doc) const</td></tr>
<tr class="memdesc:a84575318ca4709ae352dd85dd143cb89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Build a key string for a <a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database. ">Document</a>.  <a href="#a84575318ca4709ae352dd85dd143cb89">More...</a><br /></td></tr>
<tr class="separator:a84575318ca4709ae352dd85dd143cb89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72b9cc1caffdf8e6e80f84ec5458dfb4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1MultiValueKeyMaker.html#a72b9cc1caffdf8e6e80f84ec5458dfb4">add_value</a> (<a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot, bool reverse=false, const std::string &amp;defvalue=std::string())</td></tr>
<tr class="memdesc:a72b9cc1caffdf8e6e80f84ec5458dfb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a value slot to the list to build a key from.  <a href="#a72b9cc1caffdf8e6e80f84ec5458dfb4">More...</a><br /></td></tr>
<tr class="separator:a72b9cc1caffdf8e6e80f84ec5458dfb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classXapian_1_1KeyMaker"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classXapian_1_1KeyMaker')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classXapian_1_1KeyMaker.html">Xapian::KeyMaker</a></td></tr>
<tr class="memitem:aa3763f7445b5b20dffa6448ffc9ae0ed inherit pub_methods_classXapian_1_1KeyMaker"><td class="memItemLeft" align="right" valign="top"><a id="aa3763f7445b5b20dffa6448ffc9ae0ed"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1KeyMaker.html#aa3763f7445b5b20dffa6448ffc9ae0ed">KeyMaker</a> ()</td></tr>
<tr class="memdesc:aa3763f7445b5b20dffa6448ffc9ae0ed inherit pub_methods_classXapian_1_1KeyMaker"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:aa3763f7445b5b20dffa6448ffc9ae0ed inherit pub_methods_classXapian_1_1KeyMaker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3536ee93f8588a7af834212e9c09c5f8 inherit pub_methods_classXapian_1_1KeyMaker"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1KeyMaker.html#a3536ee93f8588a7af834212e9c09c5f8">~KeyMaker</a> ()</td></tr>
<tr class="memdesc:a3536ee93f8588a7af834212e9c09c5f8 inherit pub_methods_classXapian_1_1KeyMaker"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor, because we have virtual methods.  <a href="classXapian_1_1KeyMaker.html#a3536ee93f8588a7af834212e9c09c5f8">More...</a><br /></td></tr>
<tr class="separator:a3536ee93f8588a7af834212e9c09c5f8 inherit pub_methods_classXapian_1_1KeyMaker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad019353dd72092c94f0b4f806c9ee459 inherit pub_methods_classXapian_1_1KeyMaker"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classXapian_1_1KeyMaker.html">KeyMaker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1KeyMaker.html#ad019353dd72092c94f0b4f806c9ee459">release</a> ()</td></tr>
<tr class="memdesc:ad019353dd72092c94f0b4f806c9ee459 inherit pub_methods_classXapian_1_1KeyMaker"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start reference counting this object.  <a href="classXapian_1_1KeyMaker.html#ad019353dd72092c94f0b4f806c9ee459">More...</a><br /></td></tr>
<tr class="separator:ad019353dd72092c94f0b4f806c9ee459 inherit pub_methods_classXapian_1_1KeyMaker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15f7acf60481c6e1efec2919acd933a5 inherit pub_methods_classXapian_1_1KeyMaker"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classXapian_1_1KeyMaker.html">KeyMaker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1KeyMaker.html#a15f7acf60481c6e1efec2919acd933a5">release</a> () const</td></tr>
<tr class="memdesc:a15f7acf60481c6e1efec2919acd933a5 inherit pub_methods_classXapian_1_1KeyMaker"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start reference counting this object.  <a href="classXapian_1_1KeyMaker.html#a15f7acf60481c6e1efec2919acd933a5">More...</a><br /></td></tr>
<tr class="separator:a15f7acf60481c6e1efec2919acd933a5 inherit pub_methods_classXapian_1_1KeyMaker"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classXapian_1_1KeyMaker.html" title="Virtual base class for key making functors. ">KeyMaker</a> subclass which combines several values. </p>
<p>When the result is used for sorting, results are ordered by the first value. In the event of a tie, the second is used. If this is the same for both, the third is used, and so on. If <em>reverse</em> is true for a value, then the sort order for that value is reversed.</p>
<p>When used for collapsing, the documents will only be considered equal if all the values specified match. If none of the specified values are set then the generated key will be empty, so such documents won't be collapsed (which is consistent with the behaviour in the "collapse on a value" case). If you'd prefer that documents with none of the keys set are collapsed together, then you can set <em>reverse</em> for at least one of the values. Other than this, it isn't useful to set <em>reverse</em> for collapsing. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a5fcff4d5e85b6248a3f12a1806e363f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5fcff4d5e85b6248a3f12a1806e363f0">&#9670;&nbsp;</a></span>MultiValueKeyMaker()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Iterator &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::MultiValueKeyMaker::MultiValueKeyMaker </td>
          <td>(</td>
          <td class="paramtype">Iterator&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Iterator&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="classXapian_1_1MultiValueKeyMaker.html" title="KeyMaker subclass which combines several values. ">MultiValueKeyMaker</a> from a pair of iterators. </p>
<p>The iterators must be a begin/end pair returning <a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea" title="The number for a value slot in a document. ">Xapian::valueno</a> (or a compatible type) when dereferenced. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a72b9cc1caffdf8e6e80f84ec5458dfb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72b9cc1caffdf8e6e80f84ec5458dfb4">&#9670;&nbsp;</a></span>add_value()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::MultiValueKeyMaker::add_value </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#a94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a>&#160;</td>
          <td class="paramname"><em>slot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reverse</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>defvalue</em> = <code>std::string()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add a value slot to the list to build a key from. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">slot</td><td>The value slot to add </td></tr>
    <tr><td class="paramname">reverse</td><td>Adjust values from this slot to reverse their sort order (default: false) </td></tr>
    <tr><td class="paramname">defvalue</td><td>Value to use for documents which don't have a value set in this slot (default: empty). This can be used to make such documents sort after all others by passing <code>get_value_upper_bound(slot) + "x"</code><ul>
<li>this is guaranteed to be greater than any value in this slot. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a84575318ca4709ae352dd85dd143cb89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84575318ca4709ae352dd85dd143cb89">&#9670;&nbsp;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string Xapian::MultiValueKeyMaker::operator() </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classXapian_1_1Document.html">Xapian::Document</a> &amp;&#160;</td>
          <td class="paramname"><em>doc</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Build a key string for a <a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database. ">Document</a>. </p>
<p>These keys can be used for sorting or collapsing matching documents.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td><a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database. ">Document</a> object to build a key for. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classXapian_1_1KeyMaker.html#acd0a775f8546a830833357e5d792bedc">Xapian::KeyMaker</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="keymaker_8h.html">keymaker.h</a></li>
</ul>
</div><!-- contents -->
<hr>
<address><small>
Documentation for Xapian (version 1.4.3).<br>
Generated on Wed Jan 25 2017 by
<a href="http://www.doxygen.org/">Doxygen 1.8.13</a>.
</small></address>
</body>
</html>