Debian Codegraph @

doc/api/classkyotocabinet_1_1BasicDB_1_1Cursor.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Kyoto Cabinet: kyotocabinet::BasicDB::Cursor Class Reference</title>
7
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10
11
12
13 </head>
14 <body>
15 <div id="top"><!-- do not remove this div! -->
16
17
18 <div id="titlearea">
19 <table cellspacing="0" cellpadding="0">
20 <tbody>
21 <tr style="height: 56px;">
22
23
24 <td style="padding-left: 0.5em;">
25 <div id="projectname">Kyoto Cabinet
26
27 </div>
28
29 </td>
30
31
32
33 </tr>
34 </tbody>
35 </table>
36 </div>
37
38 <!-- Generated by Doxygen 1.7.6.1 -->
39 <div id="navrow1" class="tabs">
40 <ul class="tablist">
41 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
43 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
44 <li><a href="files.html"><span>Files</span></a></li>
45 </ul>
46 </div>
47 <div id="navrow2" class="tabs2">
48 <ul class="tablist">
49 <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
50 <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
51 <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
52 <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
53 </ul>
54 </div>
55 <div id="nav-path" class="navpath">
56 <ul>
57 <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a> </li>
58 <li class="navelem"><a class="el" href="classkyotocabinet_1_1BasicDB.html">BasicDB</a> </li>
59 <li class="navelem"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html">Cursor</a> </li>
60 </ul>
61 </div>
62 </div>
63 <div class="header">
64 <div class="summary">
65 <a href="#pub-methods">Public Member Functions</a> </div>
66 <div class="headertitle">
67 <div class="title">kyotocabinet::BasicDB::Cursor Class Reference</div> </div>
68 </div><!--header-->
69 <div class="contents">
70 <!-- doxytag: class="kyotocabinet::BasicDB::Cursor" --><!-- doxytag: inherits="kyotocabinet::DB::Cursor" -->
71 <p>Interface of cursor to indicate a record.
72 <a href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#details">More...</a></p>
73
74 <p><code>#include &lt;kcdb.h&gt;</code></p>
75
76 <p><a href="classkyotocabinet_1_1BasicDB_1_1Cursor-members.html">List of all members.</a></p>
77 <table class="memberdecls">
78 <tr><td colspan="2"><h2><a name="pub-methods"></a>
79 Public Member Functions</h2></td></tr>
80 <tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a0e93160f1599c0063b6db4226216cfb3">~Cursor</a> ()</td></tr>
81 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a0e93160f1599c0063b6db4226216cfb3"></a><br/></td></tr>
82 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#afcefc06f76d1790461d25dcebb09e5a2">set_value</a> (const char *vbuf, size_t vsiz, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
83 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of the current record. <a href="#afcefc06f76d1790461d25dcebb09e5a2"></a><br/></td></tr>
84 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#ad75b1a84559d4b11077415e3c414166d">set_value_str</a> (const std::string &amp;value, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
85 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of the current record. <a href="#ad75b1a84559d4b11077415e3c414166d"></a><br/></td></tr>
86 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a4ff900ef9fcb20caeafc00f667cd9b43">remove</a> ()</td></tr>
87 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the current record. <a href="#a4ff900ef9fcb20caeafc00f667cd9b43"></a><br/></td></tr>
88 <tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a7777ed7c57ee0a3ad26ed14a4edbade0">get_key</a> (size_t *sp, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
89 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the key of the current record. <a href="#a7777ed7c57ee0a3ad26ed14a4edbade0"></a><br/></td></tr>
90 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a6867118e1328d3d1fed377b9905114a1">get_key</a> (std::string *key, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
91 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the key of the current record. <a href="#a6867118e1328d3d1fed377b9905114a1"></a><br/></td></tr>
92 <tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#abb9c95de012fd7d74d9656ef76110ea1">get_value</a> (size_t *sp, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
93 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of the current record. <a href="#abb9c95de012fd7d74d9656ef76110ea1"></a><br/></td></tr>
94 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#abf0e4f52cc050d6c73cb99bb6b43a8de">get_value</a> (std::string *value, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
95 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of the current record. <a href="#abf0e4f52cc050d6c73cb99bb6b43a8de"></a><br/></td></tr>
96 <tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a2701fe0ced7c75d4da882722cb8ed8c8">get</a> (size_t *ksp, const char **vbp, size_t *vsp, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
97 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pair of the key and the value of the current record. <a href="#a2701fe0ced7c75d4da882722cb8ed8c8"></a><br/></td></tr>
98 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#aac09279d88c1e05e636f3711a3e170ad">get</a> (std::string *key, std::string *value, bool <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">step</a>=false)</td></tr>
99 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pair of the key and the value of the current record. <a href="#aac09279d88c1e05e636f3711a3e170ad"></a><br/></td></tr>
100 <tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a06f91cc41a0a6e9da0cbfafbbe324732">seize</a> (size_t *ksp, const char **vbp, size_t *vsp)</td></tr>
101 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pair of the key and the value of the current record and remove it atomically. <a href="#a06f91cc41a0a6e9da0cbfafbbe324732"></a><br/></td></tr>
102 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a64dac43b02487f56bd41560fb2e9d965">seize</a> (std::string *key, std::string *value)</td></tr>
103 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pair of the key and the value of the current record and remove it atomically. <a href="#a64dac43b02487f56bd41560fb2e9d965"></a><br/></td></tr>
104 <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classkyotocabinet_1_1BasicDB.html">BasicDB</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a79e3904e5b10ed3d356545ed4259160e">db</a> ()=0</td></tr>
105 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the database object. <a href="#a79e3904e5b10ed3d356545ed4259160e"></a><br/></td></tr>
106 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Error.html">Error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#acdf0c146386e8d9c4c55b6512401a33a">error</a> ()</td></tr>
107 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the last happened error. <a href="#acdf0c146386e8d9c4c55b6512401a33a"></a><br/></td></tr>
108 </table>
109 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
110 <div class="textblock"><p>Interface of cursor to indicate a record. </p>
111 </div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
112 <a class="anchor" id="a0e93160f1599c0063b6db4226216cfb3"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::~Cursor" ref="a0e93160f1599c0063b6db4226216cfb3" args="()" -->
113 <div class="memitem">
114 <div class="memproto">
115 <table class="memname">
116 <tr>
117 <td class="memname">virtual <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a0e93160f1599c0063b6db4226216cfb3">kyotocabinet::BasicDB::Cursor::~Cursor</a> </td>
118 <td>(</td>
119 <td class="paramname"></td><td>)</td>
120 <td><code> [virtual]</code></td>
121 </tr>
122 </table>
123 </div>
124 <div class="memdoc">
125
126 <p>Destructor. </p>
127
128 <p>Reimplemented from <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a9ac267ce1fd4ce75fd5e69604f815032">kyotocabinet::DB::Cursor</a>.</p>
129
130 <p>Reimplemented in <a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a38d9242a0fcf2aba06792dc3dbbd9adb">kyotocabinet::HashDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1PlantDB_1_1Cursor.html#a6714f26c323848a3555dff7bada533d6">kyotocabinet::PlantDB&lt; BASEDB, DBTYPE &gt;::Cursor</a>, <a class="el" href="classkyotocabinet_1_1DirDB_1_1Cursor.html#ad2f8d403c52c56f5e89af9bd76becb2e">kyotocabinet::DirDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1CacheDB_1_1Cursor.html#a8b67ecadd10bef6445e2feb1ef40771a">kyotocabinet::CacheDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1StashDB_1_1Cursor.html#a8cee3c9907e5b73b9fd8ac18c728d2dd">kyotocabinet::StashDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1ProtoDB_1_1Cursor.html#a633ee3cb02f483f94fbaee6100c958d2">kyotocabinet::ProtoDB&lt; STRMAP, DBTYPE &gt;::Cursor</a>, <a class="el" href="classkyotocabinet_1_1PolyDB_1_1Cursor.html#af937f24b8e80a33a5766f82cf4711aff">kyotocabinet::PolyDB::Cursor</a>, and <a class="el" href="classkyotocabinet_1_1TextDB_1_1Cursor.html#a1a1a0985e52e2bacd25ddce6912d2d74">kyotocabinet::TextDB::Cursor</a>.</p>
131
132 </div>
133 </div>
134 <hr/><h2>Member Function Documentation</h2>
135 <a class="anchor" id="afcefc06f76d1790461d25dcebb09e5a2"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::set_value" ref="afcefc06f76d1790461d25dcebb09e5a2" args="(const char *vbuf, size_t vsiz, bool step=false)" -->
136 <div class="memitem">
137 <div class="memproto">
138 <table class="memname">
139 <tr>
140 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#afcefc06f76d1790461d25dcebb09e5a2">kyotocabinet::BasicDB::Cursor::set_value</a> </td>
141 <td>(</td>
142 <td class="paramtype">const char *&#160;</td>
143 <td class="paramname"><em>vbuf</em>, </td>
144 </tr>
145 <tr>
146 <td class="paramkey"></td>
147 <td></td>
148 <td class="paramtype">size_t&#160;</td>
149 <td class="paramname"><em>vsiz</em>, </td>
150 </tr>
151 <tr>
152 <td class="paramkey"></td>
153 <td></td>
154 <td class="paramtype">bool&#160;</td>
155 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
156 </tr>
157 <tr>
158 <td></td>
159 <td>)</td>
160 <td></td><td><code> [virtual]</code></td>
161 </tr>
162 </table>
163 </div>
164 <div class="memdoc">
165
166 <p>Set the value of the current record. </p>
167 <dl class="params"><dt><b>Parameters:</b></dt><dd>
168 <table class="params">
169 <tr><td class="paramname">vbuf</td><td>the pointer to the value region. </td></tr>
170 <tr><td class="paramname">vsiz</td><td>the size of the value region. </td></tr>
171 <tr><td class="paramname">step</td><td>true to move the cursor to the next record, or false for no move. </td></tr>
172 </table>
173 </dd>
174 </dl>
175 <dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
176
177 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a4d1ff14d0a9035df80ea2f9960fe96b2">kyotocabinet::DB::Cursor</a>.</p>
178
179 </div>
180 </div>
181 <a class="anchor" id="ad75b1a84559d4b11077415e3c414166d"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::set_value_str" ref="ad75b1a84559d4b11077415e3c414166d" args="(const std::string &amp;value, bool step=false)" -->
182 <div class="memitem">
183 <div class="memproto">
184 <table class="memname">
185 <tr>
186 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#ad75b1a84559d4b11077415e3c414166d">kyotocabinet::BasicDB::Cursor::set_value_str</a> </td>
187 <td>(</td>
188 <td class="paramtype">const std::string &amp;&#160;</td>
189 <td class="paramname"><em>value</em>, </td>
190 </tr>
191 <tr>
192 <td class="paramkey"></td>
193 <td></td>
194 <td class="paramtype">bool&#160;</td>
195 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
196 </tr>
197 <tr>
198 <td></td>
199 <td>)</td>
200 <td></td><td><code> [virtual]</code></td>
201 </tr>
202 </table>
203 </div>
204 <div class="memdoc">
205
206 <p>Set the value of the current record. </p>
207 <dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#afcefc06f76d1790461d25dcebb09e5a2" title="Set the value of the current record.">Cursor::set_value</a> method except that the parameter is std::string. </dd></dl>
208
209 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a1c740a07c7f15893bf5933cd6bd5e036">kyotocabinet::DB::Cursor</a>.</p>
210
211 </div>
212 </div>
213 <a class="anchor" id="a4ff900ef9fcb20caeafc00f667cd9b43"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::remove" ref="a4ff900ef9fcb20caeafc00f667cd9b43" args="()" -->
214 <div class="memitem">
215 <div class="memproto">
216 <table class="memname">
217 <tr>
218 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a4ff900ef9fcb20caeafc00f667cd9b43">kyotocabinet::BasicDB::Cursor::remove</a> </td>
219 <td>(</td>
220 <td class="paramname"></td><td>)</td>
221 <td><code> [virtual]</code></td>
222 </tr>
223 </table>
224 </div>
225 <div class="memdoc">
226
227 <p>Remove the current record. </p>
228 <dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl>
229 <dl class="note"><dt><b>Note:</b></dt><dd>If no record corresponds to the key, false is returned. The cursor is moved to the next record implicitly. </dd></dl>
230
231 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a96259c03f1caeb5b475d49a87bde8efb">kyotocabinet::DB::Cursor</a>.</p>
232
233 </div>
234 </div>
235 <a class="anchor" id="a7777ed7c57ee0a3ad26ed14a4edbade0"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::get_key" ref="a7777ed7c57ee0a3ad26ed14a4edbade0" args="(size_t *sp, bool step=false)" -->
236 <div class="memitem">
237 <div class="memproto">
238 <table class="memname">
239 <tr>
240 <td class="memname">char* <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a7777ed7c57ee0a3ad26ed14a4edbade0">kyotocabinet::BasicDB::Cursor::get_key</a> </td>
241 <td>(</td>
242 <td class="paramtype">size_t *&#160;</td>
243 <td class="paramname"><em>sp</em>, </td>
244 </tr>
245 <tr>
246 <td class="paramkey"></td>
247 <td></td>
248 <td class="paramtype">bool&#160;</td>
249 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
250 </tr>
251 <tr>
252 <td></td>
253 <td>)</td>
254 <td></td><td><code> [virtual]</code></td>
255 </tr>
256 </table>
257 </div>
258 <div class="memdoc">
259
260 <p>Get the key of the current record. </p>
261 <dl class="params"><dt><b>Parameters:</b></dt><dd>
262 <table class="params">
263 <tr><td class="paramname">sp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
264 <tr><td class="paramname">step</td><td>true to move the cursor to the next record, or false for no move. </td></tr>
265 </table>
266 </dd>
267 </dl>
268 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the key region of the current record, or NULL on failure. </dd></dl>
269 <dl class="note"><dt><b>Note:</b></dt><dd>If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use. </dd></dl>
270
271 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#aec52b1f02b71222f90c5e1dcaf6f38d7">kyotocabinet::DB::Cursor</a>.</p>
272
273 </div>
274 </div>
275 <a class="anchor" id="a6867118e1328d3d1fed377b9905114a1"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::get_key" ref="a6867118e1328d3d1fed377b9905114a1" args="(std::string *key, bool step=false)" -->
276 <div class="memitem">
277 <div class="memproto">
278 <table class="memname">
279 <tr>
280 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a7777ed7c57ee0a3ad26ed14a4edbade0">kyotocabinet::BasicDB::Cursor::get_key</a> </td>
281 <td>(</td>
282 <td class="paramtype">std::string *&#160;</td>
283 <td class="paramname"><em>key</em>, </td>
284 </tr>
285 <tr>
286 <td class="paramkey"></td>
287 <td></td>
288 <td class="paramtype">bool&#160;</td>
289 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
290 </tr>
291 <tr>
292 <td></td>
293 <td>)</td>
294 <td></td><td><code> [virtual]</code></td>
295 </tr>
296 </table>
297 </div>
298 <div class="memdoc">
299
300 <p>Get the key of the current record. </p>
301 <dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a7777ed7c57ee0a3ad26ed14a4edbade0" title="Get the key of the current record.">Cursor::get_key</a> method except that a parameter is a string to contain the result and the return value is bool for success. </dd></dl>
302
303 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a2ac5f1212cc9b9dcddad1c591b44d2e2">kyotocabinet::DB::Cursor</a>.</p>
304
305 </div>
306 </div>
307 <a class="anchor" id="abb9c95de012fd7d74d9656ef76110ea1"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::get_value" ref="abb9c95de012fd7d74d9656ef76110ea1" args="(size_t *sp, bool step=false)" -->
308 <div class="memitem">
309 <div class="memproto">
310 <table class="memname">
311 <tr>
312 <td class="memname">char* <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#abb9c95de012fd7d74d9656ef76110ea1">kyotocabinet::BasicDB::Cursor::get_value</a> </td>
313 <td>(</td>
314 <td class="paramtype">size_t *&#160;</td>
315 <td class="paramname"><em>sp</em>, </td>
316 </tr>
317 <tr>
318 <td class="paramkey"></td>
319 <td></td>
320 <td class="paramtype">bool&#160;</td>
321 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
322 </tr>
323 <tr>
324 <td></td>
325 <td>)</td>
326 <td></td><td><code> [virtual]</code></td>
327 </tr>
328 </table>
329 </div>
330 <div class="memdoc">
331
332 <p>Get the value of the current record. </p>
333 <dl class="params"><dt><b>Parameters:</b></dt><dd>
334 <table class="params">
335 <tr><td class="paramname">sp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
336 <tr><td class="paramname">step</td><td>true to move the cursor to the next record, or false for no move. </td></tr>
337 </table>
338 </dd>
339 </dl>
340 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the value region of the current record, or NULL on failure. </dd></dl>
341 <dl class="note"><dt><b>Note:</b></dt><dd>If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use. </dd></dl>
342
343 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#aa00f9d9f984a17dcb8d24bbacaf573af">kyotocabinet::DB::Cursor</a>.</p>
344
345 </div>
346 </div>
347 <a class="anchor" id="abf0e4f52cc050d6c73cb99bb6b43a8de"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::get_value" ref="abf0e4f52cc050d6c73cb99bb6b43a8de" args="(std::string *value, bool step=false)" -->
348 <div class="memitem">
349 <div class="memproto">
350 <table class="memname">
351 <tr>
352 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#abb9c95de012fd7d74d9656ef76110ea1">kyotocabinet::BasicDB::Cursor::get_value</a> </td>
353 <td>(</td>
354 <td class="paramtype">std::string *&#160;</td>
355 <td class="paramname"><em>value</em>, </td>
356 </tr>
357 <tr>
358 <td class="paramkey"></td>
359 <td></td>
360 <td class="paramtype">bool&#160;</td>
361 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
362 </tr>
363 <tr>
364 <td></td>
365 <td>)</td>
366 <td></td><td><code> [virtual]</code></td>
367 </tr>
368 </table>
369 </div>
370 <div class="memdoc">
371
372 <p>Get the value of the current record. </p>
373 <dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#abb9c95de012fd7d74d9656ef76110ea1" title="Get the value of the current record.">Cursor::get_value</a> method except that a parameter is a string to contain the result and the return value is bool for success. </dd></dl>
374
375 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a93c30a739b1ece495ee0c43d87d1525d">kyotocabinet::DB::Cursor</a>.</p>
376
377 </div>
378 </div>
379 <a class="anchor" id="a2701fe0ced7c75d4da882722cb8ed8c8"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::get" ref="a2701fe0ced7c75d4da882722cb8ed8c8" args="(size_t *ksp, const char **vbp, size_t *vsp, bool step=false)" -->
380 <div class="memitem">
381 <div class="memproto">
382 <table class="memname">
383 <tr>
384 <td class="memname">char* <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a2701fe0ced7c75d4da882722cb8ed8c8">kyotocabinet::BasicDB::Cursor::get</a> </td>
385 <td>(</td>
386 <td class="paramtype">size_t *&#160;</td>
387 <td class="paramname"><em>ksp</em>, </td>
388 </tr>
389 <tr>
390 <td class="paramkey"></td>
391 <td></td>
392 <td class="paramtype">const char **&#160;</td>
393 <td class="paramname"><em>vbp</em>, </td>
394 </tr>
395 <tr>
396 <td class="paramkey"></td>
397 <td></td>
398 <td class="paramtype">size_t *&#160;</td>
399 <td class="paramname"><em>vsp</em>, </td>
400 </tr>
401 <tr>
402 <td class="paramkey"></td>
403 <td></td>
404 <td class="paramtype">bool&#160;</td>
405 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
406 </tr>
407 <tr>
408 <td></td>
409 <td>)</td>
410 <td></td><td><code> [virtual]</code></td>
411 </tr>
412 </table>
413 </div>
414 <div class="memdoc">
415
416 <p>Get a pair of the key and the value of the current record. </p>
417 <dl class="params"><dt><b>Parameters:</b></dt><dd>
418 <table class="params">
419 <tr><td class="paramname">ksp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
420 <tr><td class="paramname">vbp</td><td>the pointer to the variable into which the pointer to the value region is assigned. </td></tr>
421 <tr><td class="paramname">vsp</td><td>the pointer to the variable into which the size of the value region is assigned. </td></tr>
422 <tr><td class="paramname">step</td><td>true to move the cursor to the next record, or false for no move. </td></tr>
423 </table>
424 </dd>
425 </dl>
426 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the key region, or NULL on failure. </dd></dl>
427 <dl class="note"><dt><b>Note:</b></dt><dd>If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of each region of the key and the value, each region can be treated as a C-style string. The return value should be deleted explicitly by the caller with the detele[] operator. </dd></dl>
428
429 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a556bb019a558a6279e4778361e889289">kyotocabinet::DB::Cursor</a>.</p>
430
431 </div>
432 </div>
433 <a class="anchor" id="aac09279d88c1e05e636f3711a3e170ad"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::get" ref="aac09279d88c1e05e636f3711a3e170ad" args="(std::string *key, std::string *value, bool step=false)" -->
434 <div class="memitem">
435 <div class="memproto">
436 <table class="memname">
437 <tr>
438 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a2701fe0ced7c75d4da882722cb8ed8c8">kyotocabinet::BasicDB::Cursor::get</a> </td>
439 <td>(</td>
440 <td class="paramtype">std::string *&#160;</td>
441 <td class="paramname"><em>key</em>, </td>
442 </tr>
443 <tr>
444 <td class="paramkey"></td>
445 <td></td>
446 <td class="paramtype">std::string *&#160;</td>
447 <td class="paramname"><em>value</em>, </td>
448 </tr>
449 <tr>
450 <td class="paramkey"></td>
451 <td></td>
452 <td class="paramtype">bool&#160;</td>
453 <td class="paramname"><em>step</em> = <code>false</code>&#160;</td>
454 </tr>
455 <tr>
456 <td></td>
457 <td>)</td>
458 <td></td><td><code> [virtual]</code></td>
459 </tr>
460 </table>
461 </div>
462 <div class="memdoc">
463
464 <p>Get a pair of the key and the value of the current record. </p>
465 <dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a2701fe0ced7c75d4da882722cb8ed8c8" title="Get a pair of the key and the value of the current record.">Cursor::get</a> method except that parameters are strings to contain the result and the return value is bool for success. </dd></dl>
466
467 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a71ed167fd7beb149d110c3eed43be108">kyotocabinet::DB::Cursor</a>.</p>
468
469 </div>
470 </div>
471 <a class="anchor" id="a06f91cc41a0a6e9da0cbfafbbe324732"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::seize" ref="a06f91cc41a0a6e9da0cbfafbbe324732" args="(size_t *ksp, const char **vbp, size_t *vsp)" -->
472 <div class="memitem">
473 <div class="memproto">
474 <table class="memname">
475 <tr>
476 <td class="memname">char* <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a06f91cc41a0a6e9da0cbfafbbe324732">kyotocabinet::BasicDB::Cursor::seize</a> </td>
477 <td>(</td>
478 <td class="paramtype">size_t *&#160;</td>
479 <td class="paramname"><em>ksp</em>, </td>
480 </tr>
481 <tr>
482 <td class="paramkey"></td>
483 <td></td>
484 <td class="paramtype">const char **&#160;</td>
485 <td class="paramname"><em>vbp</em>, </td>
486 </tr>
487 <tr>
488 <td class="paramkey"></td>
489 <td></td>
490 <td class="paramtype">size_t *&#160;</td>
491 <td class="paramname"><em>vsp</em>&#160;</td>
492 </tr>
493 <tr>
494 <td></td>
495 <td>)</td>
496 <td></td><td></td>
497 </tr>
498 </table>
499 </div>
500 <div class="memdoc">
501
502 <p>Get a pair of the key and the value of the current record and remove it atomically. </p>
503 <dl class="params"><dt><b>Parameters:</b></dt><dd>
504 <table class="params">
505 <tr><td class="paramname">ksp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
506 <tr><td class="paramname">vbp</td><td>the pointer to the variable into which the pointer to the value region is assigned. </td></tr>
507 <tr><td class="paramname">vsp</td><td>the pointer to the variable into which the size of the value region is assigned. </td></tr>
508 </table>
509 </dd>
510 </dl>
511 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the key region, or NULL on failure. </dd></dl>
512 <dl class="note"><dt><b>Note:</b></dt><dd>If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of each region of the key and the value, each region can be treated as a C-style string. The return value should be deleted explicitly by the caller with the detele[] operator. The cursor is moved to the next record implicitly. </dd></dl>
513
514 </div>
515 </div>
516 <a class="anchor" id="a64dac43b02487f56bd41560fb2e9d965"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::seize" ref="a64dac43b02487f56bd41560fb2e9d965" args="(std::string *key, std::string *value)" -->
517 <div class="memitem">
518 <div class="memproto">
519 <table class="memname">
520 <tr>
521 <td class="memname">bool <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a06f91cc41a0a6e9da0cbfafbbe324732">kyotocabinet::BasicDB::Cursor::seize</a> </td>
522 <td>(</td>
523 <td class="paramtype">std::string *&#160;</td>
524 <td class="paramname"><em>key</em>, </td>
525 </tr>
526 <tr>
527 <td class="paramkey"></td>
528 <td></td>
529 <td class="paramtype">std::string *&#160;</td>
530 <td class="paramname"><em>value</em>&#160;</td>
531 </tr>
532 <tr>
533 <td></td>
534 <td>)</td>
535 <td></td><td></td>
536 </tr>
537 </table>
538 </div>
539 <div class="memdoc">
540
541 <p>Get a pair of the key and the value of the current record and remove it atomically. </p>
542 <dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a06f91cc41a0a6e9da0cbfafbbe324732" title="Get a pair of the key and the value of the current record and remove it atomically.">Cursor::seize</a> method except that parameters are strings to contain the result and the return value is bool for success. </dd></dl>
543
544 </div>
545 </div>
546 <a class="anchor" id="a79e3904e5b10ed3d356545ed4259160e"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::db" ref="a79e3904e5b10ed3d356545ed4259160e" args="()=0" -->
547 <div class="memitem">
548 <div class="memproto">
549 <table class="memname">
550 <tr>
551 <td class="memname">virtual <a class="el" href="classkyotocabinet_1_1BasicDB.html">BasicDB</a>* <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a79e3904e5b10ed3d356545ed4259160e">kyotocabinet::BasicDB::Cursor::db</a> </td>
552 <td>(</td>
553 <td class="paramname"></td><td>)</td>
554 <td><code> [pure virtual]</code></td>
555 </tr>
556 </table>
557 </div>
558 <div class="memdoc">
559
560 <p>Get the database object. </p>
561 <dl class="return"><dt><b>Returns:</b></dt><dd>the database object. </dd></dl>
562
563 <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a20b908092afa13830cf18fd19ac19ef2">kyotocabinet::DB::Cursor</a>.</p>
564
565 <p>Implemented in <a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#af4c7afcf214e27b4443a4b8a2bf10e98">kyotocabinet::HashDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1PlantDB_1_1Cursor.html#a5b1ae804863c879191b39fc432ac4e91">kyotocabinet::PlantDB&lt; BASEDB, DBTYPE &gt;::Cursor</a>, <a class="el" href="classkyotocabinet_1_1DirDB_1_1Cursor.html#ac0836d0d5f9698adc2b877635519e8cd">kyotocabinet::DirDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1CacheDB_1_1Cursor.html#a53297e2dc505eca116e97e5419686279">kyotocabinet::CacheDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1ProtoDB_1_1Cursor.html#a4fb26a2e77eafff88624c4b327a08c2c">kyotocabinet::ProtoDB&lt; STRMAP, DBTYPE &gt;::Cursor</a>, <a class="el" href="classkyotocabinet_1_1StashDB_1_1Cursor.html#a5e8436056db9fc5d20c643a745a606ac">kyotocabinet::StashDB::Cursor</a>, <a class="el" href="classkyotocabinet_1_1TextDB_1_1Cursor.html#a38e8f7defb5a7eab2ea34ff3e22e4970">kyotocabinet::TextDB::Cursor</a>, and <a class="el" href="classkyotocabinet_1_1PolyDB_1_1Cursor.html#a9adb3e84f317deba37effc1ddc6bf9fd">kyotocabinet::PolyDB::Cursor</a>.</p>
566
567 </div>
568 </div>
569 <a class="anchor" id="acdf0c146386e8d9c4c55b6512401a33a"></a><!-- doxytag: member="kyotocabinet::BasicDB::Cursor::error" ref="acdf0c146386e8d9c4c55b6512401a33a" args="()" -->
570 <div class="memitem">
571 <div class="memproto">
572 <table class="memname">
573 <tr>
574 <td class="memname"><a class="el" href="classkyotocabinet_1_1BasicDB_1_1Error.html">Error</a> <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#acdf0c146386e8d9c4c55b6512401a33a">kyotocabinet::BasicDB::Cursor::error</a> </td>
575 <td>(</td>
576 <td class="paramname"></td><td>)</td>
577 <td></td>
578 </tr>
579 </table>
580 </div>
581 <div class="memdoc">
582
583 <p>Get the last happened error. </p>
584 <dl class="return"><dt><b>Returns:</b></dt><dd>the last happened error. </dd></dl>
585
586 </div>
587 </div>
588 </div><!-- contents -->
589
590
591 <hr class="footer"/><address class="footer"><small>
592 Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by &#160;<a href="http://www.doxygen.org/index.html">
593 <img class="footer" src="doxygen.png" alt="doxygen"/>
594 </a> 1.7.6.1
595 </small></address>
596
597 </body>
598 </html>