<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>Kyoto Cabinet: kyotocabinet::TinyArrayList Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Kyoto Cabinet </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.6.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <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 id="navrow2" class="tabs2"> <ul class="tablist"> <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 id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a> </li> <li class="navelem"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html">TinyArrayList</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">kyotocabinet::TinyArrayList Class Reference</div> </div> </div><!--header--> <div class="contents"> <!-- doxytag: class="kyotocabinet::TinyArrayList" --> <p>Memory-saving string array list. <a href="classkyotocabinet_1_1TinyArrayList.html#details">More...</a></p> <p><code>#include <kcmap.h></code></p> <p><a href="classkyotocabinet_1_1TinyArrayList-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> 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_1TinyArrayList.html#ae3ac40152079a28cc462a50ab2b99557">TinyArrayList</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#ae3ac40152079a28cc462a50ab2b99557"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#a13c2b2e79a21743f69c1b9c7e047ca51">~TinyArrayList</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a13c2b2e79a21743f69c1b9c7e047ca51"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#ae4eeaf0b3dfc812c7fe99bc0e4799e6e">push</a> (const char *buf, size_t size)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Insert a record at the bottom of the list. <a href="#ae4eeaf0b3dfc812c7fe99bc0e4799e6e"></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_1TinyArrayList.html#ad1a5e897929d44f9bede69c085da7507">pop</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a record at the bottom of the list. <a href="#ad1a5e897929d44f9bede69c085da7507"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aa38c59823fe74b3f5bc8302ba62201b7">unshift</a> (const char *buf, size_t size)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Insert a record at the top of the list. <a href="#aa38c59823fe74b3f5bc8302ba62201b7"></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_1TinyArrayList.html#aa6025d3e006f0e44c8c07a099dca9f0c">shift</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a record at the top of the list. <a href="#aa6025d3e006f0e44c8c07a099dca9f0c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#a3d973039c2c55391144aaeedf9d21f83">insert</a> (const char *buf, size_t size, size_t idx)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Insert a record at the position of the given index of the list. <a href="#a3d973039c2c55391144aaeedf9d21f83"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#af2ec06824b2aca05c998de7346f708cb">remove</a> (size_t idx)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a record at the position of the given index of the list. <a href="#af2ec06824b2aca05c998de7346f708cb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aceeee9a5b76e30aa9c56e4c23a7d9c0e">get</a> (size_t idx, size_t *sp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve a record at the position of the given index of the list. <a href="#aceeee9a5b76e30aa9c56e4c23a7d9c0e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aa8140881802532fb62c1444b3b7a6822">clear</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all records. <a href="#aa8140881802532fb62c1444b3b7a6822"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#a445c4ce3c8b34e3d9a38b8d876185db7">count</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of records. <a href="#a445c4ce3c8b34e3d9a38b8d876185db7"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Memory-saving string array list. </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="ae3ac40152079a28cc462a50ab2b99557"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::TinyArrayList" ref="ae3ac40152079a28cc462a50ab2b99557" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#ae3ac40152079a28cc462a50ab2b99557">kyotocabinet::TinyArrayList::TinyArrayList</a> </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Default constructor. </p> </div> </div> <a class="anchor" id="a13c2b2e79a21743f69c1b9c7e047ca51"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::~TinyArrayList" ref="a13c2b2e79a21743f69c1b9c7e047ca51" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classkyotocabinet_1_1TinyArrayList.html#a13c2b2e79a21743f69c1b9c7e047ca51">kyotocabinet::TinyArrayList::~TinyArrayList</a> </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Destructor. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ae4eeaf0b3dfc812c7fe99bc0e4799e6e"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::push" ref="ae4eeaf0b3dfc812c7fe99bc0e4799e6e" args="(const char *buf, size_t size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#ae4eeaf0b3dfc812c7fe99bc0e4799e6e">kyotocabinet::TinyArrayList::push</a> </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>size</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Insert a record at the bottom of the list. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">buf</td><td>the pointer to the record region. </td></tr> <tr><td class="paramname">size</td><td>the size of the record region. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ad1a5e897929d44f9bede69c085da7507"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::pop" ref="ad1a5e897929d44f9bede69c085da7507" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#ad1a5e897929d44f9bede69c085da7507">kyotocabinet::TinyArrayList::pop</a> </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Remove a record at the bottom of the list. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>true if the operation success, or false if there is no record in the list. </dd></dl> </div> </div> <a class="anchor" id="aa38c59823fe74b3f5bc8302ba62201b7"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::unshift" ref="aa38c59823fe74b3f5bc8302ba62201b7" args="(const char *buf, size_t size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aa38c59823fe74b3f5bc8302ba62201b7">kyotocabinet::TinyArrayList::unshift</a> </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>size</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Insert a record at the top of the list. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">buf</td><td>the pointer to the record region. </td></tr> <tr><td class="paramname">size</td><td>the size of the record region. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="aa6025d3e006f0e44c8c07a099dca9f0c"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::shift" ref="aa6025d3e006f0e44c8c07a099dca9f0c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aa6025d3e006f0e44c8c07a099dca9f0c">kyotocabinet::TinyArrayList::shift</a> </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Remove a record at the top of the list. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>true if the operation success, or false if there is no record in the list. </dd></dl> </div> </div> <a class="anchor" id="a3d973039c2c55391144aaeedf9d21f83"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::insert" ref="a3d973039c2c55391144aaeedf9d21f83" args="(const char *buf, size_t size, size_t idx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#a3d973039c2c55391144aaeedf9d21f83">kyotocabinet::TinyArrayList::insert</a> </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>idx</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Insert a record at the position of the given index of the list. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">buf</td><td>the pointer to the record region. </td></tr> <tr><td class="paramname">size</td><td>the size of the record region. </td></tr> <tr><td class="paramname">idx</td><td>the index of the position. It must be equal to or less than the number of records. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="af2ec06824b2aca05c998de7346f708cb"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::remove" ref="af2ec06824b2aca05c998de7346f708cb" args="(size_t idx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#af2ec06824b2aca05c998de7346f708cb">kyotocabinet::TinyArrayList::remove</a> </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"><em>idx</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Remove a record at the position of the given index of the list. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">idx</td><td>the index of the position. It must be less than the number of records. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="aceeee9a5b76e30aa9c56e4c23a7d9c0e"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::get" ref="aceeee9a5b76e30aa9c56e4c23a7d9c0e" args="(size_t idx, size_t *sp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aceeee9a5b76e30aa9c56e4c23a7d9c0e">kyotocabinet::TinyArrayList::get</a> </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"><em>idx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>sp</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieve a record at the position of the given index of the list. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">idx</td><td>the index of the position. It must be less than the number of records. </td></tr> <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> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the region of the retrieved record. </dd></dl> </div> </div> <a class="anchor" id="aa8140881802532fb62c1444b3b7a6822"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::clear" ref="aa8140881802532fb62c1444b3b7a6822" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#aa8140881802532fb62c1444b3b7a6822">kyotocabinet::TinyArrayList::clear</a> </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Remove all records. </p> </div> </div> <a class="anchor" id="a445c4ce3c8b34e3d9a38b8d876185db7"></a><!-- doxytag: member="kyotocabinet::TinyArrayList::count" ref="a445c4ce3c8b34e3d9a38b8d876185db7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t <a class="el" href="classkyotocabinet_1_1TinyArrayList.html#a445c4ce3c8b34e3d9a38b8d876185db7">kyotocabinet::TinyArrayList::count</a> </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the number of records. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>the number of records. </dd></dl> </div> </div> </div><!-- contents --> <hr class="footer"/><address class="footer"><small> Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.7.6.1 </small></address> </body> </html>