Debian Codegraph @

plus/xapidoc/classqdbm_1_1Depot.html

raw symbols SCIP
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 <title>QDBM for C++: qdbm::Depot Class Reference</title>
6 <link href="tabs.css" rel="stylesheet" type="text/css"/>
7 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
8 </head>
9 <body>
10 <!-- Generated by Doxygen 1.6.3 -->
11 <div class="navigation" id="top">
12 <div class="tabs">
13 <ul>
14 <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
15 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
16 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
17 </ul>
18 </div>
19 <div class="tabs">
20 <ul>
21 <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
22 <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
23 <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
24 </ul>
25 </div>
26 <div class="navpath"><a class="el" href="namespaceqdbm.html">qdbm</a>::<a class="el" href="classqdbm_1_1Depot.html">Depot</a>
27 </div>
28 </div>
29 <div class="contents">
30 <h1>qdbm::Depot Class Reference</h1><!-- doxytag: class="qdbm::Depot" --><!-- doxytag: inherits="qdbm::ADBM" -->
31 <p>C++ API of <a class="el" href="classqdbm_1_1Depot.html" title="C++ API of Depot, the basic API of QDBM.">Depot</a>, the basic API of QDBM.
32 <a href="#_details">More...</a></p>
33 <div class="dynheader">
34 Inheritance diagram for qdbm::Depot:</div>
35 <div class="dynsection">
36 <div class="center">
37 <img src="classqdbm_1_1Depot.png" usemap="#qdbm::Depot_map" alt=""/>
38 <map id="qdbm::Depot_map" name="qdbm::Depot_map">
39 <area href="classqdbm_1_1ADBM.html" alt="qdbm::ADBM" shape="rect" coords="0,0,84,24"/>
40 </map>
41 </div>
42 </div>
43
44 <p><a href="classqdbm_1_1Depot-members.html">List of all members.</a></p>
45 <table border="0" cellpadding="0" cellspacing="0">
46 <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
47 <tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a92d196f071bf46486efc222fd46c948b">Depot</a> (const char *name, int omode=<a class="el" href="classqdbm_1_1Depot.html#a8c9a55743c11c4ae9e9d262915e663cb">Depot::OREADER</a>, int bnum=-1) throw (Depot_error)</td></tr>
48 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the database handle. <a href="#a92d196f071bf46486efc222fd46c948b"></a><br/></td></tr>
49 <tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ae08c97510aaf3410795f65426a24c62f">~Depot</a> () throw ()</td></tr>
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the resources. <a href="#ae08c97510aaf3410795f65426a24c62f"></a><br/></td></tr>
51 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a4a236445aff6ecbff75e17c2810647d3">close</a> () throw (Depot_error)</td></tr>
52 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close the database handle. <a href="#a4a236445aff6ecbff75e17c2810647d3"></a><br/></td></tr>
53 <tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#af26f269651b643b104a29592cbff1516">put</a> (const char *kbuf, int ksiz, const char *vbuf, int vsiz, int dmode=<a class="el" href="classqdbm_1_1Depot.html#a9a3b1e2559593f76c7841efec6d0ea1c">Depot::DOVER</a>) throw (Depot_error)</td></tr>
54 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Store a record. <a href="#af26f269651b643b104a29592cbff1516"></a><br/></td></tr>
55 <tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a92de22f3a8994da5c70f43184aacaad2">out</a> (const char *kbuf, int ksiz) throw (Depot_error)</td></tr>
56 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a record. <a href="#a92de22f3a8994da5c70f43184aacaad2"></a><br/></td></tr>
57 <tr><td class="memItemLeft" align="right" valign="top">virtual char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ae6ff2245bb0bf93af8c79e6c3f0258cb">get</a> (const char *kbuf, int ksiz, int start=0, int max=-1, int *sp=0) throw (Depot_error)</td></tr>
58 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a record. <a href="#ae6ff2245bb0bf93af8c79e6c3f0258cb"></a><br/></td></tr>
59 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a06ba5f1cb23d20ed7435b4bdd6a492cc">getwb</a> (const char *kbuf, int ksiz, int start, int max, char *vbuf) throw (Depot_error)</td></tr>
60 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a record and write the value into a buffer. <a href="#a06ba5f1cb23d20ed7435b4bdd6a492cc"></a><br/></td></tr>
61 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a1371e7ec30bbe565e6ec64f340785228">vsiz</a> (const char *kbuf, int ksiz) throw (Depot_error)</td></tr>
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the size of the value of a record. <a href="#a1371e7ec30bbe565e6ec64f340785228"></a><br/></td></tr>
63 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#aefa6da271461b147fa2d2065b776c9ce">iterinit</a> () throw (Depot_error)</td></tr>
64 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the iterator of the database handle. <a href="#aefa6da271461b147fa2d2065b776c9ce"></a><br/></td></tr>
65 <tr><td class="memItemLeft" align="right" valign="top">virtual char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a100a816512fba6480c73071e96b3c882">iternext</a> (int *sp=0) throw (Depot_error)</td></tr>
66 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next key of the iterator. <a href="#a100a816512fba6480c73071e96b3c882"></a><br/></td></tr>
67 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a17708cb3a339d17ac4c6921672ea3e2f">setalign</a> (int align) throw (Depot_error)</td></tr>
68 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set alignment of the database handle. <a href="#a17708cb3a339d17ac4c6921672ea3e2f"></a><br/></td></tr>
69 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#aa230701175adec7ff32148d2059d61fe">setfbpsiz</a> (int size) throw (Depot_error)</td></tr>
70 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the size of the free block pool. <a href="#aa230701175adec7ff32148d2059d61fe"></a><br/></td></tr>
71 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a89ab9e21f1cfe557c2be9cc08f687501">sync</a> () throw (Depot_error)</td></tr>
72 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Synchronize updating contents with the file and the device. <a href="#a89ab9e21f1cfe557c2be9cc08f687501"></a><br/></td></tr>
73 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ad27aff090ee8bc3fe1474f680cb31cbe">optimize</a> (int bnum=-1) throw (Depot_error)</td></tr>
74 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Optimize the database. <a href="#ad27aff090ee8bc3fe1474f680cb31cbe"></a><br/></td></tr>
75 <tr><td class="memItemLeft" align="right" valign="top">virtual char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a79778919b8e295bfa545fc7fa69ca01a">name</a> () throw (Depot_error)</td></tr>
76 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the name of the database. <a href="#a79778919b8e295bfa545fc7fa69ca01a"></a><br/></td></tr>
77 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ac388448cfbeaf4b6329d112bdfa545a0">fsiz</a> () throw (Depot_error)</td></tr>
78 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the size of the database file. <a href="#ac388448cfbeaf4b6329d112bdfa545a0"></a><br/></td></tr>
79 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a3b50683f37cbd944f6f76c6be648a49f">bnum</a> () throw (Depot_error)</td></tr>
80 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of the elements of the bucket array. <a href="#a3b50683f37cbd944f6f76c6be648a49f"></a><br/></td></tr>
81 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a414665bff14bb7f3431634de633861f7">busenum</a> () throw (Depot_error)</td></tr>
82 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of the used elements of the bucket array. <a href="#a414665bff14bb7f3431634de633861f7"></a><br/></td></tr>
83 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a752acfeb96535df0076b15ab7844d4e6">rnum</a> () throw (Depot_error)</td></tr>
84 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of the records stored in the database. <a href="#a752acfeb96535df0076b15ab7844d4e6"></a><br/></td></tr>
85 <tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a21308a7de25b2a4d1b367fdfa12896c1">writable</a> () throw (Depot_error)</td></tr>
86 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether the database handle is a writer or not. <a href="#a21308a7de25b2a4d1b367fdfa12896c1"></a><br/></td></tr>
87 <tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ae0d5debd4eaeda68d63281e32589e8c2">fatalerror</a> () throw (Depot_error)</td></tr>
88 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether the database has a fatal error or not. <a href="#ae0d5debd4eaeda68d63281e32589e8c2"></a><br/></td></tr>
89 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#af4415be311b7edea43205a3cd0214f09">inode</a> () throw (Depot_error)</td></tr>
90 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the inode number of the database file. <a href="#af4415be311b7edea43205a3cd0214f09"></a><br/></td></tr>
91 <tr><td class="memItemLeft" align="right" valign="top">virtual time_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ab468d0ea29fa0c00adce15f346633b01">mtime</a> () throw (Depot_error)</td></tr>
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the last modified time of the database. <a href="#ab468d0ea29fa0c00adce15f346633b01"></a><br/></td></tr>
93 <tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#aaef898237f88d19c77986216c2fbe13a">fdesc</a> () throw (Depot_error)</td></tr>
94 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the file descriptor of the database file. <a href="#aaef898237f88d19c77986216c2fbe13a"></a><br/></td></tr>
95 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ad1c017447ccb152ca6aa3d525eb877e6">storerec</a> (const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;key, const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;val, bool replace=true) throw (Depot_error)</td></tr>
96 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Store a record. <a href="#ad1c017447ccb152ca6aa3d525eb877e6"></a><br/></td></tr>
97 <tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a6f1a874cfc409cb2ac60449eb8d75183">deleterec</a> (const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;key) throw (Depot_error)</td></tr>
98 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a record. <a href="#a6f1a874cfc409cb2ac60449eb8d75183"></a><br/></td></tr>
99 <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classqdbm_1_1Datum.html">Datum</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a00c7cf35fd226cb6184ccaa59c4626e7">fetchrec</a> (const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;key) throw (Depot_error)</td></tr>
100 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetch a record. <a href="#a00c7cf35fd226cb6184ccaa59c4626e7"></a><br/></td></tr>
101 <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classqdbm_1_1Datum.html">Datum</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#acbf7fbc4afa0e971a92a503549a01ef1">firstkey</a> () throw (Depot_error)</td></tr>
102 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first key. <a href="#acbf7fbc4afa0e971a92a503549a01ef1"></a><br/></td></tr>
103 <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classqdbm_1_1Datum.html">Datum</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a1c953f0c612ea7665e5634c8b230cc62">nextkey</a> () throw (Depot_error)</td></tr>
104 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next key. <a href="#a1c953f0c612ea7665e5634c8b230cc62"></a><br/></td></tr>
105 <tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a376c2d8ca7c30715b07b1110b4128055">error</a> () throw (Depot_error)</td></tr>
106 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether a fatal error occured or not. <a href="#a376c2d8ca7c30715b07b1110b4128055"></a><br/></td></tr>
107 <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
108 <tr><td class="memItemLeft" align="right" valign="top">static const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a2add0b20314e0a1b365d4b637d450ffa">version</a> () throw ()</td></tr>
109 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the version information. <a href="#a2add0b20314e0a1b365d4b637d450ffa"></a><br/></td></tr>
110 <tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#af48f660cf8bf90035f71782113b86a23">remove</a> (const char *name) throw (Depot_error)</td></tr>
111 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a database file. <a href="#af48f660cf8bf90035f71782113b86a23"></a><br/></td></tr>
112 <tr><td class="memItemLeft" align="right" valign="top">static char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a0d4a00a98dc6665a657bc1e6be34a38b">snaffle</a> (const char *name, const char *kbuf, int ksiz, int *sp) throw (Depot_error)</td></tr>
113 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a record directly from a database file. <a href="#a0d4a00a98dc6665a657bc1e6be34a38b"></a><br/></td></tr>
114 <tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
115 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9e4ad08af22cf5c797c67a91e1003a94"></a><!-- doxytag: member="qdbm::Depot::silent" ref="a9e4ad08af22cf5c797c67a91e1003a94" args="" -->
116 bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a9e4ad08af22cf5c797c67a91e1003a94">silent</a></td></tr>
117 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">whether to repress frequent exceptions <br/></td></tr>
118 <tr><td colspan="2"><h2>Static Public Attributes</h2></td></tr>
119 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c69ffd0a34a555d0c25a268e3130a7c"></a><!-- doxytag: member="qdbm::Depot::ENOERR" ref="a5c69ffd0a34a555d0c25a268e3130a7c" args="" -->
120 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a5c69ffd0a34a555d0c25a268e3130a7c">ENOERR</a></td></tr>
121 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: no error <br/></td></tr>
122 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae986f17a24203c184030d29d63524197"></a><!-- doxytag: member="qdbm::Depot::EFATAL" ref="ae986f17a24203c184030d29d63524197" args="" -->
123 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ae986f17a24203c184030d29d63524197">EFATAL</a></td></tr>
124 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: with fatal error <br/></td></tr>
125 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8f5b3ad001250e14f150d37f9aa17c3f"></a><!-- doxytag: member="qdbm::Depot::EMODE" ref="a8f5b3ad001250e14f150d37f9aa17c3f" args="" -->
126 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a8f5b3ad001250e14f150d37f9aa17c3f">EMODE</a></td></tr>
127 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: invalid mode <br/></td></tr>
128 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a927897e0f1f6bfdd0c6e4aa949d99427"></a><!-- doxytag: member="qdbm::Depot::EBROKEN" ref="a927897e0f1f6bfdd0c6e4aa949d99427" args="" -->
129 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a927897e0f1f6bfdd0c6e4aa949d99427">EBROKEN</a></td></tr>
130 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: broken database file <br/></td></tr>
131 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7301e26fcc34b377d01332a1b31a7b6e"></a><!-- doxytag: member="qdbm::Depot::EKEEP" ref="a7301e26fcc34b377d01332a1b31a7b6e" args="" -->
132 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a7301e26fcc34b377d01332a1b31a7b6e">EKEEP</a></td></tr>
133 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: existing record <br/></td></tr>
134 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78b1fc10e76ed61d2dc184cbdb453d4c"></a><!-- doxytag: member="qdbm::Depot::ENOITEM" ref="a78b1fc10e76ed61d2dc184cbdb453d4c" args="" -->
135 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a78b1fc10e76ed61d2dc184cbdb453d4c">ENOITEM</a></td></tr>
136 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: no item found <br/></td></tr>
137 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9d2c1e4b89c037e24ee0a2f59dbfb0e"></a><!-- doxytag: member="qdbm::Depot::EALLOC" ref="ae9d2c1e4b89c037e24ee0a2f59dbfb0e" args="" -->
138 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ae9d2c1e4b89c037e24ee0a2f59dbfb0e">EALLOC</a></td></tr>
139 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: memory allocation error <br/></td></tr>
140 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="affeaa0cc2b079c07414771406c2fa453"></a><!-- doxytag: member="qdbm::Depot::EMAP" ref="affeaa0cc2b079c07414771406c2fa453" args="" -->
141 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#affeaa0cc2b079c07414771406c2fa453">EMAP</a></td></tr>
142 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: memory mapping error <br/></td></tr>
143 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa488875506e57fec5a87edf23e2aad0a"></a><!-- doxytag: member="qdbm::Depot::EOPEN" ref="aa488875506e57fec5a87edf23e2aad0a" args="" -->
144 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#aa488875506e57fec5a87edf23e2aad0a">EOPEN</a></td></tr>
145 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: open error <br/></td></tr>
146 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c5167979a62bd997513da1620f799ee"></a><!-- doxytag: member="qdbm::Depot::ECLOSE" ref="a9c5167979a62bd997513da1620f799ee" args="" -->
147 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a9c5167979a62bd997513da1620f799ee">ECLOSE</a></td></tr>
148 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: close error <br/></td></tr>
149 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac20f08e7ca6ee209f5d3751b743765c1"></a><!-- doxytag: member="qdbm::Depot::ETRUNC" ref="ac20f08e7ca6ee209f5d3751b743765c1" args="" -->
150 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ac20f08e7ca6ee209f5d3751b743765c1">ETRUNC</a></td></tr>
151 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: trunc error <br/></td></tr>
152 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a468b75c382b210ada3a9ae95f8232a4b"></a><!-- doxytag: member="qdbm::Depot::ESYNC" ref="a468b75c382b210ada3a9ae95f8232a4b" args="" -->
153 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a468b75c382b210ada3a9ae95f8232a4b">ESYNC</a></td></tr>
154 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: sync error <br/></td></tr>
155 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08fc3d6814800e9488542facfb13e5ad"></a><!-- doxytag: member="qdbm::Depot::ESTAT" ref="a08fc3d6814800e9488542facfb13e5ad" args="" -->
156 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a08fc3d6814800e9488542facfb13e5ad">ESTAT</a></td></tr>
157 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: stat error <br/></td></tr>
158 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a439dda720938f5db2c280f862afc5522"></a><!-- doxytag: member="qdbm::Depot::ESEEK" ref="a439dda720938f5db2c280f862afc5522" args="" -->
159 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a439dda720938f5db2c280f862afc5522">ESEEK</a></td></tr>
160 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: seek error <br/></td></tr>
161 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6281514c4362f7f303b3c7f7e513e5b9"></a><!-- doxytag: member="qdbm::Depot::EREAD" ref="a6281514c4362f7f303b3c7f7e513e5b9" args="" -->
162 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a6281514c4362f7f303b3c7f7e513e5b9">EREAD</a></td></tr>
163 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: read error <br/></td></tr>
164 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e64482ac2b9e1eb267d5b9cdf52beb4"></a><!-- doxytag: member="qdbm::Depot::EWRITE" ref="a0e64482ac2b9e1eb267d5b9cdf52beb4" args="" -->
165 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a0e64482ac2b9e1eb267d5b9cdf52beb4">EWRITE</a></td></tr>
166 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: write error <br/></td></tr>
167 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a144546bed513b311484ed9286f660e83"></a><!-- doxytag: member="qdbm::Depot::ELOCK" ref="a144546bed513b311484ed9286f660e83" args="" -->
168 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a144546bed513b311484ed9286f660e83">ELOCK</a></td></tr>
169 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: lock error <br/></td></tr>
170 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a81a1acbdaff7edb100d9b3ff8c3763"></a><!-- doxytag: member="qdbm::Depot::EUNLINK" ref="a4a81a1acbdaff7edb100d9b3ff8c3763" args="" -->
171 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a4a81a1acbdaff7edb100d9b3ff8c3763">EUNLINK</a></td></tr>
172 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: unlink error <br/></td></tr>
173 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3829c3797441ae8a658bfdd89763f26"></a><!-- doxytag: member="qdbm::Depot::EMKDIR" ref="ab3829c3797441ae8a658bfdd89763f26" args="" -->
174 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ab3829c3797441ae8a658bfdd89763f26">EMKDIR</a></td></tr>
175 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: mkdir error <br/></td></tr>
176 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c819520c25b1b21d0c0653aa521c7a7"></a><!-- doxytag: member="qdbm::Depot::ERMDIR" ref="a1c819520c25b1b21d0c0653aa521c7a7" args="" -->
177 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a1c819520c25b1b21d0c0653aa521c7a7">ERMDIR</a></td></tr>
178 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: rmdir error <br/></td></tr>
179 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30eeef4aef5f308ad9e65f47b9e947ad"></a><!-- doxytag: member="qdbm::Depot::EMISC" ref="a30eeef4aef5f308ad9e65f47b9e947ad" args="" -->
180 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a30eeef4aef5f308ad9e65f47b9e947ad">EMISC</a></td></tr>
181 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error code: miscellaneous error <br/></td></tr>
182 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c9a55743c11c4ae9e9d262915e663cb"></a><!-- doxytag: member="qdbm::Depot::OREADER" ref="a8c9a55743c11c4ae9e9d262915e663cb" args="" -->
183 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a8c9a55743c11c4ae9e9d262915e663cb">OREADER</a></td></tr>
184 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: open as a reader <br/></td></tr>
185 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc4286c1b3c60d8cb982c31e4f7c06f0"></a><!-- doxytag: member="qdbm::Depot::OWRITER" ref="abc4286c1b3c60d8cb982c31e4f7c06f0" args="" -->
186 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#abc4286c1b3c60d8cb982c31e4f7c06f0">OWRITER</a></td></tr>
187 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: open as a writer <br/></td></tr>
188 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04378bdf81d384917adc5c310986f8d2"></a><!-- doxytag: member="qdbm::Depot::OCREAT" ref="a04378bdf81d384917adc5c310986f8d2" args="" -->
189 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a04378bdf81d384917adc5c310986f8d2">OCREAT</a></td></tr>
190 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: writer creating <br/></td></tr>
191 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a52bd2f6f9b5809407c510bb753a0d4cb"></a><!-- doxytag: member="qdbm::Depot::OTRUNC" ref="a52bd2f6f9b5809407c510bb753a0d4cb" args="" -->
192 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a52bd2f6f9b5809407c510bb753a0d4cb">OTRUNC</a></td></tr>
193 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: writer truncating <br/></td></tr>
194 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2f0b31fd01c0652c3af7ec1c9d29b21"></a><!-- doxytag: member="qdbm::Depot::ONOLCK" ref="ad2f0b31fd01c0652c3af7ec1c9d29b21" args="" -->
195 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#ad2f0b31fd01c0652c3af7ec1c9d29b21">ONOLCK</a></td></tr>
196 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: open without locking <br/></td></tr>
197 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7035592f8c428476a8fc87f37d2e6188"></a><!-- doxytag: member="qdbm::Depot::OLCKNB" ref="a7035592f8c428476a8fc87f37d2e6188" args="" -->
198 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a7035592f8c428476a8fc87f37d2e6188">OLCKNB</a></td></tr>
199 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: lock without blocking <br/></td></tr>
200 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb06f7ae2438a4484e1a35b18213ca15"></a><!-- doxytag: member="qdbm::Depot::OSPARSE" ref="adb06f7ae2438a4484e1a35b18213ca15" args="" -->
201 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#adb06f7ae2438a4484e1a35b18213ca15">OSPARSE</a></td></tr>
202 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">open mode: create as a sparse file <br/></td></tr>
203 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a3b1e2559593f76c7841efec6d0ea1c"></a><!-- doxytag: member="qdbm::Depot::DOVER" ref="a9a3b1e2559593f76c7841efec6d0ea1c" args="" -->
204 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a9a3b1e2559593f76c7841efec6d0ea1c">DOVER</a></td></tr>
205 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">write mode: overwrite the existing value <br/></td></tr>
206 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76010f57e06ce1104a7094a9ccf4092e"></a><!-- doxytag: member="qdbm::Depot::DKEEP" ref="a76010f57e06ce1104a7094a9ccf4092e" args="" -->
207 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a76010f57e06ce1104a7094a9ccf4092e">DKEEP</a></td></tr>
208 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">write mode: keep the existing value <br/></td></tr>
209 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9577cb9d2c4d7fdc4218d2e03a405a0d"></a><!-- doxytag: member="qdbm::Depot::DCAT" ref="a9577cb9d2c4d7fdc4218d2e03a405a0d" args="" -->
210 static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqdbm_1_1Depot.html#a9577cb9d2c4d7fdc4218d2e03a405a0d">DCAT</a></td></tr>
211 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">write mode: concatenate values <br/></td></tr>
212 </table>
213 <hr/><a name="_details"></a><h2>Detailed Description</h2>
214 <p>C++ API of <a class="el" href="classqdbm_1_1Depot.html" title="C++ API of Depot, the basic API of QDBM.">Depot</a>, the basic API of QDBM. </p>
215 <hr/><h2>Constructor &amp; Destructor Documentation</h2>
216 <a class="anchor" id="a92d196f071bf46486efc222fd46c948b"></a><!-- doxytag: member="qdbm::Depot::Depot" ref="a92d196f071bf46486efc222fd46c948b" args="(const char *name, int omode=Depot::OREADER, int bnum=&#45;1)" -->
217 <div class="memitem">
218 <div class="memproto">
219 <table class="memname">
220 <tr>
221 <td class="memname">qdbm::Depot::Depot </td>
222 <td>(</td>
223 <td class="paramtype">const char *&nbsp;</td>
224 <td class="paramname"> <em>name</em>, </td>
225 </tr>
226 <tr>
227 <td class="paramkey"></td>
228 <td></td>
229 <td class="paramtype">int&nbsp;</td>
230 <td class="paramname"> <em>omode</em> = <code><a class="el" href="classqdbm_1_1Depot.html#a8c9a55743c11c4ae9e9d262915e663cb">Depot::OREADER</a></code>, </td>
231 </tr>
232 <tr>
233 <td class="paramkey"></td>
234 <td></td>
235 <td class="paramtype">int&nbsp;</td>
236 <td class="paramname"> <em>bnum</em> = <code>-1</code></td><td>&nbsp;</td>
237 </tr>
238 <tr>
239 <td></td>
240 <td>)</td>
241 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)</td>
242 </tr>
243 </table>
244 </div>
245 <div class="memdoc">
246
247 <p>Get the database handle. </p>
248 <dl><dt><b>Parameters:</b></dt><dd>
249 <table border="0" cellspacing="2" cellpadding="0">
250 <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the name of a database file. </td></tr>
251 <tr><td valign="top"></td><td valign="top"><em>omode</em>&nbsp;</td><td>the connection mode: `DepotOWRITER' as a writer, `DepotOREADER' as a reader. If the mode is `DepotOWRITER', the following may be added by bitwise or: `DepotOCREAT', which means it creates a new database if not exist, `DepotOTRUNC', which means it creates a new database regardless if one exists. Both of `DepotOREADER' and `DepotOWRITER' can be added to by bitwise or: `DepotONOLCK', which means it opens a database file without file locking, or `DepotOLCKNB', which means locking is performed without blocking. `DepotOCREAT' can be added to by bitwise or: `DepotOSPARSE', which means it creates a database file as a sparse file. </td></tr>
252 <tr><td valign="top"></td><td valign="top"><em>bnum</em>&nbsp;</td><td>the number of elements of the bucket array. If it is not more than 0, the default value is specified. The size of a bucket array is determined on creating, and can not be changed except for by optimization of the database. Suggested size of a bucket array is about from 0.5 to 4 times of the number of all records to store. </td></tr>
253 </table>
254 </dd>
255 </dl>
256 <dl><dt><b>Exceptions:</b></dt><dd>
257 <table border="0" cellspacing="2" cellpadding="0">
258 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
259 </table>
260 </dd>
261 </dl>
262 <dl class="note"><dt><b>Note:</b></dt><dd>While connecting as a writer, an exclusive lock is invoked to the database file. While connecting as a reader, a shared lock is invoked to the database file. The thread blocks until the lock is achieved. If `DepotONOLCK' is used, the application is responsible for exclusion control. </dd></dl>
263
264 </div>
265 </div>
266 <a class="anchor" id="ae08c97510aaf3410795f65426a24c62f"></a><!-- doxytag: member="qdbm::Depot::~Depot" ref="ae08c97510aaf3410795f65426a24c62f" args="()" -->
267 <div class="memitem">
268 <div class="memproto">
269 <table class="memname">
270 <tr>
271 <td class="memname">virtual qdbm::Depot::~Depot </td>
272 <td>(</td>
273 <td class="paramname"></td>
274 <td>&nbsp;)&nbsp;</td>
275 <td> throw ()<code> [virtual]</code></td>
276 </tr>
277 </table>
278 </div>
279 <div class="memdoc">
280
281 <p>Release the resources. </p>
282 <dl class="note"><dt><b>Note:</b></dt><dd>If the database handle is not closed yet, it is closed. </dd></dl>
283
284 </div>
285 </div>
286 <hr/><h2>Member Function Documentation</h2>
287 <a class="anchor" id="a3b50683f37cbd944f6f76c6be648a49f"></a><!-- doxytag: member="qdbm::Depot::bnum" ref="a3b50683f37cbd944f6f76c6be648a49f" args="()" -->
288 <div class="memitem">
289 <div class="memproto">
290 <table class="memname">
291 <tr>
292 <td class="memname">virtual int qdbm::Depot::bnum </td>
293 <td>(</td>
294 <td class="paramname"></td>
295 <td>&nbsp;)&nbsp;</td>
296 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
297 </tr>
298 </table>
299 </div>
300 <div class="memdoc">
301
302 <p>Get the number of the elements of the bucket array. </p>
303 <dl class="return"><dt><b>Returns:</b></dt><dd>the number of the elements of the bucket array. </dd></dl>
304 <dl><dt><b>Exceptions:</b></dt><dd>
305 <table border="0" cellspacing="2" cellpadding="0">
306 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
307 </table>
308 </dd>
309 </dl>
310
311 </div>
312 </div>
313 <a class="anchor" id="a414665bff14bb7f3431634de633861f7"></a><!-- doxytag: member="qdbm::Depot::busenum" ref="a414665bff14bb7f3431634de633861f7" args="()" -->
314 <div class="memitem">
315 <div class="memproto">
316 <table class="memname">
317 <tr>
318 <td class="memname">virtual int qdbm::Depot::busenum </td>
319 <td>(</td>
320 <td class="paramname"></td>
321 <td>&nbsp;)&nbsp;</td>
322 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
323 </tr>
324 </table>
325 </div>
326 <div class="memdoc">
327
328 <p>Get the number of the used elements of the bucket array. </p>
329 <dl class="return"><dt><b>Returns:</b></dt><dd>the number of the used elements of the bucket array. </dd></dl>
330 <dl><dt><b>Exceptions:</b></dt><dd>
331 <table border="0" cellspacing="2" cellpadding="0">
332 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
333 </table>
334 </dd>
335 </dl>
336 <dl class="note"><dt><b>Note:</b></dt><dd>This function is inefficient because it accesses all elements of the bucket array. </dd></dl>
337
338 </div>
339 </div>
340 <a class="anchor" id="a4a236445aff6ecbff75e17c2810647d3"></a><!-- doxytag: member="qdbm::Depot::close" ref="a4a236445aff6ecbff75e17c2810647d3" args="()" -->
341 <div class="memitem">
342 <div class="memproto">
343 <table class="memname">
344 <tr>
345 <td class="memname">virtual void qdbm::Depot::close </td>
346 <td>(</td>
347 <td class="paramname"></td>
348 <td>&nbsp;)&nbsp;</td>
349 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
350 </tr>
351 </table>
352 </div>
353 <div class="memdoc">
354
355 <p>Close the database handle. </p>
356 <dl><dt><b>Exceptions:</b></dt><dd>
357 <table border="0" cellspacing="2" cellpadding="0">
358 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
359 </table>
360 </dd>
361 </dl>
362 <dl class="note"><dt><b>Note:</b></dt><dd>Updating a database is assured to be written when the handle is closed. If a writer opens a database but does not close it appropriately, the database will be broken. </dd></dl>
363
364 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#afe282ce1168c9a437b74e6f90e21db3d">qdbm::ADBM</a>.</p>
365
366 </div>
367 </div>
368 <a class="anchor" id="a6f1a874cfc409cb2ac60449eb8d75183"></a><!-- doxytag: member="qdbm::Depot::deleterec" ref="a6f1a874cfc409cb2ac60449eb8d75183" args="(const Datum &amp;key)" -->
369 <div class="memitem">
370 <div class="memproto">
371 <table class="memname">
372 <tr>
373 <td class="memname">virtual void qdbm::Depot::deleterec </td>
374 <td>(</td>
375 <td class="paramtype">const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;&nbsp;</td>
376 <td class="paramname"> <em>key</em></td>
377 <td>&nbsp;)&nbsp;</td>
378 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
379 </tr>
380 </table>
381 </div>
382 <div class="memdoc">
383
384 <p>Delete a record. </p>
385 <dl><dt><b>Parameters:</b></dt><dd>
386 <table border="0" cellspacing="2" cellpadding="0">
387 <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>reference to a key object. </td></tr>
388 </table>
389 </dd>
390 </dl>
391 <dl><dt><b>Exceptions:</b></dt><dd>
392 <table border="0" cellspacing="2" cellpadding="0">
393 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
394 </table>
395 </dd>
396 </dl>
397
398 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#aacf9ce119ffd2f3da213cdffd2428ac6">qdbm::ADBM</a>.</p>
399
400 </div>
401 </div>
402 <a class="anchor" id="a376c2d8ca7c30715b07b1110b4128055"></a><!-- doxytag: member="qdbm::Depot::error" ref="a376c2d8ca7c30715b07b1110b4128055" args="()" -->
403 <div class="memitem">
404 <div class="memproto">
405 <table class="memname">
406 <tr>
407 <td class="memname">virtual bool qdbm::Depot::error </td>
408 <td>(</td>
409 <td class="paramname"></td>
410 <td>&nbsp;)&nbsp;</td>
411 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
412 </tr>
413 </table>
414 </div>
415 <div class="memdoc">
416
417 <p>Check whether a fatal error occured or not. </p>
418 <dl class="return"><dt><b>Returns:</b></dt><dd>true if the database has a fatal error, false if not. </dd></dl>
419 <dl><dt><b>Exceptions:</b></dt><dd>
420 <table border="0" cellspacing="2" cellpadding="0">
421 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
422 </table>
423 </dd>
424 </dl>
425
426 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#abbd9f01defd662ef69c706b6b5d7bb54">qdbm::ADBM</a>.</p>
427
428 </div>
429 </div>
430 <a class="anchor" id="ae0d5debd4eaeda68d63281e32589e8c2"></a><!-- doxytag: member="qdbm::Depot::fatalerror" ref="ae0d5debd4eaeda68d63281e32589e8c2" args="()" -->
431 <div class="memitem">
432 <div class="memproto">
433 <table class="memname">
434 <tr>
435 <td class="memname">virtual bool qdbm::Depot::fatalerror </td>
436 <td>(</td>
437 <td class="paramname"></td>
438 <td>&nbsp;)&nbsp;</td>
439 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
440 </tr>
441 </table>
442 </div>
443 <div class="memdoc">
444
445 <p>Check whether the database has a fatal error or not. </p>
446 <dl class="return"><dt><b>Returns:</b></dt><dd>true if the database has a fatal error, false if not. </dd></dl>
447 <dl><dt><b>Exceptions:</b></dt><dd>
448 <table border="0" cellspacing="2" cellpadding="0">
449 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
450 </table>
451 </dd>
452 </dl>
453
454 </div>
455 </div>
456 <a class="anchor" id="aaef898237f88d19c77986216c2fbe13a"></a><!-- doxytag: member="qdbm::Depot::fdesc" ref="aaef898237f88d19c77986216c2fbe13a" args="()" -->
457 <div class="memitem">
458 <div class="memproto">
459 <table class="memname">
460 <tr>
461 <td class="memname">virtual int qdbm::Depot::fdesc </td>
462 <td>(</td>
463 <td class="paramname"></td>
464 <td>&nbsp;)&nbsp;</td>
465 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
466 </tr>
467 </table>
468 </div>
469 <div class="memdoc">
470
471 <p>Get the file descriptor of the database file. </p>
472 <dl class="return"><dt><b>Returns:</b></dt><dd>the file descriptor of the database file. </dd></dl>
473 <dl><dt><b>Exceptions:</b></dt><dd>
474 <table border="0" cellspacing="2" cellpadding="0">
475 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
476 </table>
477 </dd>
478 </dl>
479 <dl class="note"><dt><b>Note:</b></dt><dd>Handling the file descriptor of a database file directly is not suggested. </dd></dl>
480
481 </div>
482 </div>
483 <a class="anchor" id="a00c7cf35fd226cb6184ccaa59c4626e7"></a><!-- doxytag: member="qdbm::Depot::fetchrec" ref="a00c7cf35fd226cb6184ccaa59c4626e7" args="(const Datum &amp;key)" -->
484 <div class="memitem">
485 <div class="memproto">
486 <table class="memname">
487 <tr>
488 <td class="memname">virtual <a class="el" href="classqdbm_1_1Datum.html">Datum</a> qdbm::Depot::fetchrec </td>
489 <td>(</td>
490 <td class="paramtype">const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;&nbsp;</td>
491 <td class="paramname"> <em>key</em></td>
492 <td>&nbsp;)&nbsp;</td>
493 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
494 </tr>
495 </table>
496 </div>
497 <div class="memdoc">
498
499 <p>Fetch a record. </p>
500 <dl><dt><b>Parameters:</b></dt><dd>
501 <table border="0" cellspacing="2" cellpadding="0">
502 <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>reference to a key object. </td></tr>
503 </table>
504 </dd>
505 </dl>
506 <dl class="return"><dt><b>Returns:</b></dt><dd>a temporary instance of the value of the corresponding record. </dd></dl>
507 <dl><dt><b>Exceptions:</b></dt><dd>
508 <table border="0" cellspacing="2" cellpadding="0">
509 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
510 </table>
511 </dd>
512 </dl>
513
514 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#a2ed1c91281ac685374082639369dc7b1">qdbm::ADBM</a>.</p>
515
516 </div>
517 </div>
518 <a class="anchor" id="acbf7fbc4afa0e971a92a503549a01ef1"></a><!-- doxytag: member="qdbm::Depot::firstkey" ref="acbf7fbc4afa0e971a92a503549a01ef1" args="()" -->
519 <div class="memitem">
520 <div class="memproto">
521 <table class="memname">
522 <tr>
523 <td class="memname">virtual <a class="el" href="classqdbm_1_1Datum.html">Datum</a> qdbm::Depot::firstkey </td>
524 <td>(</td>
525 <td class="paramname"></td>
526 <td>&nbsp;)&nbsp;</td>
527 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
528 </tr>
529 </table>
530 </div>
531 <div class="memdoc">
532
533 <p>Get the first key. </p>
534 <dl class="return"><dt><b>Returns:</b></dt><dd>a temporary instance of the key of the first record. </dd></dl>
535 <dl><dt><b>Exceptions:</b></dt><dd>
536 <table border="0" cellspacing="2" cellpadding="0">
537 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
538 </table>
539 </dd>
540 </dl>
541
542 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#a457f066a06a8e2c7bdcced9c3a83bc86">qdbm::ADBM</a>.</p>
543
544 </div>
545 </div>
546 <a class="anchor" id="ac388448cfbeaf4b6329d112bdfa545a0"></a><!-- doxytag: member="qdbm::Depot::fsiz" ref="ac388448cfbeaf4b6329d112bdfa545a0" args="()" -->
547 <div class="memitem">
548 <div class="memproto">
549 <table class="memname">
550 <tr>
551 <td class="memname">virtual int qdbm::Depot::fsiz </td>
552 <td>(</td>
553 <td class="paramname"></td>
554 <td>&nbsp;)&nbsp;</td>
555 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
556 </tr>
557 </table>
558 </div>
559 <div class="memdoc">
560
561 <p>Get the size of the database file. </p>
562 <dl class="return"><dt><b>Returns:</b></dt><dd>the size of the database file. </dd></dl>
563 <dl><dt><b>Exceptions:</b></dt><dd>
564 <table border="0" cellspacing="2" cellpadding="0">
565 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
566 </table>
567 </dd>
568 </dl>
569
570 </div>
571 </div>
572 <a class="anchor" id="ae6ff2245bb0bf93af8c79e6c3f0258cb"></a><!-- doxytag: member="qdbm::Depot::get" ref="ae6ff2245bb0bf93af8c79e6c3f0258cb" args="(const char *kbuf, int ksiz, int start=0, int max=&#45;1, int *sp=0)" -->
573 <div class="memitem">
574 <div class="memproto">
575 <table class="memname">
576 <tr>
577 <td class="memname">virtual char* qdbm::Depot::get </td>
578 <td>(</td>
579 <td class="paramtype">const char *&nbsp;</td>
580 <td class="paramname"> <em>kbuf</em>, </td>
581 </tr>
582 <tr>
583 <td class="paramkey"></td>
584 <td></td>
585 <td class="paramtype">int&nbsp;</td>
586 <td class="paramname"> <em>ksiz</em>, </td>
587 </tr>
588 <tr>
589 <td class="paramkey"></td>
590 <td></td>
591 <td class="paramtype">int&nbsp;</td>
592 <td class="paramname"> <em>start</em> = <code>0</code>, </td>
593 </tr>
594 <tr>
595 <td class="paramkey"></td>
596 <td></td>
597 <td class="paramtype">int&nbsp;</td>
598 <td class="paramname"> <em>max</em> = <code>-1</code>, </td>
599 </tr>
600 <tr>
601 <td class="paramkey"></td>
602 <td></td>
603 <td class="paramtype">int *&nbsp;</td>
604 <td class="paramname"> <em>sp</em> = <code>0</code></td><td>&nbsp;</td>
605 </tr>
606 <tr>
607 <td></td>
608 <td>)</td>
609 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
610 </tr>
611 </table>
612 </div>
613 <div class="memdoc">
614
615 <p>Retrieve a record. </p>
616 <dl><dt><b>Parameters:</b></dt><dd>
617 <table border="0" cellspacing="2" cellpadding="0">
618 <tr><td valign="top"></td><td valign="top"><em>kbuf</em>&nbsp;</td><td>the pointer to the region of a key. </td></tr>
619 <tr><td valign="top"></td><td valign="top"><em>ksiz</em>&nbsp;</td><td>the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'. </td></tr>
620 <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>the offset address of the beginning of the region of the value to be read. </td></tr>
621 <tr><td valign="top"></td><td valign="top"><em>max</em>&nbsp;</td><td>the max size to read with. If it is negative, the size is unlimited. </td></tr>
622 <tr><td valign="top"></td><td valign="top"><em>sp</em>&nbsp;</td><td>the pointer to a variable to which the size of the region of the return value is assigned. If it is 0, it is not used. </td></tr>
623 </table>
624 </dd>
625 </dl>
626 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the region of the value of the corresponding record. If the silent flag is true and no record corresponds, 0 is returned instead of exception. </dd></dl>
627 <dl><dt><b>Exceptions:</b></dt><dd>
628 <table border="0" cellspacing="2" cellpadding="0">
629 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs, no record corresponds, or the size of the value of the corresponding record is less than `start'. </td></tr>
630 </table>
631 </dd>
632 </dl>
633 <dl class="note"><dt><b>Note:</b></dt><dd>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 character string. Because the region of the return value is allocated with the `stdmalloc' call, it should be released with the `stdfree' call if it is no longer in use. </dd></dl>
634
635 </div>
636 </div>
637 <a class="anchor" id="a06ba5f1cb23d20ed7435b4bdd6a492cc"></a><!-- doxytag: member="qdbm::Depot::getwb" ref="a06ba5f1cb23d20ed7435b4bdd6a492cc" args="(const char *kbuf, int ksiz, int start, int max, char *vbuf)" -->
638 <div class="memitem">
639 <div class="memproto">
640 <table class="memname">
641 <tr>
642 <td class="memname">virtual int qdbm::Depot::getwb </td>
643 <td>(</td>
644 <td class="paramtype">const char *&nbsp;</td>
645 <td class="paramname"> <em>kbuf</em>, </td>
646 </tr>
647 <tr>
648 <td class="paramkey"></td>
649 <td></td>
650 <td class="paramtype">int&nbsp;</td>
651 <td class="paramname"> <em>ksiz</em>, </td>
652 </tr>
653 <tr>
654 <td class="paramkey"></td>
655 <td></td>
656 <td class="paramtype">int&nbsp;</td>
657 <td class="paramname"> <em>start</em>, </td>
658 </tr>
659 <tr>
660 <td class="paramkey"></td>
661 <td></td>
662 <td class="paramtype">int&nbsp;</td>
663 <td class="paramname"> <em>max</em>, </td>
664 </tr>
665 <tr>
666 <td class="paramkey"></td>
667 <td></td>
668 <td class="paramtype">char *&nbsp;</td>
669 <td class="paramname"> <em>vbuf</em></td><td>&nbsp;</td>
670 </tr>
671 <tr>
672 <td></td>
673 <td>)</td>
674 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
675 </tr>
676 </table>
677 </div>
678 <div class="memdoc">
679
680 <p>Retrieve a record and write the value into a buffer. </p>
681 <dl><dt><b>Parameters:</b></dt><dd>
682 <table border="0" cellspacing="2" cellpadding="0">
683 <tr><td valign="top"></td><td valign="top"><em>kbuf</em>&nbsp;</td><td>the pointer to the region of a key. </td></tr>
684 <tr><td valign="top"></td><td valign="top"><em>ksiz</em>&nbsp;</td><td>the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'. </td></tr>
685 <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>the offset address of the beginning of the region of the value to be read. </td></tr>
686 <tr><td valign="top"></td><td valign="top"><em>max</em>&nbsp;</td><td>the max size to be read. It shuld be equal to or less than the size of the writing buffer. </td></tr>
687 <tr><td valign="top"></td><td valign="top"><em>vbuf</em>&nbsp;</td><td>the pointer to a buffer into which the value of the corresponding record is written. </td></tr>
688 </table>
689 </dd>
690 </dl>
691 <dl class="return"><dt><b>Returns:</b></dt><dd>the return value is the size of the written data. If the silent flag is true and no record corresponds, -1 is returned instead of exception. </dd></dl>
692 <dl><dt><b>Exceptions:</b></dt><dd>
693 <table border="0" cellspacing="2" cellpadding="0">
694 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs, no record corresponds, or the size of the value of the corresponding record is less than `start'. </td></tr>
695 </table>
696 </dd>
697 </dl>
698 <dl class="note"><dt><b>Note:</b></dt><dd>No additional zero code is appended at the end of the region of the writing buffer. </dd></dl>
699
700 </div>
701 </div>
702 <a class="anchor" id="af4415be311b7edea43205a3cd0214f09"></a><!-- doxytag: member="qdbm::Depot::inode" ref="af4415be311b7edea43205a3cd0214f09" args="()" -->
703 <div class="memitem">
704 <div class="memproto">
705 <table class="memname">
706 <tr>
707 <td class="memname">virtual int qdbm::Depot::inode </td>
708 <td>(</td>
709 <td class="paramname"></td>
710 <td>&nbsp;)&nbsp;</td>
711 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
712 </tr>
713 </table>
714 </div>
715 <div class="memdoc">
716
717 <p>Get the inode number of the database file. </p>
718 <dl class="return"><dt><b>Returns:</b></dt><dd>the inode number of the database file. </dd></dl>
719 <dl><dt><b>Exceptions:</b></dt><dd>
720 <table border="0" cellspacing="2" cellpadding="0">
721 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
722 </table>
723 </dd>
724 </dl>
725
726 </div>
727 </div>
728 <a class="anchor" id="aefa6da271461b147fa2d2065b776c9ce"></a><!-- doxytag: member="qdbm::Depot::iterinit" ref="aefa6da271461b147fa2d2065b776c9ce" args="()" -->
729 <div class="memitem">
730 <div class="memproto">
731 <table class="memname">
732 <tr>
733 <td class="memname">virtual void qdbm::Depot::iterinit </td>
734 <td>(</td>
735 <td class="paramname"></td>
736 <td>&nbsp;)&nbsp;</td>
737 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
738 </tr>
739 </table>
740 </div>
741 <div class="memdoc">
742
743 <p>Initialize the iterator of the database handle. </p>
744 <dl><dt><b>Exceptions:</b></dt><dd>
745 <table border="0" cellspacing="2" cellpadding="0">
746 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
747 </table>
748 </dd>
749 </dl>
750 <dl class="note"><dt><b>Note:</b></dt><dd>The iterator is used in order to access the key of every record stored in a database. </dd></dl>
751
752 </div>
753 </div>
754 <a class="anchor" id="a100a816512fba6480c73071e96b3c882"></a><!-- doxytag: member="qdbm::Depot::iternext" ref="a100a816512fba6480c73071e96b3c882" args="(int *sp=0)" -->
755 <div class="memitem">
756 <div class="memproto">
757 <table class="memname">
758 <tr>
759 <td class="memname">virtual char* qdbm::Depot::iternext </td>
760 <td>(</td>
761 <td class="paramtype">int *&nbsp;</td>
762 <td class="paramname"> <em>sp</em> = <code>0</code></td>
763 <td>&nbsp;)&nbsp;</td>
764 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
765 </tr>
766 </table>
767 </div>
768 <div class="memdoc">
769
770 <p>Get the next key of the iterator. </p>
771 <dl><dt><b>Parameters:</b></dt><dd>
772 <table border="0" cellspacing="2" cellpadding="0">
773 <tr><td valign="top"></td><td valign="top"><em>sp</em>&nbsp;</td><td>the pointer to a variable to which the size of the region of the return value is assigned. If it is 0, it is not used. </td></tr>
774 </table>
775 </dd>
776 </dl>
777 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the region of the next key. If the silent flag is true and no record corresponds, 0 is returned instead of exception. </dd></dl>
778 <dl><dt><b>Exceptions:</b></dt><dd>
779 <table border="0" cellspacing="2" cellpadding="0">
780 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record is to be get out of the iterator. </td></tr>
781 </table>
782 </dd>
783 </dl>
784 <dl class="note"><dt><b>Note:</b></dt><dd>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 character string. Because the region of the return value is allocated with the `stdmalloc' call, it should be released with the `stdfree' call if it is no longer in use. It is possible to access every record by iteration of calling this function. However, it is not assured if updating the database is occurred while the iteration. Besides, the order of this traversal access method is arbitrary, so it is not assured that the order of storing matches the one of the traversal access. </dd></dl>
785
786 </div>
787 </div>
788 <a class="anchor" id="ab468d0ea29fa0c00adce15f346633b01"></a><!-- doxytag: member="qdbm::Depot::mtime" ref="ab468d0ea29fa0c00adce15f346633b01" args="()" -->
789 <div class="memitem">
790 <div class="memproto">
791 <table class="memname">
792 <tr>
793 <td class="memname">virtual time_t qdbm::Depot::mtime </td>
794 <td>(</td>
795 <td class="paramname"></td>
796 <td>&nbsp;)&nbsp;</td>
797 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
798 </tr>
799 </table>
800 </div>
801 <div class="memdoc">
802
803 <p>Get the last modified time of the database. </p>
804 <dl class="return"><dt><b>Returns:</b></dt><dd>the last modified time the database. </dd></dl>
805 <dl><dt><b>Exceptions:</b></dt><dd>
806 <table border="0" cellspacing="2" cellpadding="0">
807 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
808 </table>
809 </dd>
810 </dl>
811
812 </div>
813 </div>
814 <a class="anchor" id="a79778919b8e295bfa545fc7fa69ca01a"></a><!-- doxytag: member="qdbm::Depot::name" ref="a79778919b8e295bfa545fc7fa69ca01a" args="()" -->
815 <div class="memitem">
816 <div class="memproto">
817 <table class="memname">
818 <tr>
819 <td class="memname">virtual char* qdbm::Depot::name </td>
820 <td>(</td>
821 <td class="paramname"></td>
822 <td>&nbsp;)&nbsp;</td>
823 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
824 </tr>
825 </table>
826 </div>
827 <div class="memdoc">
828
829 <p>Get the name of the database. </p>
830 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the region of the name of the database. </dd></dl>
831 <dl><dt><b>Exceptions:</b></dt><dd>
832 <table border="0" cellspacing="2" cellpadding="0">
833 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
834 </table>
835 </dd>
836 </dl>
837 <dl class="note"><dt><b>Note:</b></dt><dd>Because the region of the return value is allocated with the `stdmalloc' call, it should be released with the `stdfree' call if it is no longer in use. </dd></dl>
838
839 </div>
840 </div>
841 <a class="anchor" id="a1c953f0c612ea7665e5634c8b230cc62"></a><!-- doxytag: member="qdbm::Depot::nextkey" ref="a1c953f0c612ea7665e5634c8b230cc62" args="()" -->
842 <div class="memitem">
843 <div class="memproto">
844 <table class="memname">
845 <tr>
846 <td class="memname">virtual <a class="el" href="classqdbm_1_1Datum.html">Datum</a> qdbm::Depot::nextkey </td>
847 <td>(</td>
848 <td class="paramname"></td>
849 <td>&nbsp;)&nbsp;</td>
850 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
851 </tr>
852 </table>
853 </div>
854 <div class="memdoc">
855
856 <p>Get the next key. </p>
857 <dl class="return"><dt><b>Returns:</b></dt><dd>a temporary instance of the key of the next record. </dd></dl>
858 <dl><dt><b>Exceptions:</b></dt><dd>
859 <table border="0" cellspacing="2" cellpadding="0">
860 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
861 </table>
862 </dd>
863 </dl>
864
865 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#ae14701fd3087fe35f6c83802cc217bec">qdbm::ADBM</a>.</p>
866
867 </div>
868 </div>
869 <a class="anchor" id="ad27aff090ee8bc3fe1474f680cb31cbe"></a><!-- doxytag: member="qdbm::Depot::optimize" ref="ad27aff090ee8bc3fe1474f680cb31cbe" args="(int bnum=&#45;1)" -->
870 <div class="memitem">
871 <div class="memproto">
872 <table class="memname">
873 <tr>
874 <td class="memname">virtual void qdbm::Depot::optimize </td>
875 <td>(</td>
876 <td class="paramtype">int&nbsp;</td>
877 <td class="paramname"> <em>bnum</em> = <code>-1</code></td>
878 <td>&nbsp;)&nbsp;</td>
879 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
880 </tr>
881 </table>
882 </div>
883 <div class="memdoc">
884
885 <p>Optimize the database. </p>
886 <dl><dt><b>Parameters:</b></dt><dd>
887 <table border="0" cellspacing="2" cellpadding="0">
888 <tr><td valign="top"></td><td valign="top"><em>bnum</em>&nbsp;</td><td>the number of the elements of the bucket array. If it is not more than 0, the default value is specified. </td></tr>
889 </table>
890 </dd>
891 </dl>
892 <dl><dt><b>Exceptions:</b></dt><dd>
893 <table border="0" cellspacing="2" cellpadding="0">
894 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
895 </table>
896 </dd>
897 </dl>
898 <dl class="note"><dt><b>Note:</b></dt><dd>In an alternating succession of deleting and storing with overwrite or concatenate, dispensable regions accumulate. This function is useful to do away with them. </dd></dl>
899
900 </div>
901 </div>
902 <a class="anchor" id="a92de22f3a8994da5c70f43184aacaad2"></a><!-- doxytag: member="qdbm::Depot::out" ref="a92de22f3a8994da5c70f43184aacaad2" args="(const char *kbuf, int ksiz)" -->
903 <div class="memitem">
904 <div class="memproto">
905 <table class="memname">
906 <tr>
907 <td class="memname">virtual bool qdbm::Depot::out </td>
908 <td>(</td>
909 <td class="paramtype">const char *&nbsp;</td>
910 <td class="paramname"> <em>kbuf</em>, </td>
911 </tr>
912 <tr>
913 <td class="paramkey"></td>
914 <td></td>
915 <td class="paramtype">int&nbsp;</td>
916 <td class="paramname"> <em>ksiz</em></td><td>&nbsp;</td>
917 </tr>
918 <tr>
919 <td></td>
920 <td>)</td>
921 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
922 </tr>
923 </table>
924 </div>
925 <div class="memdoc">
926
927 <p>Delete a record. </p>
928 <dl><dt><b>Parameters:</b></dt><dd>
929 <table border="0" cellspacing="2" cellpadding="0">
930 <tr><td valign="top"></td><td valign="top"><em>kbuf</em>&nbsp;</td><td>the pointer to the region of a key. </td></tr>
931 <tr><td valign="top"></td><td valign="top"><em>ksiz</em>&nbsp;</td><td>the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'. </td></tr>
932 </table>
933 </dd>
934 </dl>
935 <dl class="return"><dt><b>Returns:</b></dt><dd>always true. However, if the silent flag is true and no record corresponds, false is returned instead of exception. </dd></dl>
936 <dl><dt><b>Exceptions:</b></dt><dd>
937 <table border="0" cellspacing="2" cellpadding="0">
938 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
939 </table>
940 </dd>
941 </dl>
942
943 </div>
944 </div>
945 <a class="anchor" id="af26f269651b643b104a29592cbff1516"></a><!-- doxytag: member="qdbm::Depot::put" ref="af26f269651b643b104a29592cbff1516" args="(const char *kbuf, int ksiz, const char *vbuf, int vsiz, int dmode=Depot::DOVER)" -->
946 <div class="memitem">
947 <div class="memproto">
948 <table class="memname">
949 <tr>
950 <td class="memname">virtual bool qdbm::Depot::put </td>
951 <td>(</td>
952 <td class="paramtype">const char *&nbsp;</td>
953 <td class="paramname"> <em>kbuf</em>, </td>
954 </tr>
955 <tr>
956 <td class="paramkey"></td>
957 <td></td>
958 <td class="paramtype">int&nbsp;</td>
959 <td class="paramname"> <em>ksiz</em>, </td>
960 </tr>
961 <tr>
962 <td class="paramkey"></td>
963 <td></td>
964 <td class="paramtype">const char *&nbsp;</td>
965 <td class="paramname"> <em>vbuf</em>, </td>
966 </tr>
967 <tr>
968 <td class="paramkey"></td>
969 <td></td>
970 <td class="paramtype">int&nbsp;</td>
971 <td class="paramname"> <em>vsiz</em>, </td>
972 </tr>
973 <tr>
974 <td class="paramkey"></td>
975 <td></td>
976 <td class="paramtype">int&nbsp;</td>
977 <td class="paramname"> <em>dmode</em> = <code><a class="el" href="classqdbm_1_1Depot.html#a9a3b1e2559593f76c7841efec6d0ea1c">Depot::DOVER</a></code></td><td>&nbsp;</td>
978 </tr>
979 <tr>
980 <td></td>
981 <td>)</td>
982 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
983 </tr>
984 </table>
985 </div>
986 <div class="memdoc">
987
988 <p>Store a record. </p>
989 <dl><dt><b>Parameters:</b></dt><dd>
990 <table border="0" cellspacing="2" cellpadding="0">
991 <tr><td valign="top"></td><td valign="top"><em>kbuf</em>&nbsp;</td><td>the pointer to the region of a key. </td></tr>
992 <tr><td valign="top"></td><td valign="top"><em>ksiz</em>&nbsp;</td><td>the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'. </td></tr>
993 <tr><td valign="top"></td><td valign="top"><em>vbuf</em>&nbsp;</td><td>the pointer to the region of a value. </td></tr>
994 <tr><td valign="top"></td><td valign="top"><em>vsiz</em>&nbsp;</td><td>the size of the region of the value. If it is negative, the size is assigned with `stdstrlen(vbuf)'. </td></tr>
995 <tr><td valign="top"></td><td valign="top"><em>dmode</em>&nbsp;</td><td>behavior when the key overlaps, by the following values: `DepotDOVER', which means the specified value overwrites the existing one, `DepotDKEEP', which means the existing value is kept, `DepotDCAT', which means the specified value is concatenated at the end of the existing value. </td></tr>
996 </table>
997 </dd>
998 </dl>
999 <dl class="return"><dt><b>Returns:</b></dt><dd>always true. However, if the silent flag is true and replace is cancelled, false is returned instead of exception. </dd></dl>
1000 <dl><dt><b>Exceptions:</b></dt><dd>
1001 <table border="0" cellspacing="2" cellpadding="0">
1002 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or replace is cancelled. </td></tr>
1003 </table>
1004 </dd>
1005 </dl>
1006
1007 </div>
1008 </div>
1009 <a class="anchor" id="af48f660cf8bf90035f71782113b86a23"></a><!-- doxytag: member="qdbm::Depot::remove" ref="af48f660cf8bf90035f71782113b86a23" args="(const char *name)" -->
1010 <div class="memitem">
1011 <div class="memproto">
1012 <table class="memname">
1013 <tr>
1014 <td class="memname">static void qdbm::Depot::remove </td>
1015 <td>(</td>
1016 <td class="paramtype">const char *&nbsp;</td>
1017 <td class="paramname"> <em>name</em></td>
1018 <td>&nbsp;)&nbsp;</td>
1019 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [static]</code></td>
1020 </tr>
1021 </table>
1022 </div>
1023 <div class="memdoc">
1024
1025 <p>Remove a database file. </p>
1026 <dl><dt><b>Parameters:</b></dt><dd>
1027 <table border="0" cellspacing="2" cellpadding="0">
1028 <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the name of a database file. </td></tr>
1029 </table>
1030 </dd>
1031 </dl>
1032 <dl><dt><b>Exceptions:</b></dt><dd>
1033 <table border="0" cellspacing="2" cellpadding="0">
1034 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
1035 </table>
1036 </dd>
1037 </dl>
1038
1039 </div>
1040 </div>
1041 <a class="anchor" id="a752acfeb96535df0076b15ab7844d4e6"></a><!-- doxytag: member="qdbm::Depot::rnum" ref="a752acfeb96535df0076b15ab7844d4e6" args="()" -->
1042 <div class="memitem">
1043 <div class="memproto">
1044 <table class="memname">
1045 <tr>
1046 <td class="memname">virtual int qdbm::Depot::rnum </td>
1047 <td>(</td>
1048 <td class="paramname"></td>
1049 <td>&nbsp;)&nbsp;</td>
1050 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1051 </tr>
1052 </table>
1053 </div>
1054 <div class="memdoc">
1055
1056 <p>Get the number of the records stored in the database. </p>
1057 <dl class="return"><dt><b>Returns:</b></dt><dd>the number of the records stored in the database. </dd></dl>
1058 <dl><dt><b>Exceptions:</b></dt><dd>
1059 <table border="0" cellspacing="2" cellpadding="0">
1060 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
1061 </table>
1062 </dd>
1063 </dl>
1064
1065 </div>
1066 </div>
1067 <a class="anchor" id="a17708cb3a339d17ac4c6921672ea3e2f"></a><!-- doxytag: member="qdbm::Depot::setalign" ref="a17708cb3a339d17ac4c6921672ea3e2f" args="(int align)" -->
1068 <div class="memitem">
1069 <div class="memproto">
1070 <table class="memname">
1071 <tr>
1072 <td class="memname">virtual void qdbm::Depot::setalign </td>
1073 <td>(</td>
1074 <td class="paramtype">int&nbsp;</td>
1075 <td class="paramname"> <em>align</em></td>
1076 <td>&nbsp;)&nbsp;</td>
1077 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1078 </tr>
1079 </table>
1080 </div>
1081 <div class="memdoc">
1082
1083 <p>Set alignment of the database handle. </p>
1084 <dl><dt><b>Parameters:</b></dt><dd>
1085 <table border="0" cellspacing="2" cellpadding="0">
1086 <tr><td valign="top"></td><td valign="top"><em>align</em>&nbsp;</td><td>the basic size of alignment. </td></tr>
1087 </table>
1088 </dd>
1089 </dl>
1090 <dl><dt><b>Exceptions:</b></dt><dd>
1091 <table border="0" cellspacing="2" cellpadding="0">
1092 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
1093 </table>
1094 </dd>
1095 </dl>
1096 <dl class="note"><dt><b>Note:</b></dt><dd>If alignment is set to a database, the efficiency of overwriting values is improved. The size of alignment is suggested to be average size of the values of the records to be stored. If alignment is positive, padding whose size is multiple number of the alignment is placed. If alignment is negative, as `vsiz' is the size of a value, the size of padding is calculated with `(vsiz / pow(2, abs(align) - 1))'. Because alignment setting is not saved in a database, you should specify alignment every opening a database. </dd></dl>
1097
1098 </div>
1099 </div>
1100 <a class="anchor" id="aa230701175adec7ff32148d2059d61fe"></a><!-- doxytag: member="qdbm::Depot::setfbpsiz" ref="aa230701175adec7ff32148d2059d61fe" args="(int size)" -->
1101 <div class="memitem">
1102 <div class="memproto">
1103 <table class="memname">
1104 <tr>
1105 <td class="memname">virtual void qdbm::Depot::setfbpsiz </td>
1106 <td>(</td>
1107 <td class="paramtype">int&nbsp;</td>
1108 <td class="paramname"> <em>size</em></td>
1109 <td>&nbsp;)&nbsp;</td>
1110 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1111 </tr>
1112 </table>
1113 </div>
1114 <div class="memdoc">
1115
1116 <p>Set the size of the free block pool. </p>
1117 <dl><dt><b>Parameters:</b></dt><dd>
1118 <table border="0" cellspacing="2" cellpadding="0">
1119 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>the size of the free block pool of a database. </td></tr>
1120 </table>
1121 </dd>
1122 </dl>
1123 <dl><dt><b>Exceptions:</b></dt><dd>
1124 <table border="0" cellspacing="2" cellpadding="0">
1125 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
1126 </table>
1127 </dd>
1128 </dl>
1129 <dl class="note"><dt><b>Note:</b></dt><dd>The default size of the free block pool is 16. If the size is greater, the space efficiency of overwriting values is improved with the time efficiency sacrificed. </dd></dl>
1130
1131 </div>
1132 </div>
1133 <a class="anchor" id="a0d4a00a98dc6665a657bc1e6be34a38b"></a><!-- doxytag: member="qdbm::Depot::snaffle" ref="a0d4a00a98dc6665a657bc1e6be34a38b" args="(const char *name, const char *kbuf, int ksiz, int *sp)" -->
1134 <div class="memitem">
1135 <div class="memproto">
1136 <table class="memname">
1137 <tr>
1138 <td class="memname">static char* qdbm::Depot::snaffle </td>
1139 <td>(</td>
1140 <td class="paramtype">const char *&nbsp;</td>
1141 <td class="paramname"> <em>name</em>, </td>
1142 </tr>
1143 <tr>
1144 <td class="paramkey"></td>
1145 <td></td>
1146 <td class="paramtype">const char *&nbsp;</td>
1147 <td class="paramname"> <em>kbuf</em>, </td>
1148 </tr>
1149 <tr>
1150 <td class="paramkey"></td>
1151 <td></td>
1152 <td class="paramtype">int&nbsp;</td>
1153 <td class="paramname"> <em>ksiz</em>, </td>
1154 </tr>
1155 <tr>
1156 <td class="paramkey"></td>
1157 <td></td>
1158 <td class="paramtype">int *&nbsp;</td>
1159 <td class="paramname"> <em>sp</em></td><td>&nbsp;</td>
1160 </tr>
1161 <tr>
1162 <td></td>
1163 <td>)</td>
1164 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [static]</code></td>
1165 </tr>
1166 </table>
1167 </div>
1168 <div class="memdoc">
1169
1170 <p>Retrieve a record directly from a database file. </p>
1171 <dl><dt><b>Parameters:</b></dt><dd>
1172 <table border="0" cellspacing="2" cellpadding="0">
1173 <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the name of a database file. </td></tr>
1174 <tr><td valign="top"></td><td valign="top"><em>kbuf</em>&nbsp;</td><td>the pointer to the region of a key. </td></tr>
1175 <tr><td valign="top"></td><td valign="top"><em>ksiz</em>&nbsp;</td><td>the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'. </td></tr>
1176 <tr><td valign="top"></td><td valign="top"><em>sp</em>&nbsp;</td><td>the pointer to a variable to which the size of the region of the return value is assigned. If it is 0, it is not used. </td></tr>
1177 </table>
1178 </dd>
1179 </dl>
1180 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the region of the value of the corresponding record. </dd></dl>
1181 <dl><dt><b>Exceptions:</b></dt><dd>
1182 <table border="0" cellspacing="2" cellpadding="0">
1183 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
1184 </table>
1185 </dd>
1186 </dl>
1187 <dl class="note"><dt><b>Note:</b></dt><dd>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 character string. Because the region of the return value is allocated with the `stdmalloc' call, it should be released with the `stdfree' call if it is no longer in use. Although this method can be used even while the database file is locked by another process, it is not assured that recent updated is reflected. </dd></dl>
1188
1189 </div>
1190 </div>
1191 <a class="anchor" id="ad1c017447ccb152ca6aa3d525eb877e6"></a><!-- doxytag: member="qdbm::Depot::storerec" ref="ad1c017447ccb152ca6aa3d525eb877e6" args="(const Datum &amp;key, const Datum &amp;val, bool replace=true)" -->
1192 <div class="memitem">
1193 <div class="memproto">
1194 <table class="memname">
1195 <tr>
1196 <td class="memname">virtual void qdbm::Depot::storerec </td>
1197 <td>(</td>
1198 <td class="paramtype">const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;&nbsp;</td>
1199 <td class="paramname"> <em>key</em>, </td>
1200 </tr>
1201 <tr>
1202 <td class="paramkey"></td>
1203 <td></td>
1204 <td class="paramtype">const <a class="el" href="classqdbm_1_1Datum.html">Datum</a> &amp;&nbsp;</td>
1205 <td class="paramname"> <em>val</em>, </td>
1206 </tr>
1207 <tr>
1208 <td class="paramkey"></td>
1209 <td></td>
1210 <td class="paramtype">bool&nbsp;</td>
1211 <td class="paramname"> <em>replace</em> = <code>true</code></td><td>&nbsp;</td>
1212 </tr>
1213 <tr>
1214 <td></td>
1215 <td>)</td>
1216 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1217 </tr>
1218 </table>
1219 </div>
1220 <div class="memdoc">
1221
1222 <p>Store a record. </p>
1223 <dl><dt><b>Parameters:</b></dt><dd>
1224 <table border="0" cellspacing="2" cellpadding="0">
1225 <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>reference to a key object. </td></tr>
1226 <tr><td valign="top"></td><td valign="top"><em>val</em>&nbsp;</td><td>reference to a value object. </td></tr>
1227 <tr><td valign="top"></td><td valign="top"><em>replace</em>&nbsp;</td><td>whether the existing value is to be overwritten or not. </td></tr>
1228 </table>
1229 </dd>
1230 </dl>
1231 <dl><dt><b>Exceptions:</b></dt><dd>
1232 <table border="0" cellspacing="2" cellpadding="0">
1233 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or replace is cancelled. </td></tr>
1234 </table>
1235 </dd>
1236 </dl>
1237
1238 <p>Implements <a class="el" href="classqdbm_1_1ADBM.html#aeb819b3cf03cf0aa2924665c73b04481">qdbm::ADBM</a>.</p>
1239
1240 </div>
1241 </div>
1242 <a class="anchor" id="a89ab9e21f1cfe557c2be9cc08f687501"></a><!-- doxytag: member="qdbm::Depot::sync" ref="a89ab9e21f1cfe557c2be9cc08f687501" args="()" -->
1243 <div class="memitem">
1244 <div class="memproto">
1245 <table class="memname">
1246 <tr>
1247 <td class="memname">virtual void qdbm::Depot::sync </td>
1248 <td>(</td>
1249 <td class="paramname"></td>
1250 <td>&nbsp;)&nbsp;</td>
1251 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1252 </tr>
1253 </table>
1254 </div>
1255 <div class="memdoc">
1256
1257 <p>Synchronize updating contents with the file and the device. </p>
1258 <dl><dt><b>Exceptions:</b></dt><dd>
1259 <table border="0" cellspacing="2" cellpadding="0">
1260 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
1261 </table>
1262 </dd>
1263 </dl>
1264 <dl class="note"><dt><b>Note:</b></dt><dd>This function is useful when another process uses the connected database file. </dd></dl>
1265
1266 </div>
1267 </div>
1268 <a class="anchor" id="a2add0b20314e0a1b365d4b637d450ffa"></a><!-- doxytag: member="qdbm::Depot::version" ref="a2add0b20314e0a1b365d4b637d450ffa" args="()" -->
1269 <div class="memitem">
1270 <div class="memproto">
1271 <table class="memname">
1272 <tr>
1273 <td class="memname">static const char* qdbm::Depot::version </td>
1274 <td>(</td>
1275 <td class="paramname"></td>
1276 <td>&nbsp;)&nbsp;</td>
1277 <td> throw ()<code> [static]</code></td>
1278 </tr>
1279 </table>
1280 </div>
1281 <div class="memdoc">
1282
1283 <p>Get the version information. </p>
1284 <dl class="return"><dt><b>Returns:</b></dt><dd>the string of the version information. </dd></dl>
1285
1286 </div>
1287 </div>
1288 <a class="anchor" id="a1371e7ec30bbe565e6ec64f340785228"></a><!-- doxytag: member="qdbm::Depot::vsiz" ref="a1371e7ec30bbe565e6ec64f340785228" args="(const char *kbuf, int ksiz)" -->
1289 <div class="memitem">
1290 <div class="memproto">
1291 <table class="memname">
1292 <tr>
1293 <td class="memname">virtual int qdbm::Depot::vsiz </td>
1294 <td>(</td>
1295 <td class="paramtype">const char *&nbsp;</td>
1296 <td class="paramname"> <em>kbuf</em>, </td>
1297 </tr>
1298 <tr>
1299 <td class="paramkey"></td>
1300 <td></td>
1301 <td class="paramtype">int&nbsp;</td>
1302 <td class="paramname"> <em>ksiz</em></td><td>&nbsp;</td>
1303 </tr>
1304 <tr>
1305 <td></td>
1306 <td>)</td>
1307 <td></td><td></td><td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1308 </tr>
1309 </table>
1310 </div>
1311 <div class="memdoc">
1312
1313 <p>Get the size of the value of a record. </p>
1314 <dl><dt><b>Parameters:</b></dt><dd>
1315 <table border="0" cellspacing="2" cellpadding="0">
1316 <tr><td valign="top"></td><td valign="top"><em>kbuf</em>&nbsp;</td><td>the pointer to the region of a key. </td></tr>
1317 <tr><td valign="top"></td><td valign="top"><em>ksiz</em>&nbsp;</td><td>the size of the region of the key. If it is negative, the size is assigned with `stdstrlen(kbuf)'. </td></tr>
1318 </table>
1319 </dd>
1320 </dl>
1321 <dl class="return"><dt><b>Returns:</b></dt><dd>the size of the value of the corresponding record. If the silent flag is true and no record corresponds, -1 is returned instead of exception. </dd></dl>
1322 <dl><dt><b>Exceptions:</b></dt><dd>
1323 <table border="0" cellspacing="2" cellpadding="0">
1324 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs or no record corresponds. </td></tr>
1325 </table>
1326 </dd>
1327 </dl>
1328 <dl class="note"><dt><b>Note:</b></dt><dd>Because this function does not read the entity of a record, it is faster than `get'. </dd></dl>
1329
1330 </div>
1331 </div>
1332 <a class="anchor" id="a21308a7de25b2a4d1b367fdfa12896c1"></a><!-- doxytag: member="qdbm::Depot::writable" ref="a21308a7de25b2a4d1b367fdfa12896c1" args="()" -->
1333 <div class="memitem">
1334 <div class="memproto">
1335 <table class="memname">
1336 <tr>
1337 <td class="memname">virtual bool qdbm::Depot::writable </td>
1338 <td>(</td>
1339 <td class="paramname"></td>
1340 <td>&nbsp;)&nbsp;</td>
1341 <td> throw (<a class="el" href="classqdbm_1_1Depot__error.html">Depot_error</a>)<code> [virtual]</code></td>
1342 </tr>
1343 </table>
1344 </div>
1345 <div class="memdoc">
1346
1347 <p>Check whether the database handle is a writer or not. </p>
1348 <dl class="return"><dt><b>Returns:</b></dt><dd>true if the handle is a writer, false if not. </dd></dl>
1349 <dl><dt><b>Exceptions:</b></dt><dd>
1350 <table border="0" cellspacing="2" cellpadding="0">
1351 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classqdbm_1_1Depot__error.html" title="Error container for Depot.">Depot_error</a></em>&nbsp;</td><td>if an error occurs. </td></tr>
1352 </table>
1353 </dd>
1354 </dl>
1355
1356 </div>
1357 </div>
1358 <hr/>The documentation for this class was generated from the following file:<ul>
1359 <li>xdepot.h</li>
1360 </ul>
1361 </div>
1362 <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Aug 5 02:15:30 2010 for QDBM for C++ by&nbsp;
1363 <a href="http://www.doxygen.org/index.html">
1364 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
1365 </body>
1366 </html>