/usr/share/doc/libucommon-dev/a00059.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>UCommon: ucc::keyassoc Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00059.html">keyassoc</a>
</div>
</div>
<div class="contents">
<h1>ucc::keyassoc Class Reference</h1><!-- doxytag: class="ucc::keyassoc" --><!-- doxytag: inherits="ucc::mempager" -->
<p>A class to hold memory pointers referenced by string names.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00197_source.html">memory.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ucc::keyassoc:</div>
<div class="dynsection">
<div class="center"><img src="a00400.png" border="0" usemap="#ucc_1_1keyassoc_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1keyassoc_inherit__map" id="ucc_1_1keyassoc_inherit__map">
<area shape="rect" id="node7" href="a00019.html" title="A typed template for using a key association with typed objects." alt="" coords="5,237,229,267"/><area shape="rect" id="node2" href="a00081.html" title="A managed private heap for small allocations." alt="" coords="56,83,179,112"/><area shape="rect" id="node4" href="a00080.html" title="An alternate memory pager private heap manager." alt="" coords="60,5,175,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucc::keyassoc:</div>
<div class="dynsection">
<div class="center"><img src="a00401.png" border="0" usemap="#ucc_1_1keyassoc_coll__map" alt="Collaboration graph"/></div>
<map name="ucc_1_1keyassoc_coll__map" id="ucc_1_1keyassoc_coll__map">
<area shape="rect" id="node2" href="a00081.html" title="A managed private heap for small allocations." alt="" coords="5,283,128,312"/><area shape="rect" id="node4" href="a00080.html" title="An alternate memory pager private heap manager." alt="" coords="9,187,124,216"/><area shape="rect" id="node6" href="a00090.html" title="A linked object base class with members found by name." alt="" coords="203,283,341,312"/><area shape="rect" id="node8" href="a00100.html" title="A linked object base class for ordered objects." alt="" coords="203,187,347,216"/><area shape="rect" id="node10" href="a00069.html" title="Common base class for all objects that can be formed into a linked list." alt="" coords="115,96,248,125"/><area shape="rect" id="node12" href="a00093.html" title="A common base class for all managed objects." alt="" coords="135,5,228,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#aca01a01ecdae0bebd635f2314fac6076">assign</a> (char *name, void *<a class="el" href="a00015.html">pointer</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Assign a name to a data pointer. <a href="#aca01a01ecdae0bebd635f2314fac6076"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#a48054f3a7e3a32113b72dc4fd1e8f4e4">create</a> (char *name, void *<a class="el" href="a00015.html">pointer</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new name in the association table and assign it's value. <a href="#a48054f3a7e3a32113b72dc4fd1e8f4e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#a42c8f55d2152e5a49c6737be2d8c9c55">getCount</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of associations we have in our object. <a href="#a42c8f55d2152e5a49c6737be2d8c9c55"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#af9dc8000091576917ddb6da8f9a5d864">keyassoc</a> (unsigned indexing=177, size_t max=0, size_t page=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a key associated memory pointer table. <a href="#af9dc8000091576917ddb6da8f9a5d864"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#af815dffb99b2e187f69f81b72c8f7868">locate</a> (const char *name)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lookup the data pointer by the string name given. <a href="#af815dffb99b2e187f69f81b72c8f7868"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#a6847ae4ffddfaf8fa76d72b2f2232a40">operator()</a> (const char *name)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lookup the data pointer of a string by direct operation. <a href="#a6847ae4ffddfaf8fa76d72b2f2232a40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30bd3abcc1ed079fd1e607f77b51517f"></a><!-- doxytag: member="ucc::keyassoc::purge" ref="a30bd3abcc1ed079fd1e607f77b51517f" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#a30bd3abcc1ed079fd1e607f77b51517f">purge</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Purge all associations and return allocated pages to heap. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#a0f0aac56ea595b2814b69ff6033c802f">remove</a> (const char *name)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a name and pointer association. <a href="#a0f0aac56ea595b2814b69ff6033c802f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00059.html#ab4263368268218fa4d2811450685cf9f">~keyassoc</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy association object. <a href="#ab4263368268218fa4d2811450685cf9f"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e7e87a5d5b6ec44dd83e7dd632dc7ca"></a><!-- doxytag: member="ucc::keyassoc::keydata" ref="a7e7e87a5d5b6ec44dd83e7dd632dc7ca" args="" -->
class </td><td class="memItemRight" valign="bottom"><b>keydata</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A class to hold memory pointers referenced by string names. </p>
<p>This is used to form a typeless data pointer that can be associated and referenced by string/logical name. The memory used for forming the string names can itself be managed in reusable memory pools and the entire structure uses it's own private pager heap. This allows new string named pointers to be added and deleted at runtime in a thread- safe manner. This might typically be used as a session id manager or for symbol tables. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00197_source.html#l00385">385</a> of file <a class="el" href="a00197_source.html">memory.h</a>.</p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="af9dc8000091576917ddb6da8f9a5d864"></a><!-- doxytag: member="ucc::keyassoc::keyassoc" ref="af9dc8000091576917ddb6da8f9a5d864" args="(unsigned indexing=177, size_t max=0, size_t page=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::keyassoc::keyassoc </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>indexing</em> = <code>177</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>max</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>page</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a key associated memory pointer table. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>indexing</em> </td><td>size for hash map. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>max</em> </td><td>size of a string name if names are in reusable managed memory. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>page</em> </td><td>size of memory pager. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab4263368268218fa4d2811450685cf9f"></a><!-- doxytag: member="ucc::keyassoc::~keyassoc" ref="ab4263368268218fa4d2811450685cf9f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::keyassoc::~keyassoc </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Destroy association object. </p>
<p>Release all pages back to the heap. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aca01a01ecdae0bebd635f2314fac6076"></a><!-- doxytag: member="ucc::keyassoc::assign" ref="aca01a01ecdae0bebd635f2314fac6076" args="(char *name, void *pointer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::keyassoc::assign </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>pointer</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Assign a name to a data pointer. </p>
<p>If the name exists, it is re-assigned with the new pointer value, otherwise it is created. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>to assign. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>pointer</em> </td><td>value to assign with name. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false if failed because name is too long for managed table. </dd></dl>
</div>
</div>
<a class="anchor" id="a48054f3a7e3a32113b72dc4fd1e8f4e4"></a><!-- doxytag: member="ucc::keyassoc::create" ref="a48054f3a7e3a32113b72dc4fd1e8f4e4" args="(char *name, void *pointer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::keyassoc::create </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>pointer</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a new name in the association table and assign it's value. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>to create. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>pointer</em> </td><td>value to assign with name. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false if already exists or name is too long for managed table. </dd></dl>
</div>
</div>
<a class="anchor" id="a42c8f55d2152e5a49c6737be2d8c9c55"></a><!-- doxytag: member="ucc::keyassoc::getCount" ref="a42c8f55d2152e5a49c6737be2d8c9c55" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned ucc::keyassoc::getCount </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the number of associations we have in our object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of associations stored. </dd></dl>
<p>Reimplemented in <a class="el" href="a00019.html#aa1218cc79f7ab50d33be57a5e0281c0b">ucc::assoc_pointer< T, I, M, P ></a>.</p>
<p>Definition at line <a class="el" href="a00197_source.html#l00426">426</a> of file <a class="el" href="a00197_source.html">memory.h</a>.</p>
</div>
</div>
<a class="anchor" id="af815dffb99b2e187f69f81b72c8f7868"></a><!-- doxytag: member="ucc::keyassoc::locate" ref="af815dffb99b2e187f69f81b72c8f7868" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* ucc::keyassoc::locate </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>name</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Lookup the data pointer by the string name given. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>to lookup. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to data or NULL if not found. </dd></dl>
<p>Reimplemented in <a class="el" href="a00019.html#a908bf8d87754dca01b24a64207df668c">ucc::assoc_pointer< T, I, M, P ></a>.</p>
</div>
</div>
<a class="anchor" id="a6847ae4ffddfaf8fa76d72b2f2232a40"></a><!-- doxytag: member="ucc::keyassoc::operator()" ref="a6847ae4ffddfaf8fa76d72b2f2232a40" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* ucc::keyassoc::operator() </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>name</em></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Lookup the data pointer of a string by direct operation. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>to lookup. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to data or NULL if not found. </dd></dl>
<p>Reimplemented in <a class="el" href="a00019.html#af64f028aa4d590dd62990b4be640cf91">ucc::assoc_pointer< T, I, M, P ></a>.</p>
<p>Definition at line <a class="el" href="a00197_source.html#l00434">434</a> of file <a class="el" href="a00197_source.html">memory.h</a>.</p>
</div>
</div>
<a class="anchor" id="a0f0aac56ea595b2814b69ff6033c802f"></a><!-- doxytag: member="ucc::keyassoc::remove" ref="a0f0aac56ea595b2814b69ff6033c802f" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* ucc::keyassoc::remove </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>name</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove a name and pointer association. </p>
<p>If managed key names are used then the memory allocated for the name will be re-used. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>to remove. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer value of the name or NULL if not found. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00197_source.html">memory.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:30 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|