1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
3 |
<title>DatabasePrimitivesLibrary: Database Primitives</title> |
4 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
5 |
</head><body> |
6 |
<!-- Generated by Doxygen 1.4.4 --> |
7 |
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div> |
8 |
<h1>Database Primitives</h1><hr><a name="_details"></a><h2>Detailed Description</h2> |
9 |
This module describes interfaces common to all database modules--mainly the macros concerned with manipulating database keys and the definition of the key structure.<p> |
10 |
The key may be any arbitrary pointer, including a pointer to a string. Everything that handles a key either copies the contents of the <a class="el" href="group__dbprim.html#ga0">db_key_t</a> structure or passes it to a user-defined function. If required, as in the case of a string, a length may also be represented in the key structure. |
11 |
<p> |
12 |
<table border="0" cellpadding="0" cellspacing="0"> |
13 |
<tr><td></td></tr> |
14 |
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> |
15 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct__db__key__s.html">_db_key_s</a></td></tr> |
16 |
|
17 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key structure. <a href="struct__db__key__s.html#_details">More...</a><br></td></tr> |
18 |
<tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
19 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim.html#ga1">DB_KEY_INIT</a>(key, size)</td></tr> |
20 |
|
21 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key static initializer. <a href="#ga1"></a><br></td></tr> |
22 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim.html#ga2">dk_key</a>(key)</td></tr> |
23 |
|
24 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key accessor macro. <a href="#ga2"></a><br></td></tr> |
25 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim.html#ga3">dk_len</a>(key)</td></tr> |
26 |
|
27 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key length accessor macro. <a href="#ga3"></a><br></td></tr> |
28 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim.html#ga4">DB_FLAG_REVERSE</a></td></tr> |
29 |
|
30 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reverse flag. <a href="#ga4"></a><br></td></tr> |
31 |
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> |
32 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="struct__db__key__s.html">_db_key_s</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbprim.html#ga0">db_key_t</a></td></tr> |
33 |
|
34 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key. <a href="#ga0"></a><br></td></tr> |
35 |
</table> |
36 |
<hr><h2>Define Documentation</h2> |
37 |
<a class="anchor" name="ga4"></a><!-- doxytag: member="dbprim.h::DB_FLAG_REVERSE" ref="ga4" args="" --><p> |
38 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
39 |
<tr> |
40 |
<td class="mdRow"> |
41 |
<table cellpadding="0" cellspacing="0" border="0"> |
42 |
<tr> |
43 |
<td class="md" nowrap valign="top">#define DB_FLAG_REVERSE </td> |
44 |
</tr> |
45 |
</table> |
46 |
</td> |
47 |
</tr> |
48 |
</table> |
49 |
<table cellspacing="5" cellpadding="0" border="0"> |
50 |
<tr> |
51 |
<td> |
52 |
|
53 |
</td> |
54 |
<td> |
55 |
|
56 |
<p> |
57 |
This flag can be passed to ordered iterations to reverse the order of the iterations. |
58 |
<p> |
59 |
Definition at line <a class="el" href="dbprim_8h-source.html#l00629">629</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. |
60 |
<p> |
61 |
Referenced by <a class="el" href="ll__iter_8c-source.html#l00034">ll_iter()</a>, and <a class="el" href="rt__next_8c-source.html#l00034">rt_next()</a>. </td> |
62 |
</tr> |
63 |
</table> |
64 |
<a class="anchor" name="ga1"></a><!-- doxytag: member="dbprim.h::DB_KEY_INIT" ref="ga1" args="(key, size)" --><p> |
65 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
66 |
<tr> |
67 |
<td class="mdRow"> |
68 |
<table cellpadding="0" cellspacing="0" border="0"> |
69 |
<tr> |
70 |
<td class="md" nowrap valign="top">#define DB_KEY_INIT </td> |
71 |
<td class="md" valign="top">( </td> |
72 |
<td class="md" nowrap valign="top">key, <tr> |
73 |
<td class="md" nowrap align="right"></td> |
74 |
<td class="md"></td> |
75 |
<td class="md" nowrap>size </td> |
76 |
<td class="mdname1" valign="top" nowrap> </td> |
77 |
<td class="md" valign="top"> ) </td> |
78 |
<td class="md" nowrap></td> |
79 |
</tr> |
80 |
</table> |
81 |
</td> |
82 |
</tr> |
83 |
</table> |
84 |
<table cellspacing="5" cellpadding="0" border="0"> |
85 |
<tr> |
86 |
<td> |
87 |
|
88 |
</td> |
89 |
<td> |
90 |
|
91 |
<p> |
92 |
This macro allows a <a class="el" href="group__dbprim.html#ga0">db_key_t</a> to be initialized statically.<p> |
93 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
94 |
<table border="0" cellspacing="2" cellpadding="0"> |
95 |
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>key</em> </td><td>A pointer to the key. </td></tr> |
96 |
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>size</em> </td><td>Size of the key.</td></tr> |
97 |
</table> |
98 |
</dl> |
99 |
|
100 |
<p> |
101 |
Definition at line <a class="el" href="dbprim_8h-source.html#l00596">596</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td> |
102 |
</tr> |
103 |
</table> |
104 |
<a class="anchor" name="ga2"></a><!-- doxytag: member="dbprim.h::dk_key" ref="ga2" args="(key)" --><p> |
105 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
106 |
<tr> |
107 |
<td class="mdRow"> |
108 |
<table cellpadding="0" cellspacing="0" border="0"> |
109 |
<tr> |
110 |
<td class="md" nowrap valign="top">#define dk_key </td> |
111 |
<td class="md" valign="top">( </td> |
112 |
<td class="md" nowrap valign="top">key </td> |
113 |
<td class="mdname1" valign="top" nowrap> </td> |
114 |
<td class="md" valign="top"> ) </td> |
115 |
<td class="md" nowrap></td> |
116 |
</tr> |
117 |
</table> |
118 |
</td> |
119 |
</tr> |
120 |
</table> |
121 |
<table cellspacing="5" cellpadding="0" border="0"> |
122 |
<tr> |
123 |
<td> |
124 |
|
125 |
</td> |
126 |
<td> |
127 |
|
128 |
<p> |
129 |
This macro allows access to the key field of a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>. It may be used as an lvalue in order to assign a key to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>.<p> |
130 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
131 |
<table border="0" cellspacing="2" cellpadding="0"> |
132 |
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>key</em> </td><td>A pointer to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>.</td></tr> |
133 |
</table> |
134 |
</dl> |
135 |
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a key (<code>void *</code>).</dd></dl> |
136 |
|
137 |
<p> |
138 |
Definition at line <a class="el" href="dbprim_8h-source.html#l00608">608</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. |
139 |
<p> |
140 |
Referenced by <a class="el" href="sh__find_8c-source.html#l00061">_sh_find_comp()</a>, <a class="el" href="hash__comp_8c-source.html#l00036">hash_comp()</a>, <a class="el" href="hash__fnv1_8c-source.html#l00035">hash_fnv1()</a>, <a class="el" href="hash__fnv1a_8c-source.html#l00035">hash_fnv1a()</a>, <a class="el" href="rbtree__comp_8c-source.html#l00037">rbtree_comp()</a>, <a class="el" href="sh__find_8c-source.html#l00072">sh_find()</a>, <a class="el" href="st__add_8c-source.html#l00036">st_add()</a>, and <a class="el" href="st__find_8c-source.html#l00036">st_find()</a>. </td> |
141 |
</tr> |
142 |
</table> |
143 |
<a class="anchor" name="ga3"></a><!-- doxytag: member="dbprim.h::dk_len" ref="ga3" args="(key)" --><p> |
144 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
145 |
<tr> |
146 |
<td class="mdRow"> |
147 |
<table cellpadding="0" cellspacing="0" border="0"> |
148 |
<tr> |
149 |
<td class="md" nowrap valign="top">#define dk_len </td> |
150 |
<td class="md" valign="top">( </td> |
151 |
<td class="md" nowrap valign="top">key </td> |
152 |
<td class="mdname1" valign="top" nowrap> </td> |
153 |
<td class="md" valign="top"> ) </td> |
154 |
<td class="md" nowrap></td> |
155 |
</tr> |
156 |
</table> |
157 |
</td> |
158 |
</tr> |
159 |
</table> |
160 |
<table cellspacing="5" cellpadding="0" border="0"> |
161 |
<tr> |
162 |
<td> |
163 |
|
164 |
</td> |
165 |
<td> |
166 |
|
167 |
<p> |
168 |
This macro allows access to the key length field of a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>. It may be used as an lvalue in order to assign a length to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>.<p> |
169 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
170 |
<table border="0" cellspacing="2" cellpadding="0"> |
171 |
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>key</em> </td><td>A pointer to a <a class="el" href="group__dbprim.html#ga0">db_key_t</a>.</td></tr> |
172 |
</table> |
173 |
</dl> |
174 |
<dl compact><dt><b>Returns:</b></dt><dd>An <code>int</code> describing the length of the key.</dd></dl> |
175 |
|
176 |
<p> |
177 |
Definition at line <a class="el" href="dbprim_8h-source.html#l00621">621</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. |
178 |
<p> |
179 |
Referenced by <a class="el" href="hash__comp_8c-source.html#l00036">hash_comp()</a>, <a class="el" href="hash__fnv1_8c-source.html#l00035">hash_fnv1()</a>, <a class="el" href="hash__fnv1a_8c-source.html#l00035">hash_fnv1a()</a>, <a class="el" href="rbtree__comp_8c-source.html#l00037">rbtree_comp()</a>, <a class="el" href="st__add_8c-source.html#l00036">st_add()</a>, and <a class="el" href="st__find_8c-source.html#l00036">st_find()</a>. </td> |
180 |
</tr> |
181 |
</table> |
182 |
<hr><h2>Typedef Documentation</h2> |
183 |
<a class="anchor" name="ga0"></a><!-- doxytag: member="dbprim.h::db_key_t" ref="ga0" args="" --><p> |
184 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
185 |
<tr> |
186 |
<td class="mdRow"> |
187 |
<table cellpadding="0" cellspacing="0" border="0"> |
188 |
<tr> |
189 |
<td class="md" nowrap valign="top">typedef struct <a class="el" href="struct__db__key__s.html">_db_key_s</a> <a class="el" href="struct__db__key__s.html">db_key_t</a> </td> |
190 |
</tr> |
191 |
</table> |
192 |
</td> |
193 |
</tr> |
194 |
</table> |
195 |
<table cellspacing="5" cellpadding="0" border="0"> |
196 |
<tr> |
197 |
<td> |
198 |
|
199 |
</td> |
200 |
<td> |
201 |
|
202 |
<p> |
203 |
This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with <a class="el" href="group__dbprim.html#ga2">dk_key()</a> and <a class="el" href="group__dbprim.html#ga3">dk_len()</a>. |
204 |
<p> |
205 |
Definition at line <a class="el" href="dbprim_8h-source.html#l00254">254</a> of file <a class="el" href="dbprim_8h-source.html">dbprim.h</a>. </td> |
206 |
</tr> |
207 |
</table> |
208 |
<hr size="1"><address style="align: right;"><small>Generated on Sat Jul 15 14:10:56 2006 for DatabasePrimitivesLibrary by |
209 |
<a href="http://www.doxygen.org/index.html"> |
210 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> |
211 |
</body> |
212 |
</html> |