<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Kyoto Cabinet: kyotocabinet::HashDB::Cursor Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</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="namespacekyotocabinet.html">kyotocabinet</a>::<a class="el" href="classkyotocabinet_1_1HashDB.html">HashDB</a>::<a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html">Cursor</a> </div> </div> <div class="contents"> <h1>kyotocabinet::HashDB::Cursor Class Reference</h1><!-- doxytag: class="kyotocabinet::HashDB::Cursor" --><!-- doxytag: inherits="kyotocabinet::BasicDB::Cursor" --> <p><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html" title="Cursor to indicate a record.">Cursor</a> to indicate a record. <a href="#_details">More...</a></p> <p><code>#include <kchashdb.h></code></p> <p><a href="classkyotocabinet_1_1HashDB_1_1Cursor-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#abf97e31b2a8bdb84a54c841ad9ad59c2">Cursor</a> (<a class="el" href="classkyotocabinet_1_1HashDB.html">HashDB</a> *db)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#abf97e31b2a8bdb84a54c841ad9ad59c2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a38d9242a0fcf2aba06792dc3dbbd9adb">~Cursor</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a38d9242a0fcf2aba06792dc3dbbd9adb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a9c424b101ee48c420a58606276329985">accept</a> (<a class="el" href="classkyotocabinet_1_1DB_1_1Visitor.html">Visitor</a> *visitor, bool writable=true, bool step=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Accept a visitor to the current record. <a href="#a9c424b101ee48c420a58606276329985"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a03005070904126aa6fc5748ebd969c49">jump</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Jump the cursor to the first record for forward scan. <a href="#a03005070904126aa6fc5748ebd969c49"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#afec2985958ef7fba9110a7b3ee65f2d3">jump</a> (const char *kbuf, size_t ksiz)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Jump the cursor to a record for forward scan. <a href="#afec2985958ef7fba9110a7b3ee65f2d3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a1692879476b86e0c3a1ba2be109c53dd">jump</a> (const std::string &key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Jump the cursor to a record for forward scan. <a href="#a1692879476b86e0c3a1ba2be109c53dd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a3fde297c2bcf0f7fe3d1cea846d0903f">jump_back</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Jump the cursor to the last record for backward scan. <a href="#a3fde297c2bcf0f7fe3d1cea846d0903f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#afbcccb698b6defa457bcd1d0cf141a4a">jump_back</a> (const char *kbuf, size_t ksiz)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Jump the cursor to a record for backward scan. <a href="#afbcccb698b6defa457bcd1d0cf141a4a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a51d7b4425af638cecdcacdc2550be177">jump_back</a> (const std::string &key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Jump the cursor to a record for backward scan. <a href="#a51d7b4425af638cecdcacdc2550be177"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a7f4be9cb599712b69ee71b1da65ef8f3">step</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Step the cursor to the next record. <a href="#a7f4be9cb599712b69ee71b1da65ef8f3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#afdc1941834599cfa941b6054bc031a05">step_back</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Step the cursor to the previous record. <a href="#afdc1941834599cfa941b6054bc031a05"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classkyotocabinet_1_1HashDB.html">HashDB</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#af4c7afcf214e27b4443a4b8a2bf10e98">db</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the database object. <a href="#af4c7afcf214e27b4443a4b8a2bf10e98"></a><br/></td></tr> <tr><td colspan="2"><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63b5f33030164da54209b08b8bfb604a"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::HashDB" ref="a63b5f33030164da54209b08b8bfb604a" args="" --> class </td><td class="memItemRight" valign="bottom"><b>HashDB</b></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p><a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html" title="Cursor to indicate a record.">Cursor</a> to indicate a record. </p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="abf97e31b2a8bdb84a54c841ad9ad59c2"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::Cursor" ref="abf97e31b2a8bdb84a54c841ad9ad59c2" args="(HashDB *db)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">kyotocabinet::HashDB::Cursor::Cursor </td> <td>(</td> <td class="paramtype"><a class="el" href="classkyotocabinet_1_1HashDB.html">HashDB</a> * </td> <td class="paramname"> <em>db</em></td> <td> ) </td> <td><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor. </p> <dl><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 container database object. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a38d9242a0fcf2aba06792dc3dbbd9adb"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::~Cursor" ref="a38d9242a0fcf2aba06792dc3dbbd9adb" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual kyotocabinet::HashDB::Cursor::~Cursor </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Destructor. </p> <p>Reimplemented from <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a0e93160f1599c0063b6db4226216cfb3">kyotocabinet::BasicDB::Cursor</a>.</p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a9c424b101ee48c420a58606276329985"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::accept" ref="a9c424b101ee48c420a58606276329985" args="(Visitor *visitor, bool writable=true, bool step=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::accept </td> <td>(</td> <td class="paramtype"><a class="el" href="classkyotocabinet_1_1DB_1_1Visitor.html">Visitor</a> * </td> <td class="paramname"> <em>visitor</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>writable</em> = <code>true</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>step</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Accept a visitor to the current record. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>visitor</em> </td><td>a visitor object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>writable</em> </td><td>true for writable operation, or false for read-only operation. </td></tr> <tr><td valign="top"></td><td valign="top"><em>step</em> </td><td>true to move the cursor to the next record, or false for no move. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl> <dl class="note"><dt><b>Note:</b></dt><dd>The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any database operation must not be performed in this function. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#af19b3472aeec03686a074dae416c8ed3">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="a03005070904126aa6fc5748ebd969c49"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::jump" ref="a03005070904126aa6fc5748ebd969c49" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::jump </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Jump the cursor to the first record for forward scan. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a9b7e9982b948d66a4d2a0295229ac4c1">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="afec2985958ef7fba9110a7b3ee65f2d3"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::jump" ref="afec2985958ef7fba9110a7b3ee65f2d3" args="(const char *kbuf, size_t ksiz)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::jump </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>kbuf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>ksiz</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Jump the cursor to a record for forward scan. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>kbuf</em> </td><td>the pointer to the key region. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ksiz</em> </td><td>the size of the key region. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#af5ce800de2275a5e912265fd9afc896d">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="a1692879476b86e0c3a1ba2be109c53dd"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::jump" ref="a1692879476b86e0c3a1ba2be109c53dd" args="(const std::string &key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::jump </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>key</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Jump the cursor to a record for forward scan. </p> <dl class="note"><dt><b>Note:</b></dt><dd>Equal to the original <a class="el" href="classkyotocabinet_1_1HashDB_1_1Cursor.html#a03005070904126aa6fc5748ebd969c49" title="Jump the cursor to the first record for forward scan.">Cursor::jump</a> method except that the parameter is std::string. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a3b38a11631f37d104209e5feade154b4">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="a3fde297c2bcf0f7fe3d1cea846d0903f"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::jump_back" ref="a3fde297c2bcf0f7fe3d1cea846d0903f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::jump_back </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Jump the cursor to the last record for backward scan. </p> <dl class="note"><dt><b>Note:</b></dt><dd>This is a dummy implementation for compatibility. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a65452f182db3cd688885c460a761fa9c">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="afbcccb698b6defa457bcd1d0cf141a4a"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::jump_back" ref="afbcccb698b6defa457bcd1d0cf141a4a" args="(const char *kbuf, size_t ksiz)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::jump_back </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>kbuf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>ksiz</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Jump the cursor to a record for backward scan. </p> <dl class="note"><dt><b>Note:</b></dt><dd>This is a dummy implementation for compatibility. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a4456015ac4c0248aebcabb03e195e860">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="a51d7b4425af638cecdcacdc2550be177"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::jump_back" ref="a51d7b4425af638cecdcacdc2550be177" args="(const std::string &key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::jump_back </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>key</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Jump the cursor to a record for backward scan. </p> <dl class="note"><dt><b>Note:</b></dt><dd>This is a dummy implementation for compatibility. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a9d392717ad801064a36220a91f907c1d">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="a7f4be9cb599712b69ee71b1da65ef8f3"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::step" ref="a7f4be9cb599712b69ee71b1da65ef8f3" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::step </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Step the cursor to the next record. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>true on success, or false on failure. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a312228bd858d3091e32b65f1128faab4">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="afdc1941834599cfa941b6054bc031a05"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::step_back" ref="afdc1941834599cfa941b6054bc031a05" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool kyotocabinet::HashDB::Cursor::step_back </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Step the cursor to the previous record. </p> <dl class="note"><dt><b>Note:</b></dt><dd>This is a dummy implementation for compatibility. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1DB_1_1Cursor.html#a1eb720a41b9bad81f3dd6621870133d5">kyotocabinet::DB::Cursor</a>.</p> </div> </div> <a class="anchor" id="af4c7afcf214e27b4443a4b8a2bf10e98"></a><!-- doxytag: member="kyotocabinet::HashDB::Cursor::db" ref="af4c7afcf214e27b4443a4b8a2bf10e98" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classkyotocabinet_1_1HashDB.html">HashDB</a>* kyotocabinet::HashDB::Cursor::db </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Get the database object. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>the database object. </dd></dl> <p>Implements <a class="el" href="classkyotocabinet_1_1BasicDB_1_1Cursor.html#a79e3904e5b10ed3d356545ed4259160e">kyotocabinet::BasicDB::Cursor</a>.</p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Sat Dec 11 01:50:27 2010 for Kyoto Cabinet by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>