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>PEAK Library: Dictionary</title> |
4 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
5 |
</head><body> |
6 |
<!-- Generated by Doxygen 1.3.5 --> |
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="annotated.html">Data Structures</a> | <a class="qindex" href="functions.html">Data Fields</a></div> |
8 |
<h1>Dictionary<br> |
9 |
<small> |
10 |
[<a class="el" href="group__db.html">Database</a>]</small> |
11 |
</h1><hr><a name="_details"></a><h2>Detailed Description</h2> |
12 |
<dl compact><dt><b></b></dt><dd>Generic object-oriented dictionary support. It implements a container which pairs pointer-sized keys with pointer-sized values. Values are accessed via arbitrary user-defined keys. </dd></dl> |
13 |
|
14 |
<p> |
15 |
<table border=0 cellpadding=0 cellspacing=0> |
16 |
<tr><td></td></tr> |
17 |
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr> |
18 |
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="structpeak__dict__init__entry.html">peak_dict_init_entry</a></td></tr> |
19 |
|
20 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Structure containing a key and value pair to be used at the creation of the dictionary. </em> <a href="structpeak__dict__init__entry.html#_details">More...</a><em><br><br></td></tr> |
21 |
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a></td></tr> |
22 |
|
23 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Structure containing the callbacks for keys of a dictionary. </em> <a href="structpeak__dict__key__ops__s.html#_details">More...</a><em><br><br></td></tr> |
24 |
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a></td></tr> |
25 |
|
26 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Structure containing the callbacks for values of a dictionary. </em> <a href="structpeak__dict__value__ops__s.html#_details">More...</a><em><br><br></td></tr> |
27 |
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr> |
28 |
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga0" doxytag="dict::peak_dict" ></a> |
29 |
typedef __peak_dict * </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga0">peak_dict</a></td></tr> |
30 |
|
31 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Opaque dictionary pointer type. <br><br></td></tr> |
32 |
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga1" doxytag="dict::peak_dict_retain_callback" ></a> |
33 |
typedef void *(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga1">peak_dict_retain_callback</a> )(const void *value)</td></tr> |
34 |
|
35 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dictionary's key or value retain callback. <br><br></td></tr> |
36 |
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga2" doxytag="dict::peak_dict_release_callback" ></a> |
37 |
typedef void(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga2">peak_dict_release_callback</a> )(const void *value)</td></tr> |
38 |
|
39 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dictionary's key or value release callback. <br><br></td></tr> |
40 |
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef int(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga3">peak_dict_equal_callback</a> )(const void *val1, const void *val2)</td></tr> |
41 |
|
42 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dictionary's key equal callback. <a href="#ga3"></a><br><br></td></tr> |
43 |
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef uint32_t(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga4">peak_dict_hash_callback</a> )(const void *value)</td></tr> |
44 |
|
45 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dictionary's key callback. <a href="#ga4"></a><br><br></td></tr> |
46 |
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="ga21" doxytag="dict::peak_dict_apply_func" ></a> |
47 |
typedef void(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga21">peak_dict_apply_func</a> )(const void *key, const void *value, void *context)</td></tr> |
48 |
|
49 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Apply function pointer type. See <a class="el" href="group__dict.html#ga28">peak_dict_apply()</a>. <br><br></td></tr> |
50 |
<tr><td colspan=2><br><h2>Functions</h2></td></tr> |
51 |
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__dict.html#ga0">peak_dict</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga22">peak_dict_create</a> (const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> *key_ops, const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> *value_ops, const <a class="el" href="structpeak__dict__init__entry.html">peak_dict_init_entry</a> *init_values, int num_values)</td></tr> |
52 |
|
53 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new dictionary. <a href="#ga22"></a><br><br></td></tr> |
54 |
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga23">peak_dict_get_count</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict)</td></tr> |
55 |
|
56 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of values currently in the dictionary. <a href="#ga23"></a><br><br></td></tr> |
57 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const void * </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga24">peak_dict_get_value</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, const void *key)</td></tr> |
58 |
|
59 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the value associated with the given key. <a href="#ga24"></a><br><br></td></tr> |
60 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga25">peak_dict_get_all</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, const void **keys, const void **values)</td></tr> |
61 |
|
62 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves all key and value pairs. <a href="#ga25"></a><br><br></td></tr> |
63 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga26">peak_dict_apply</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, <a class="el" href="group__dict.html#ga21">peak_dict_apply_func</a> applier, void *context)</td></tr> |
64 |
|
65 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Call a function once for each value in the dictionary. <a href="#ga26"></a><br><br></td></tr> |
66 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga27">peak_dict_add</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, const void *key, const void *value)</td></tr> |
67 |
|
68 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">"Add if absent" a key and value pair to the dictionary. <a href="#ga27"></a><br><br></td></tr> |
69 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga28">peak_dict_set</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, const void *key, const void *value)</td></tr> |
70 |
|
71 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">"Add if absent, replace is present" a key and value pair. <a href="#ga28"></a><br><br></td></tr> |
72 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga29">peak_dict_replace</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, const void *key, const void *value)</td></tr> |
73 |
|
74 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">"Replace if present" a key and value pair. <a href="#ga29"></a><br><br></td></tr> |
75 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga30">peak_dict_remove</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict, const void *key)</td></tr> |
76 |
|
77 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a key and value pair from the dictionary. <a href="#ga30"></a><br><br></td></tr> |
78 |
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga31">peak_dict_clear</a> (<a class="el" href="group__dict.html#ga0">peak_dict</a> dict)</td></tr> |
79 |
|
80 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all values from the dictionary. <a href="#ga31"></a><br><br></td></tr> |
81 |
<tr><td colspan=2><br><h2>Variables</h2></td></tr> |
82 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga5">peak_dict_null_key_ops</a></td></tr> |
83 |
|
84 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga6">peak_dict_null_key_ops</a></td></tr> |
85 |
|
86 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga7">peak_dict_string_key_ops</a></td></tr> |
87 |
|
88 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga8">peak_dict_string_key_ops</a></td></tr> |
89 |
|
90 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga9">peak_dict_string_copy_key_ops</a></td></tr> |
91 |
|
92 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga10">peak_dict_string_copy_key_ops</a></td></tr> |
93 |
|
94 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga11">peak_dict_stringcase_key_ops</a></td></tr> |
95 |
|
96 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga12">peak_dict_stringcase_key_ops</a></td></tr> |
97 |
|
98 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga13">peak_dict_stringcase_copy_key_ops</a></td></tr> |
99 |
|
100 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga14">peak_dict_stringcase_copy_key_ops</a></td></tr> |
101 |
|
102 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga15">peak_dict_null_value_ops</a></td></tr> |
103 |
|
104 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga16">peak_dict_null_value_ops</a></td></tr> |
105 |
|
106 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga17">peak_dict_string_value_ops</a></td></tr> |
107 |
|
108 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga18">peak_dict_string_value_ops</a></td></tr> |
109 |
|
110 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga19">peak_dict_string_copy_value_ops</a></td></tr> |
111 |
|
112 |
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> </td><td class="memItemRight" valign=bottom><a class="el" href="group__dict.html#ga20">peak_dict_string_copy_value_ops</a></td></tr> |
113 |
|
114 |
</table> |
115 |
<hr><h2>Typedef Documentation</h2> |
116 |
<a class="anchor" name="ga3" doxytag="dict.h::peak_dict_equal_callback" ></a><p> |
117 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
118 |
<tr> |
119 |
<td class="mdRow"> |
120 |
<table cellpadding="0" cellspacing="0" border="0"> |
121 |
<tr> |
122 |
<td class="md" nowrap valign="top"> typedef int(* <a class="el" href="group__dict.html#ga3">peak_dict_equal_callback</a>)(const void *val1, const void *val2) |
123 |
</table> |
124 |
</td> |
125 |
</tr> |
126 |
</table> |
127 |
<table cellspacing=5 cellpadding=0 border=0> |
128 |
<tr> |
129 |
<td> |
130 |
|
131 |
</td> |
132 |
<td> |
133 |
|
134 |
<p> |
135 |
Dictionary's key equal callback. |
136 |
<p> |
137 |
Should return 0 if the objects match or another value otherwise (eg. 1). </td> |
138 |
</tr> |
139 |
</table> |
140 |
<a class="anchor" name="ga4" doxytag="dict.h::peak_dict_hash_callback" ></a><p> |
141 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
142 |
<tr> |
143 |
<td class="mdRow"> |
144 |
<table cellpadding="0" cellspacing="0" border="0"> |
145 |
<tr> |
146 |
<td class="md" nowrap valign="top"> typedef uint32_t(* <a class="el" href="group__dict.html#ga4">peak_dict_hash_callback</a>)(const void *value) |
147 |
</table> |
148 |
</td> |
149 |
</tr> |
150 |
</table> |
151 |
<table cellspacing=5 cellpadding=0 border=0> |
152 |
<tr> |
153 |
<td> |
154 |
|
155 |
</td> |
156 |
<td> |
157 |
|
158 |
<p> |
159 |
Dictionary's key callback. |
160 |
<p> |
161 |
Should return a good 32-bits hash value. </td> |
162 |
</tr> |
163 |
</table> |
164 |
<hr><h2>Function Documentation</h2> |
165 |
<a class="anchor" name="ga27" doxytag="dict.h::peak_dict_add" ></a><p> |
166 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
167 |
<tr> |
168 |
<td class="mdRow"> |
169 |
<table cellpadding="0" cellspacing="0" border="0"> |
170 |
<tr> |
171 |
<td class="md" nowrap valign="top"> void peak_dict_add </td> |
172 |
<td class="md" valign="top">( </td> |
173 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
174 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
175 |
</tr> |
176 |
<tr> |
177 |
<td></td> |
178 |
<td></td> |
179 |
<td class="md" nowrap>const void * </td> |
180 |
<td class="mdname" nowrap> <em>key</em>, </td> |
181 |
</tr> |
182 |
<tr> |
183 |
<td></td> |
184 |
<td></td> |
185 |
<td class="md" nowrap>const void * </td> |
186 |
<td class="mdname" nowrap> <em>value</em></td> |
187 |
</tr> |
188 |
<tr> |
189 |
<td></td> |
190 |
<td class="md">) </td> |
191 |
<td class="md" colspan="2"></td> |
192 |
</tr> |
193 |
|
194 |
</table> |
195 |
</td> |
196 |
</tr> |
197 |
</table> |
198 |
<table cellspacing=5 cellpadding=0 border=0> |
199 |
<tr> |
200 |
<td> |
201 |
|
202 |
</td> |
203 |
<td> |
204 |
|
205 |
<p> |
206 |
"Add if absent" a key and value pair to the dictionary. |
207 |
<p> |
208 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
209 |
<table border="0" cellspacing="2" cellpadding="0"> |
210 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
211 |
<tr><td valign=top><em>key</em> </td><td>The key to add. It's retained by the dictionary using the retain callback provided when the dictionary was created. </td></tr> |
212 |
<tr><td valign=top><em>value</em> </td><td>The value to add, associated with the previous <em>key</em>. It's retained by the dictionary using the retain callback provided when the dictionary was created. </td></tr> |
213 |
</table> |
214 |
</dl> |
215 |
</td> |
216 |
</tr> |
217 |
</table> |
218 |
<a class="anchor" name="ga26" doxytag="dict.h::peak_dict_apply" ></a><p> |
219 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
220 |
<tr> |
221 |
<td class="mdRow"> |
222 |
<table cellpadding="0" cellspacing="0" border="0"> |
223 |
<tr> |
224 |
<td class="md" nowrap valign="top"> void peak_dict_apply </td> |
225 |
<td class="md" valign="top">( </td> |
226 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
227 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
228 |
</tr> |
229 |
<tr> |
230 |
<td></td> |
231 |
<td></td> |
232 |
<td class="md" nowrap><a class="el" href="group__dict.html#ga21">peak_dict_apply_func</a> </td> |
233 |
<td class="mdname" nowrap> <em>applier</em>, </td> |
234 |
</tr> |
235 |
<tr> |
236 |
<td></td> |
237 |
<td></td> |
238 |
<td class="md" nowrap>void * </td> |
239 |
<td class="mdname" nowrap> <em>context</em></td> |
240 |
</tr> |
241 |
<tr> |
242 |
<td></td> |
243 |
<td class="md">) </td> |
244 |
<td class="md" colspan="2"></td> |
245 |
</tr> |
246 |
|
247 |
</table> |
248 |
</td> |
249 |
</tr> |
250 |
</table> |
251 |
<table cellspacing=5 cellpadding=0 border=0> |
252 |
<tr> |
253 |
<td> |
254 |
|
255 |
</td> |
256 |
<td> |
257 |
|
258 |
<p> |
259 |
Call a function once for each value in the dictionary. |
260 |
<p> |
261 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
262 |
<table border="0" cellspacing="2" cellpadding="0"> |
263 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
264 |
<tr><td valign=top><em>applier</em> </td><td>The callback function. </td></tr> |
265 |
<tr><td valign=top><em>context</em> </td><td>A pointer-sized user-defined value, which is passed to the applier function. This parameter is not used by the library itself otherwise. </td></tr> |
266 |
</table> |
267 |
</dl> |
268 |
</td> |
269 |
</tr> |
270 |
</table> |
271 |
<a class="anchor" name="ga31" doxytag="dict.h::peak_dict_clear" ></a><p> |
272 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
273 |
<tr> |
274 |
<td class="mdRow"> |
275 |
<table cellpadding="0" cellspacing="0" border="0"> |
276 |
<tr> |
277 |
<td class="md" nowrap valign="top"> void peak_dict_clear </td> |
278 |
<td class="md" valign="top">( </td> |
279 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
280 |
<td class="mdname1" valign="top" nowrap> <em>dict</em> </td> |
281 |
<td class="md" valign="top"> ) </td> |
282 |
<td class="md" nowrap></td> |
283 |
</tr> |
284 |
|
285 |
</table> |
286 |
</td> |
287 |
</tr> |
288 |
</table> |
289 |
<table cellspacing=5 cellpadding=0 border=0> |
290 |
<tr> |
291 |
<td> |
292 |
|
293 |
</td> |
294 |
<td> |
295 |
|
296 |
<p> |
297 |
Remove all values from the dictionary. |
298 |
<p> |
299 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
300 |
<table border="0" cellspacing="2" cellpadding="0"> |
301 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
302 |
</table> |
303 |
</dl> |
304 |
</td> |
305 |
</tr> |
306 |
</table> |
307 |
<a class="anchor" name="ga22" doxytag="dict.h::peak_dict_create" ></a><p> |
308 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
309 |
<tr> |
310 |
<td class="mdRow"> |
311 |
<table cellpadding="0" cellspacing="0" border="0"> |
312 |
<tr> |
313 |
<td class="md" nowrap valign="top"> <a class="el" href="group__dict.html#ga0">peak_dict</a> peak_dict_create </td> |
314 |
<td class="md" valign="top">( </td> |
315 |
<td class="md" nowrap valign="top">const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> * </td> |
316 |
<td class="mdname" nowrap> <em>key_ops</em>, </td> |
317 |
</tr> |
318 |
<tr> |
319 |
<td></td> |
320 |
<td></td> |
321 |
<td class="md" nowrap>const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> * </td> |
322 |
<td class="mdname" nowrap> <em>value_ops</em>, </td> |
323 |
</tr> |
324 |
<tr> |
325 |
<td></td> |
326 |
<td></td> |
327 |
<td class="md" nowrap>const <a class="el" href="structpeak__dict__init__entry.html">peak_dict_init_entry</a> * </td> |
328 |
<td class="mdname" nowrap> <em>init_values</em>, </td> |
329 |
</tr> |
330 |
<tr> |
331 |
<td></td> |
332 |
<td></td> |
333 |
<td class="md" nowrap>int </td> |
334 |
<td class="mdname" nowrap> <em>num_values</em></td> |
335 |
</tr> |
336 |
<tr> |
337 |
<td></td> |
338 |
<td class="md">) </td> |
339 |
<td class="md" colspan="2"></td> |
340 |
</tr> |
341 |
|
342 |
</table> |
343 |
</td> |
344 |
</tr> |
345 |
</table> |
346 |
<table cellspacing=5 cellpadding=0 border=0> |
347 |
<tr> |
348 |
<td> |
349 |
|
350 |
</td> |
351 |
<td> |
352 |
|
353 |
<p> |
354 |
Create a new dictionary. |
355 |
<p> |
356 |
All peak's dictionary are created mutable, you can always add or remove elements. Immutable dictionary might be added in the future.<p> |
357 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
358 |
<table border="0" cellspacing="2" cellpadding="0"> |
359 |
<tr><td valign=top><em>key_ops</em> </td><td>A pointer to an user-defined operations structure <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> on keys. A copy of the pointed structure is made, so you can reuse or deallocate the structure after this call. </td></tr> |
360 |
<tr><td valign=top><em>value_ops</em> </td><td>A pointer to an user-defined operations structure <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> on values. A copy of the pointed structure is made, so you can reuse or deallocate the structure after this call. </td></tr> |
361 |
<tr><td valign=top><em>init_values</em> </td><td>A C array of <a class="el" href="structpeak__dict__init__entry.html">peak_dict_init_entry</a> to be immediately added in the dictionary or <code>NULL</code> if you want to create an empty dictionary. The array can be freed after the call. The key's retain callback, if any, is called for each item. Same thing for each value. </td></tr> |
362 |
<tr><td valign=top><em>num_values</em> </td><td>Number of <a class="el" href="structpeak__dict__init__entry.html">peak_dict_init_entry</a> structures in the <em>init_values</em> C array. Use 0 if you want an empty dictionary.</td></tr> |
363 |
</table> |
364 |
</dl> |
365 |
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a new allocated dictionary or <code>NULL</code> if the operation failed. Use <a class="el" href="group__alloc.html#ga7">peak_release()</a> when you want to dispose it. </dd></dl> |
366 |
</td> |
367 |
</tr> |
368 |
</table> |
369 |
<a class="anchor" name="ga25" doxytag="dict.h::peak_dict_get_all" ></a><p> |
370 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
371 |
<tr> |
372 |
<td class="mdRow"> |
373 |
<table cellpadding="0" cellspacing="0" border="0"> |
374 |
<tr> |
375 |
<td class="md" nowrap valign="top"> void peak_dict_get_all </td> |
376 |
<td class="md" valign="top">( </td> |
377 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
378 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
379 |
</tr> |
380 |
<tr> |
381 |
<td></td> |
382 |
<td></td> |
383 |
<td class="md" nowrap>const void ** </td> |
384 |
<td class="mdname" nowrap> <em>keys</em>, </td> |
385 |
</tr> |
386 |
<tr> |
387 |
<td></td> |
388 |
<td></td> |
389 |
<td class="md" nowrap>const void ** </td> |
390 |
<td class="mdname" nowrap> <em>values</em></td> |
391 |
</tr> |
392 |
<tr> |
393 |
<td></td> |
394 |
<td class="md">) </td> |
395 |
<td class="md" colspan="2"></td> |
396 |
</tr> |
397 |
|
398 |
</table> |
399 |
</td> |
400 |
</tr> |
401 |
</table> |
402 |
<table cellspacing=5 cellpadding=0 border=0> |
403 |
<tr> |
404 |
<td> |
405 |
|
406 |
</td> |
407 |
<td> |
408 |
|
409 |
<p> |
410 |
Retrieves all key and value pairs. |
411 |
<p> |
412 |
This method fills the two buffers with the keys and values from the dictionary. The keys and values C arrays are parallel to each other but the order or the pairs is not defined.<p> |
413 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
414 |
<table border="0" cellspacing="2" cellpadding="0"> |
415 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
416 |
<tr><td valign=top><em>keys</em> </td><td>A buffer large enough to hold all pointer-sized keys or <code>NULL</code>. </td></tr> |
417 |
<tr><td valign=top><em>values</em> </td><td>A buffer large enough to hold all pointer-sized values or <code>NULL</code>. </td></tr> |
418 |
</table> |
419 |
</dl> |
420 |
</td> |
421 |
</tr> |
422 |
</table> |
423 |
<a class="anchor" name="ga23" doxytag="dict.h::peak_dict_get_count" ></a><p> |
424 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
425 |
<tr> |
426 |
<td class="mdRow"> |
427 |
<table cellpadding="0" cellspacing="0" border="0"> |
428 |
<tr> |
429 |
<td class="md" nowrap valign="top"> int peak_dict_get_count </td> |
430 |
<td class="md" valign="top">( </td> |
431 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
432 |
<td class="mdname1" valign="top" nowrap> <em>dict</em> </td> |
433 |
<td class="md" valign="top"> ) </td> |
434 |
<td class="md" nowrap></td> |
435 |
</tr> |
436 |
|
437 |
</table> |
438 |
</td> |
439 |
</tr> |
440 |
</table> |
441 |
<table cellspacing=5 cellpadding=0 border=0> |
442 |
<tr> |
443 |
<td> |
444 |
|
445 |
</td> |
446 |
<td> |
447 |
|
448 |
<p> |
449 |
Returns the number of values currently in the dictionary. |
450 |
<p> |
451 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
452 |
<table border="0" cellspacing="2" cellpadding="0"> |
453 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference.</td></tr> |
454 |
</table> |
455 |
</dl> |
456 |
<dl compact><dt><b>Returns:</b></dt><dd>Number of values currently in the dictionary. </dd></dl> |
457 |
</td> |
458 |
</tr> |
459 |
</table> |
460 |
<a class="anchor" name="ga24" doxytag="dict.h::peak_dict_get_value" ></a><p> |
461 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
462 |
<tr> |
463 |
<td class="mdRow"> |
464 |
<table cellpadding="0" cellspacing="0" border="0"> |
465 |
<tr> |
466 |
<td class="md" nowrap valign="top"> const void* peak_dict_get_value </td> |
467 |
<td class="md" valign="top">( </td> |
468 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
469 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
470 |
</tr> |
471 |
<tr> |
472 |
<td></td> |
473 |
<td></td> |
474 |
<td class="md" nowrap>const void * </td> |
475 |
<td class="mdname" nowrap> <em>key</em></td> |
476 |
</tr> |
477 |
<tr> |
478 |
<td></td> |
479 |
<td class="md">) </td> |
480 |
<td class="md" colspan="2"></td> |
481 |
</tr> |
482 |
|
483 |
</table> |
484 |
</td> |
485 |
</tr> |
486 |
</table> |
487 |
<table cellspacing=5 cellpadding=0 border=0> |
488 |
<tr> |
489 |
<td> |
490 |
|
491 |
</td> |
492 |
<td> |
493 |
|
494 |
<p> |
495 |
Retrieves the value associated with the given key. |
496 |
<p> |
497 |
This method will use the hash and equal key callbacks provided when the dictionary was created.<p> |
498 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
499 |
<table border="0" cellspacing="2" cellpadding="0"> |
500 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
501 |
<tr><td valign=top><em>key</em> </td><td>The key for which to find a match in the dictionary.</td></tr> |
502 |
</table> |
503 |
</dl> |
504 |
<dl compact><dt><b>Returns:</b></dt><dd>Number of values currently in the dictionary. </dd></dl> |
505 |
</td> |
506 |
</tr> |
507 |
</table> |
508 |
<a class="anchor" name="ga30" doxytag="dict.h::peak_dict_remove" ></a><p> |
509 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
510 |
<tr> |
511 |
<td class="mdRow"> |
512 |
<table cellpadding="0" cellspacing="0" border="0"> |
513 |
<tr> |
514 |
<td class="md" nowrap valign="top"> void peak_dict_remove </td> |
515 |
<td class="md" valign="top">( </td> |
516 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
517 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
518 |
</tr> |
519 |
<tr> |
520 |
<td></td> |
521 |
<td></td> |
522 |
<td class="md" nowrap>const void * </td> |
523 |
<td class="mdname" nowrap> <em>key</em></td> |
524 |
</tr> |
525 |
<tr> |
526 |
<td></td> |
527 |
<td class="md">) </td> |
528 |
<td class="md" colspan="2"></td> |
529 |
</tr> |
530 |
|
531 |
</table> |
532 |
</td> |
533 |
</tr> |
534 |
</table> |
535 |
<table cellspacing=5 cellpadding=0 border=0> |
536 |
<tr> |
537 |
<td> |
538 |
|
539 |
</td> |
540 |
<td> |
541 |
|
542 |
<p> |
543 |
Remove a key and value pair from the dictionary. |
544 |
<p> |
545 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
546 |
<table border="0" cellspacing="2" cellpadding="0"> |
547 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
548 |
<tr><td valign=top><em>key</em> </td><td>The key of the value to remove in the dictionary. They are released by the dictionary using the release callbacks provided when the dictionary was created, if any. </td></tr> |
549 |
</table> |
550 |
</dl> |
551 |
</td> |
552 |
</tr> |
553 |
</table> |
554 |
<a class="anchor" name="ga29" doxytag="dict.h::peak_dict_replace" ></a><p> |
555 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
556 |
<tr> |
557 |
<td class="mdRow"> |
558 |
<table cellpadding="0" cellspacing="0" border="0"> |
559 |
<tr> |
560 |
<td class="md" nowrap valign="top"> void peak_dict_replace </td> |
561 |
<td class="md" valign="top">( </td> |
562 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
563 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
564 |
</tr> |
565 |
<tr> |
566 |
<td></td> |
567 |
<td></td> |
568 |
<td class="md" nowrap>const void * </td> |
569 |
<td class="mdname" nowrap> <em>key</em>, </td> |
570 |
</tr> |
571 |
<tr> |
572 |
<td></td> |
573 |
<td></td> |
574 |
<td class="md" nowrap>const void * </td> |
575 |
<td class="mdname" nowrap> <em>value</em></td> |
576 |
</tr> |
577 |
<tr> |
578 |
<td></td> |
579 |
<td class="md">) </td> |
580 |
<td class="md" colspan="2"></td> |
581 |
</tr> |
582 |
|
583 |
</table> |
584 |
</td> |
585 |
</tr> |
586 |
</table> |
587 |
<table cellspacing=5 cellpadding=0 border=0> |
588 |
<tr> |
589 |
<td> |
590 |
|
591 |
</td> |
592 |
<td> |
593 |
|
594 |
<p> |
595 |
"Replace if present" a key and value pair. |
596 |
<p> |
597 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
598 |
<table border="0" cellspacing="2" cellpadding="0"> |
599 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
600 |
<tr><td valign=top><em>key</em> </td><td>The key of the value to replace in the dictionary. </td></tr> |
601 |
<tr><td valign=top><em>value</em> </td><td>The value to replace, associated with the previous <em>key</em>. The old one is released by the dictionary using the release callback and the new one is retained using the retain callback, both provided when the dictionary was created. </td></tr> |
602 |
</table> |
603 |
</dl> |
604 |
</td> |
605 |
</tr> |
606 |
</table> |
607 |
<a class="anchor" name="ga28" doxytag="dict.h::peak_dict_set" ></a><p> |
608 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
609 |
<tr> |
610 |
<td class="mdRow"> |
611 |
<table cellpadding="0" cellspacing="0" border="0"> |
612 |
<tr> |
613 |
<td class="md" nowrap valign="top"> void peak_dict_set </td> |
614 |
<td class="md" valign="top">( </td> |
615 |
<td class="md" nowrap valign="top"><a class="el" href="group__dict.html#ga0">peak_dict</a> </td> |
616 |
<td class="mdname" nowrap> <em>dict</em>, </td> |
617 |
</tr> |
618 |
<tr> |
619 |
<td></td> |
620 |
<td></td> |
621 |
<td class="md" nowrap>const void * </td> |
622 |
<td class="mdname" nowrap> <em>key</em>, </td> |
623 |
</tr> |
624 |
<tr> |
625 |
<td></td> |
626 |
<td></td> |
627 |
<td class="md" nowrap>const void * </td> |
628 |
<td class="mdname" nowrap> <em>value</em></td> |
629 |
</tr> |
630 |
<tr> |
631 |
<td></td> |
632 |
<td class="md">) </td> |
633 |
<td class="md" colspan="2"></td> |
634 |
</tr> |
635 |
|
636 |
</table> |
637 |
</td> |
638 |
</tr> |
639 |
</table> |
640 |
<table cellspacing=5 cellpadding=0 border=0> |
641 |
<tr> |
642 |
<td> |
643 |
|
644 |
</td> |
645 |
<td> |
646 |
|
647 |
<p> |
648 |
"Add if absent, replace is present" a key and value pair. |
649 |
<p> |
650 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
651 |
<table border="0" cellspacing="2" cellpadding="0"> |
652 |
<tr><td valign=top><em>dict</em> </td><td>The dictionary reference. </td></tr> |
653 |
<tr><td valign=top><em>key</em> </td><td>The key to set. If the key isn't already in the dictionary, it's retained using the retain callback provided when the dictionary was created. </td></tr> |
654 |
<tr><td valign=top><em>value</em> </td><td>The value to set, associated with the previous <em>key</em>. It's retained by the dictionary using the retain callback provided when the dictionary was created. </td></tr> |
655 |
</table> |
656 |
</dl> |
657 |
</td> |
658 |
</tr> |
659 |
</table> |
660 |
<hr><h2>Variable Documentation</h2> |
661 |
<a class="anchor" name="ga6" doxytag="dict.h::peak_dict_null_key_ops" ></a><p> |
662 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
663 |
<tr> |
664 |
<td class="mdRow"> |
665 |
<table cellpadding="0" cellspacing="0" border="0"> |
666 |
<tr> |
667 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga6">peak_dict_null_key_ops</a> |
668 |
</table> |
669 |
</td> |
670 |
</tr> |
671 |
</table> |
672 |
<table cellspacing=5 cellpadding=0 border=0> |
673 |
<tr> |
674 |
<td> |
675 |
|
676 |
</td> |
677 |
<td> |
678 |
|
679 |
<p> |
680 |
Predefined callbacks structure appropriate for use when keys of a dictionary are unknown objects and you want nothing to be performed as retain/release, and you can't provide better equality or hashing function than pointer-related ones. </td> |
681 |
</tr> |
682 |
</table> |
683 |
<a class="anchor" name="ga5" doxytag="dict.c::peak_dict_null_key_ops" ></a><p> |
684 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
685 |
<tr> |
686 |
<td class="mdRow"> |
687 |
<table cellpadding="0" cellspacing="0" border="0"> |
688 |
<tr> |
689 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga6">peak_dict_null_key_ops</a> |
690 |
</table> |
691 |
</td> |
692 |
</tr> |
693 |
</table> |
694 |
<table cellspacing=5 cellpadding=0 border=0> |
695 |
<tr> |
696 |
<td> |
697 |
|
698 |
</td> |
699 |
<td> |
700 |
|
701 |
<p> |
702 |
<b>Initial value:</b><div class="fragment"><pre> |
703 |
{ |
704 |
NULL, NULL, __peak_dict_ptr_equal, __peak_dict_ptr_hash |
705 |
} |
706 |
</pre></div>Predefined callbacks structure appropriate for use when keys of a dictionary are unknown objects and you want nothing to be performed as retain/release, and you can't provide better equality or hashing function than pointer-related ones. </td> |
707 |
</tr> |
708 |
</table> |
709 |
<a class="anchor" name="ga16" doxytag="dict.h::peak_dict_null_value_ops" ></a><p> |
710 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
711 |
<tr> |
712 |
<td class="mdRow"> |
713 |
<table cellpadding="0" cellspacing="0" border="0"> |
714 |
<tr> |
715 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> <a class="el" href="group__dict.html#ga16">peak_dict_null_value_ops</a> |
716 |
</table> |
717 |
</td> |
718 |
</tr> |
719 |
</table> |
720 |
<table cellspacing=5 cellpadding=0 border=0> |
721 |
<tr> |
722 |
<td> |
723 |
|
724 |
</td> |
725 |
<td> |
726 |
|
727 |
<p> |
728 |
Predefined callbacks structure appropriate for use when values of a dictionary are unknown objects. </td> |
729 |
</tr> |
730 |
</table> |
731 |
<a class="anchor" name="ga15" doxytag="dict.c::peak_dict_null_value_ops" ></a><p> |
732 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
733 |
<tr> |
734 |
<td class="mdRow"> |
735 |
<table cellpadding="0" cellspacing="0" border="0"> |
736 |
<tr> |
737 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> <a class="el" href="group__dict.html#ga16">peak_dict_null_value_ops</a> |
738 |
</table> |
739 |
</td> |
740 |
</tr> |
741 |
</table> |
742 |
<table cellspacing=5 cellpadding=0 border=0> |
743 |
<tr> |
744 |
<td> |
745 |
|
746 |
</td> |
747 |
<td> |
748 |
|
749 |
<p> |
750 |
<b>Initial value:</b><div class="fragment"><pre> |
751 |
{ |
752 |
NULL, NULL |
753 |
} |
754 |
</pre></div>Predefined callbacks structure appropriate for use when values of a dictionary are unknown objects. </td> |
755 |
</tr> |
756 |
</table> |
757 |
<a class="anchor" name="ga10" doxytag="dict.h::peak_dict_string_copy_key_ops" ></a><p> |
758 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
759 |
<tr> |
760 |
<td class="mdRow"> |
761 |
<table cellpadding="0" cellspacing="0" border="0"> |
762 |
<tr> |
763 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga10">peak_dict_string_copy_key_ops</a> |
764 |
</table> |
765 |
</td> |
766 |
</tr> |
767 |
</table> |
768 |
<table cellspacing=5 cellpadding=0 border=0> |
769 |
<tr> |
770 |
<td> |
771 |
|
772 |
</td> |
773 |
<td> |
774 |
|
775 |
<p> |
776 |
Predefined callbacks structure appropriate for use when keys of a dictionary are strings to be copied by the dictionary. </td> |
777 |
</tr> |
778 |
</table> |
779 |
<a class="anchor" name="ga9" doxytag="dict.c::peak_dict_string_copy_key_ops" ></a><p> |
780 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
781 |
<tr> |
782 |
<td class="mdRow"> |
783 |
<table cellpadding="0" cellspacing="0" border="0"> |
784 |
<tr> |
785 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga10">peak_dict_string_copy_key_ops</a> |
786 |
</table> |
787 |
</td> |
788 |
</tr> |
789 |
</table> |
790 |
<table cellspacing=5 cellpadding=0 border=0> |
791 |
<tr> |
792 |
<td> |
793 |
|
794 |
</td> |
795 |
<td> |
796 |
|
797 |
<p> |
798 |
<b>Initial value:</b><div class="fragment"><pre> |
799 |
{ |
800 |
(<a class="code" href="group__dict.html#ga1">peak_dict_retain_callback</a>)<a class="code" href="group__alloc.html#ga6">peak_strdup</a>, |
801 |
(<a class="code" href="group__dict.html#ga2">peak_dict_release_callback</a>)<a class="code" href="group__alloc.html#ga5">peak_deallocate</a>, |
802 |
__peak_dict_string_equal, |
803 |
__peak_dict_string_hash |
804 |
} |
805 |
</pre></div>Predefined callbacks structure appropriate for use when keys of a dictionary are strings to be copied by the dictionary. </td> |
806 |
</tr> |
807 |
</table> |
808 |
<a class="anchor" name="ga20" doxytag="dict.h::peak_dict_string_copy_value_ops" ></a><p> |
809 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
810 |
<tr> |
811 |
<td class="mdRow"> |
812 |
<table cellpadding="0" cellspacing="0" border="0"> |
813 |
<tr> |
814 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> <a class="el" href="group__dict.html#ga20">peak_dict_string_copy_value_ops</a> |
815 |
</table> |
816 |
</td> |
817 |
</tr> |
818 |
</table> |
819 |
<table cellspacing=5 cellpadding=0 border=0> |
820 |
<tr> |
821 |
<td> |
822 |
|
823 |
</td> |
824 |
<td> |
825 |
|
826 |
<p> |
827 |
Predefined callbacks structure appropriate for use when values of a dictionary are strings to be copied by the dictionary. </td> |
828 |
</tr> |
829 |
</table> |
830 |
<a class="anchor" name="ga19" doxytag="dict.c::peak_dict_string_copy_value_ops" ></a><p> |
831 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
832 |
<tr> |
833 |
<td class="mdRow"> |
834 |
<table cellpadding="0" cellspacing="0" border="0"> |
835 |
<tr> |
836 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> <a class="el" href="group__dict.html#ga20">peak_dict_string_copy_value_ops</a> |
837 |
</table> |
838 |
</td> |
839 |
</tr> |
840 |
</table> |
841 |
<table cellspacing=5 cellpadding=0 border=0> |
842 |
<tr> |
843 |
<td> |
844 |
|
845 |
</td> |
846 |
<td> |
847 |
|
848 |
<p> |
849 |
<b>Initial value:</b><div class="fragment"><pre> |
850 |
{ |
851 |
(<a class="code" href="group__dict.html#ga1">peak_dict_retain_callback</a>)<a class="code" href="group__alloc.html#ga6">peak_strdup</a>, |
852 |
(<a class="code" href="group__dict.html#ga2">peak_dict_release_callback</a>)<a class="code" href="group__alloc.html#ga5">peak_deallocate</a> |
853 |
} |
854 |
</pre></div>Predefined callbacks structure appropriate for use when values of a dictionary are strings to be copied by the dictionary. </td> |
855 |
</tr> |
856 |
</table> |
857 |
<a class="anchor" name="ga8" doxytag="dict.h::peak_dict_string_key_ops" ></a><p> |
858 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
859 |
<tr> |
860 |
<td class="mdRow"> |
861 |
<table cellpadding="0" cellspacing="0" border="0"> |
862 |
<tr> |
863 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga8">peak_dict_string_key_ops</a> |
864 |
</table> |
865 |
</td> |
866 |
</tr> |
867 |
</table> |
868 |
<table cellspacing=5 cellpadding=0 border=0> |
869 |
<tr> |
870 |
<td> |
871 |
|
872 |
</td> |
873 |
<td> |
874 |
|
875 |
<p> |
876 |
Predefined callbacks structure appropriate for use when keys of a dictionary are constant strings. </td> |
877 |
</tr> |
878 |
</table> |
879 |
<a class="anchor" name="ga7" doxytag="dict.c::peak_dict_string_key_ops" ></a><p> |
880 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
881 |
<tr> |
882 |
<td class="mdRow"> |
883 |
<table cellpadding="0" cellspacing="0" border="0"> |
884 |
<tr> |
885 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga8">peak_dict_string_key_ops</a> |
886 |
</table> |
887 |
</td> |
888 |
</tr> |
889 |
</table> |
890 |
<table cellspacing=5 cellpadding=0 border=0> |
891 |
<tr> |
892 |
<td> |
893 |
|
894 |
</td> |
895 |
<td> |
896 |
|
897 |
<p> |
898 |
<b>Initial value:</b><div class="fragment"><pre> |
899 |
{ |
900 |
NULL, NULL, __peak_dict_string_equal, __peak_dict_string_hash |
901 |
} |
902 |
</pre></div>Predefined callbacks structure appropriate for use when keys of a dictionary are constant strings. </td> |
903 |
</tr> |
904 |
</table> |
905 |
<a class="anchor" name="ga18" doxytag="dict.h::peak_dict_string_value_ops" ></a><p> |
906 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
907 |
<tr> |
908 |
<td class="mdRow"> |
909 |
<table cellpadding="0" cellspacing="0" border="0"> |
910 |
<tr> |
911 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> <a class="el" href="group__dict.html#ga18">peak_dict_string_value_ops</a> |
912 |
</table> |
913 |
</td> |
914 |
</tr> |
915 |
</table> |
916 |
<table cellspacing=5 cellpadding=0 border=0> |
917 |
<tr> |
918 |
<td> |
919 |
|
920 |
</td> |
921 |
<td> |
922 |
|
923 |
<p> |
924 |
Predefined callbacks structure appropriate for use when values of a dictionary are constant strings. </td> |
925 |
</tr> |
926 |
</table> |
927 |
<a class="anchor" name="ga17" doxytag="dict.c::peak_dict_string_value_ops" ></a><p> |
928 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
929 |
<tr> |
930 |
<td class="mdRow"> |
931 |
<table cellpadding="0" cellspacing="0" border="0"> |
932 |
<tr> |
933 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__value__ops__s.html">peak_dict_value_ops_s</a> <a class="el" href="group__dict.html#ga18">peak_dict_string_value_ops</a> |
934 |
</table> |
935 |
</td> |
936 |
</tr> |
937 |
</table> |
938 |
<table cellspacing=5 cellpadding=0 border=0> |
939 |
<tr> |
940 |
<td> |
941 |
|
942 |
</td> |
943 |
<td> |
944 |
|
945 |
<p> |
946 |
<b>Initial value:</b><div class="fragment"><pre> |
947 |
{ |
948 |
NULL, NULL |
949 |
} |
950 |
</pre></div>Predefined callbacks structure appropriate for use when values of a dictionary are constant strings. </td> |
951 |
</tr> |
952 |
</table> |
953 |
<a class="anchor" name="ga14" doxytag="dict.h::peak_dict_stringcase_copy_key_ops" ></a><p> |
954 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
955 |
<tr> |
956 |
<td class="mdRow"> |
957 |
<table cellpadding="0" cellspacing="0" border="0"> |
958 |
<tr> |
959 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga14">peak_dict_stringcase_copy_key_ops</a> |
960 |
</table> |
961 |
</td> |
962 |
</tr> |
963 |
</table> |
964 |
<table cellspacing=5 cellpadding=0 border=0> |
965 |
<tr> |
966 |
<td> |
967 |
|
968 |
</td> |
969 |
<td> |
970 |
|
971 |
<p> |
972 |
Predefined callbacks structure appropriate for use when keys of a dictionary are strings ignoring case to be copied by the dictionary. </td> |
973 |
</tr> |
974 |
</table> |
975 |
<a class="anchor" name="ga13" doxytag="dict.c::peak_dict_stringcase_copy_key_ops" ></a><p> |
976 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
977 |
<tr> |
978 |
<td class="mdRow"> |
979 |
<table cellpadding="0" cellspacing="0" border="0"> |
980 |
<tr> |
981 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga14">peak_dict_stringcase_copy_key_ops</a> |
982 |
</table> |
983 |
</td> |
984 |
</tr> |
985 |
</table> |
986 |
<table cellspacing=5 cellpadding=0 border=0> |
987 |
<tr> |
988 |
<td> |
989 |
|
990 |
</td> |
991 |
<td> |
992 |
|
993 |
<p> |
994 |
<b>Initial value:</b><div class="fragment"><pre> |
995 |
{ |
996 |
(<a class="code" href="group__dict.html#ga1">peak_dict_retain_callback</a>)<a class="code" href="group__alloc.html#ga6">peak_strdup</a>, |
997 |
(<a class="code" href="group__dict.html#ga2">peak_dict_release_callback</a>)<a class="code" href="group__alloc.html#ga5">peak_deallocate</a>, |
998 |
__peak_dict_stringcase_equal, |
999 |
__peak_dict_stringcase_hash |
1000 |
} |
1001 |
</pre></div>Predefined callbacks structure appropriate for use when keys of a dictionary are strings ignoring case to be copied by the dictionary. </td> |
1002 |
</tr> |
1003 |
</table> |
1004 |
<a class="anchor" name="ga12" doxytag="dict.h::peak_dict_stringcase_key_ops" ></a><p> |
1005 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
1006 |
<tr> |
1007 |
<td class="mdRow"> |
1008 |
<table cellpadding="0" cellspacing="0" border="0"> |
1009 |
<tr> |
1010 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga12">peak_dict_stringcase_key_ops</a> |
1011 |
</table> |
1012 |
</td> |
1013 |
</tr> |
1014 |
</table> |
1015 |
<table cellspacing=5 cellpadding=0 border=0> |
1016 |
<tr> |
1017 |
<td> |
1018 |
|
1019 |
</td> |
1020 |
<td> |
1021 |
|
1022 |
<p> |
1023 |
Predefined callbacks structure appropriate for use when keys of a dictionary are constant strings ignoring case. </td> |
1024 |
</tr> |
1025 |
</table> |
1026 |
<a class="anchor" name="ga11" doxytag="dict.c::peak_dict_stringcase_key_ops" ></a><p> |
1027 |
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
1028 |
<tr> |
1029 |
<td class="mdRow"> |
1030 |
<table cellpadding="0" cellspacing="0" border="0"> |
1031 |
<tr> |
1032 |
<td class="md" nowrap valign="top"> const <a class="el" href="structpeak__dict__key__ops__s.html">peak_dict_key_ops_s</a> <a class="el" href="group__dict.html#ga12">peak_dict_stringcase_key_ops</a> |
1033 |
</table> |
1034 |
</td> |
1035 |
</tr> |
1036 |
</table> |
1037 |
<table cellspacing=5 cellpadding=0 border=0> |
1038 |
<tr> |
1039 |
<td> |
1040 |
|
1041 |
</td> |
1042 |
<td> |
1043 |
|
1044 |
<p> |
1045 |
<b>Initial value:</b><div class="fragment"><pre> |
1046 |
{ |
1047 |
NULL, NULL, __peak_dict_stringcase_equal, __peak_dict_stringcase_hash |
1048 |
} |
1049 |
</pre></div>Predefined callbacks structure appropriate for use when keys of a dictionary are constant strings ignoring case. </td> |
1050 |
</tr> |
1051 |
</table> |
1052 |
<hr size="1"><address style="align: right;"><small>Generated on Sat Jan 17 21:41:53 2004 for the PEAK Library by |
1053 |
<a href="http://www.doxygen.org/index.html"> |
1054 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0" > |
1055 |
</a></small> <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=98146&type=1" width="88" height="31" align="middle" border="0" alt="SourceForge.net Logo" /></a></address> |
1056 |
</body> |
1057 |
</html> |
1058 |
|