Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 592

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: csHash&lt; T, K, ArrayMemoryAlloc &gt; Class Template Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>csHash&lt; T, K, ArrayMemoryAlloc &gt; Class Template Reference<br>
<small>
[<a class="el" href="group__util__containers.html">Containers</a>]</small>
</h1><!-- doxytag: class="csHash" -->A generic hash table class, which grows dynamically and whose buckets are unsorted arrays.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="hash_8h-source.html">csutil/hash.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for csHash&lt; T, K, ArrayMemoryAlloc &gt;:</div>
<div class="dynsection">
<p><center><img src="classcsHash__inherit__graph.png" border="0" usemap="#csHash_3_01T_00_01K_00_01ArrayMemoryAlloc_01_4__inherit__map" alt="Inheritance graph"></center>
<map name="csHash_3_01T_00_01K_00_01ArrayMemoryAlloc_01_4__inherit__map">
<area shape="rect" href="classcsHashReversible.html" title="A csHash&lt;&gt; that maintains a reverse hash for indexing keys by values." alt="" coords="36,84,223,111"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcsHash-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="521e02c32f53de01f88546c384bcacca"></a><!-- doxytag: member="csHash::AllocatorType" ref="521e02c32f53de01f88546c384bcacca" args="" -->
typedef ArrayMemoryAlloc&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#521e02c32f53de01f88546c384bcacca">AllocatorType</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c417f7958c3587067a3582fc7a12628c"></a><!-- doxytag: member="csHash::KeyType" ref="c417f7958c3587067a3582fc7a12628c" args="" -->
typedef K&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#c417f7958c3587067a3582fc7a12628c">KeyType</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="68fcc3be97e81a486a9477ffbab1bdb5"></a><!-- doxytag: member="csHash::ThisType" ref="68fcc3be97e81a486a9477ffbab1bdb5" args="" -->
typedef <a class="el" href="classcsHash.html">csHash</a>&lt; T, K,<br>
 ArrayMemoryAlloc &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#68fcc3be97e81a486a9477ffbab1bdb5">ThisType</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3754abcf3a8b46b780944dd91b74496"></a><!-- doxytag: member="csHash::ValueType" ref="e3754abcf3a8b46b780944dd91b74496" args="" -->
typedef T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#e3754abcf3a8b46b780944dd91b74496">ValueType</a></td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#3d8d0fd5f7f89a201dd107f60fec56ed">Contains</a> (const K &amp;key) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether at least one element matches the given key.  <a href="#3d8d0fd5f7f89a201dd107f60fec56ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#3abf064780ab7b0b830d871561fc53d5">csHash</a> (const <a class="el" href="classcsHash.html">csHash</a>&lt; T &gt; &amp;o)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#3abf064780ab7b0b830d871561fc53d5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#8b46b882e83b872a91afd9b5f0a525da">csHash</a> (size_t size=23, size_t grow_rate=5, size_t max_size=20000)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a hash table with an array of the given size, which for optimisation reasons should be a prime number.  <a href="#8b46b882e83b872a91afd9b5f0a525da"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#0a7f8b2b8f46fcd915037d31b1e8fedb">Delete</a> (const K &amp;key, const T &amp;value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete all the elements matching the given key and value.  <a href="#0a7f8b2b8f46fcd915037d31b1e8fedb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#8c60faf9a893528d3479d8ede5920134">DeleteAll</a> (const K &amp;key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete all the elements matching the given key.  <a href="#8c60faf9a893528d3479d8ede5920134"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#13f7704179600401bcf337a9130c5480">DeleteAll</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete all the elements.  <a href="#13f7704179600401bcf337a9130c5480"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#2de35a34f8ad5666654c33047b2c60bc">DeleteElement</a> (<a class="el" href="classcsHash_1_1ConstGlobalIterator.html">ConstGlobalIterator</a> &amp;iterator)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete the element pointed by the iterator.  <a href="#2de35a34f8ad5666654c33047b2c60bc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#bd90b6c8da7870ee7f5cd80299b92115">DeleteElement</a> (<a class="el" href="classcsHash_1_1GlobalIterator.html">GlobalIterator</a> &amp;iterator)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete the element pointed by the iterator.  <a href="#bd90b6c8da7870ee7f5cd80299b92115"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#f5fe9d4c1fa175c3d0fc718566e6c801">Empty</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete all the elements. (Idiomatic alias for <a class="el" href="classcsHash.html#13f7704179600401bcf337a9130c5480" title="Delete all the elements.">DeleteAll()</a>.).  <a href="#f5fe9d4c1fa175c3d0fc718566e6c801"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#c48907570f77a75ab5c216cfec8a5938">Get</a> (const K &amp;key, T &amp;fallback)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first element matching the given key, or <code>fallback</code> if there is none.  <a href="#c48907570f77a75ab5c216cfec8a5938"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#2241e61d25ae5030e3e3174bfccc079f">Get</a> (const K &amp;key, const T &amp;fallback) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first element matching the given key, or <code>fallback</code> if there is none.  <a href="#2241e61d25ae5030e3e3174bfccc079f"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename H, typename M&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsArray.html">csArray</a>&lt; T, H, M &gt;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcsHash.html#30b4703285b3ccd21420c2cb6f361229">GetAll</a> (const K &amp;key) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get all the elements with the given key, or empty if there are none.  <a href="#30b4703285b3ccd21420c2cb6f361229"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsArray.html">csArray</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#7a852c5b0ab7a745795411974890baca">GetAll</a> (const K &amp;key) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get all the elements with the given key, or empty if there are none.  <a href="#7a852c5b0ab7a745795411974890baca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#486ae42af4fe30feabc7e365aaed99b3">GetElementPointer</a> (const K &amp;key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a pointer to the first element matching the given key, or 0 if there is none.  <a href="#486ae42af4fe30feabc7e365aaed99b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#be068c7c222f4e78640e990a1810b6c5">GetElementPointer</a> (const K &amp;key) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a pointer to the first element matching the given key, or 0 if there is none.  <a href="#be068c7c222f4e78640e990a1810b6c5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsHash_1_1ConstGlobalIterator.html">ConstGlobalIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#63496fcf5fb4a0898fe2c4a7222ae364">GetIterator</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a const iterator for the hash, to iterate over all elements.  <a href="#63496fcf5fb4a0898fe2c4a7222ae364"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsHash_1_1ConstIterator.html">ConstIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#4ad6807c13abf6668420e4587a2bb0a9">GetIterator</a> (const K &amp;key) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a const iterator for the hash, to iterate only over the elements with the given key.  <a href="#4ad6807c13abf6668420e4587a2bb0a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsHash_1_1GlobalIterator.html">GlobalIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#87ee4aae183859a13101daf80b4032de">GetIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an iterator for the hash, to iterate over all elements.  <a href="#87ee4aae183859a13101daf80b4032de"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsHash_1_1Iterator.html">Iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#0a5d83ba5963da614ba6d19819d4eb07">GetIterator</a> (const K &amp;key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an iterator for the hash, to iterate only over the elements with the given key.  <a href="#0a5d83ba5963da614ba6d19819d4eb07"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#c0e6f8aea25fa59de886e3d85bd4ea9e">GetSize</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of elements in the hash.  <a href="#c0e6f8aea25fa59de886e3d85bd4ea9e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#6ecfc915e059391cc2558c592264b671">In</a> (const K &amp;key) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether at least one element matches the given key.  <a href="#6ecfc915e059391cc2558c592264b671"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#e67b2dfd18740126a3866d9d4fbb391c">IsEmpty</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the hash is empty.  <a href="#e67b2dfd18740126a3866d9d4fbb391c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#0bd143a491197e0ba2cd3a2e7bd58ec3">operator[]</a> (const K &amp;key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">h["key"] shorthand notation for h.GetElementPoint ("key")  <a href="#0bd143a491197e0ba2cd3a2e7bd58ec3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#25d78ac60667a3f6950ef9212db6a12c">Put</a> (const K &amp;key, const T &amp;value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an element to the hash table.  <a href="#25d78ac60667a3f6950ef9212db6a12c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#26669d4e89f8a5615cbb974442cf92ab">PutUnique</a> (const K &amp;key, const T &amp;value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an element to the hash table, overwriting if the key already exists.  <a href="#26669d4e89f8a5615cbb974442cf92ab"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b64d29764ad9127aa67b159119442276"></a><!-- doxytag: member="csHash::ElementArray" ref="b64d29764ad9127aa67b159119442276" args="" -->
typedef <a class="el" href="classcsArray.html">csArray</a><br>
&lt; <a class="el" href="structcsHash_1_1Element.html">Element</a>,<br>
 <a class="el" href="classcsArrayElementHandler.html">csArrayElementHandler</a><br>
&lt; <a class="el" href="structcsHash_1_1Element.html">Element</a> &gt;,<br>
 ArrayMemoryAlloc &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#b64d29764ad9127aa67b159119442276">ElementArray</a></td></tr>

<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5d4ab61e8a7d28c82a71b0739cf5a273"></a><!-- doxytag: member="csHash::Elements" ref="5d4ab61e8a7d28c82a71b0739cf5a273" args="" -->
<a class="el" href="classcsArray.html">csArray</a><br>
&lt; <a class="el" href="classcsArray.html">ElementArray</a>,<br>
 <a class="el" href="classcsArrayElementHandler.html">csArrayElementHandler</a><br>
&lt; <a class="el" href="classcsArray.html">ElementArray</a> &gt;,<br>
 ArrayMemoryAlloc &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#5d4ab61e8a7d28c82a71b0739cf5a273">Elements</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="905c6b082d89cf34a3ecb050b0236cfe"></a><!-- doxytag: member="csHash::Modulo" ref="905c6b082d89cf34a3ecb050b0236cfe" args="" -->
size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#905c6b082d89cf34a3ecb050b0236cfe">Modulo</a></td></tr>

<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="20c95ebfa904fc04881383afebb4635f"></a><!-- doxytag: member="csHash::ConstGlobalIterator" ref="20c95ebfa904fc04881383afebb4635f" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#20c95ebfa904fc04881383afebb4635f">ConstGlobalIterator</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5485970bb9da6b5d782fa28638b5658f"></a><!-- doxytag: member="csHash::ConstIterator" ref="5485970bb9da6b5d782fa28638b5658f" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#5485970bb9da6b5d782fa28638b5658f">ConstIterator</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="594373255032048e48ada9ba4e8b6e0f"></a><!-- doxytag: member="csHash::GlobalIterator" ref="594373255032048e48ada9ba4e8b6e0f" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#594373255032048e48ada9ba4e8b6e0f">GlobalIterator</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9830fc407400559db7e7783cc10a9394"></a><!-- doxytag: member="csHash::Iterator" ref="9830fc407400559db7e7783cc10a9394" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash.html#9830fc407400559db7e7783cc10a9394">Iterator</a></td></tr>

<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash_1_1ConstGlobalIterator.html">ConstGlobalIterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An const iterator class for the hash.  <a href="classcsHash_1_1ConstGlobalIterator.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash_1_1ConstIterator.html">ConstIterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An const iterator class for the hash.  <a href="classcsHash_1_1ConstIterator.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsHash_1_1Element.html">Element</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash_1_1GlobalIterator.html">GlobalIterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An iterator class for the hash.  <a href="classcsHash_1_1GlobalIterator.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsHash_1_1Iterator.html">Iterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An iterator class for the hash.  <a href="classcsHash_1_1Iterator.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt;<br>
 class csHash&lt; T, K, ArrayMemoryAlloc &gt;</h3>

A generic hash table class, which grows dynamically and whose buckets are unsorted arrays. 
<p>
The hash value of a key is computed using csHashComputer&lt;&gt;, two keys are compared using csComparator&lt;&gt;. You need to provide appropriate specializations of those templates if you want use non-integral types (other than const char* and <a class="el" href="classcsString.html" title="Thin wrapper around csStringFast&lt;&gt; with its default buffer size.">csString</a> for which appropriate specializations are already provided) or special hash algorithms. 
<p>Definition at line <a class="el" href="hash_8h-source.html#l00245">245</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="8b46b882e83b872a91afd9b5f0a525da"></a><!-- doxytag: member="csHash::csHash" ref="8b46b882e83b872a91afd9b5f0a525da" args="(size_t size=23, size_t grow_rate=5, size_t max_size=20000)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::<a class="el" href="classcsHash.html">csHash</a>           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>23</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>grow_rate</em> = <code>5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>max_size</em> = <code>20000</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a hash table with an array of the given size, which for optimisation reasons should be a prime number. 
<p>
<em>grow_rate</em> is the rate at which the hash table grows: <em>size</em> doubles once there are <em>size/<em>grow_rate</em> collisions</em>. It will not grow after it reaches <em>max_size</em>.<p>
Here are a few primes: 7, 11, 19, 29, 59, 79, 101, 127, 151, 199, 251, 307, 401, 503, 809, 1009, 1499, 2003, 3001, 5003, 12263, 25247, 36923, 50119, 70951, 90313, 104707.<p>
For a bigger list go to <a href="http://www.utm.edu/research/primes/">http://www.utm.edu/research/primes/</a> 
<p>Definition at line <a class="el" href="hash_8h-source.html#l00328">328</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="3abf064780ab7b0b830d871561fc53d5"></a><!-- doxytag: member="csHash::csHash" ref="3abf064780ab7b0b830d871561fc53d5" args="(const csHash&lt; T &gt; &amp;o)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::<a class="el" href="classcsHash.html">csHash</a>           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcsHash.html">csHash</a>&lt; T &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>o</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy constructor. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00335">335</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3d8d0fd5f7f89a201dd107f60fec56ed"></a><!-- doxytag: member="csHash::Contains" ref="3d8d0fd5f7f89a201dd107f60fec56ed" args="(const K &amp;key) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::Contains           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns whether at least one element matches the given key. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00406">406</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="set_8h-source.html#l00111">csSet&lt; csPtrKey&lt; iMeshWrapper &gt; &gt;::Contains()</a>, and <a class="el" href="hash_8h-source.html#l00423">csHash&lt; csEventCord *, csStringID &gt;::In()</a>.</p>

</div>
</div><p>
<a class="anchor" name="0a7f8b2b8f46fcd915037d31b1e8fedb"></a><!-- doxytag: member="csHash::Delete" ref="0a7f8b2b8f46fcd915037d31b1e8fedb" args="(const K &amp;key, const T &amp;value)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::Delete           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete all the elements matching the given key and value. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00546">546</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="set_8h-source.html#l00140">csSet&lt; csPtrKey&lt; iMeshWrapper &gt; &gt;::Delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8c60faf9a893528d3479d8ede5920134"></a><!-- doxytag: member="csHash::DeleteAll" ref="8c60faf9a893528d3479d8ede5920134" args="(const K &amp;key)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::DeleteAll           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete all the elements matching the given key. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00526">526</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="13f7704179600401bcf337a9130c5480"></a><!-- doxytag: member="csHash::DeleteAll" ref="13f7704179600401bcf337a9130c5480" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::DeleteAll           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete all the elements. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00515">515</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="set_8h-source.html#l00127">csSet&lt; csPtrKey&lt; iMeshWrapper &gt; &gt;::DeleteAll()</a>, and <a class="el" href="hash_8h-source.html#l00523">csHash&lt; csEventCord *, csStringID &gt;::Empty()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2de35a34f8ad5666654c33047b2c60bc"></a><!-- doxytag: member="csHash::DeleteElement" ref="2de35a34f8ad5666654c33047b2c60bc" args="(ConstGlobalIterator &amp;iterator)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::DeleteElement           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsHash_1_1ConstGlobalIterator.html">ConstGlobalIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>iterator</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete the element pointed by the iterator. 
<p>
This is safe for this iterator, not for the others. 
<p>Definition at line <a class="el" href="hash_8h-source.html#l00950">950</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="bd90b6c8da7870ee7f5cd80299b92115"></a><!-- doxytag: member="csHash::DeleteElement" ref="bd90b6c8da7870ee7f5cd80299b92115" args="(GlobalIterator &amp;iterator)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::DeleteElement           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsHash_1_1GlobalIterator.html">GlobalIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>iterator</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete the element pointed by the iterator. 
<p>
This is safe for this iterator, not for the others. 
<p>Definition at line <a class="el" href="hash_8h-source.html#l00940">940</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="f5fe9d4c1fa175c3d0fc718566e6c801"></a><!-- doxytag: member="csHash::Empty" ref="f5fe9d4c1fa175c3d0fc718566e6c801" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::Empty           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete all the elements. (Idiomatic alias for <a class="el" href="classcsHash.html#13f7704179600401bcf337a9130c5480" title="Delete all the elements.">DeleteAll()</a>.). 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00523">523</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="c48907570f77a75ab5c216cfec8a5938"></a><!-- doxytag: member="csHash::Get" ref="c48907570f77a75ab5c216cfec8a5938" args="(const K &amp;key, T &amp;fallback)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::Get           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;&nbsp;</td>
          <td class="paramname"> <em>fallback</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the first element matching the given key, or <code>fallback</code> if there is none. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00498">498</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="2241e61d25ae5030e3e3174bfccc079f"></a><!-- doxytag: member="csHash::Get" ref="2241e61d25ae5030e3e3174bfccc079f" args="(const K &amp;key, const T &amp;fallback) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const T&amp; <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::Get           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&nbsp;</td>
          <td class="paramname"> <em>fallback</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the first element matching the given key, or <code>fallback</code> if there is none. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00478">478</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="hashr_8h-source.html#l00088">csHashReversible&lt; T, K &gt;::GetKey()</a>.</p>

</div>
</div><p>
<a class="anchor" name="30b4703285b3ccd21420c2cb6f361229"></a><!-- doxytag: member="csHash::GetAll" ref="30b4703285b3ccd21420c2cb6f361229" args="(const K &amp;key) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
<div class="memtemplate">
template&lt;typename H, typename M&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsArray.html">csArray</a>&lt;T, H, M&gt; <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetAll           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get all the elements with the given key, or empty if there are none. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00366">366</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="7a852c5b0ab7a745795411974890baca"></a><!-- doxytag: member="csHash::GetAll" ref="7a852c5b0ab7a745795411974890baca" args="(const K &amp;key) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsArray.html">csArray</a>&lt;T&gt; <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetAll           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get all the elements with the given key, or empty if there are none. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00358">358</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="486ae42af4fe30feabc7e365aaed99b3"></a><!-- doxytag: member="csHash::GetElementPointer" ref="486ae42af4fe30feabc7e365aaed99b3" args="(const K &amp;key)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetElementPointer           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a pointer to the first element matching the given key, or 0 if there is none. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00450">450</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="be068c7c222f4e78640e990a1810b6c5"></a><!-- doxytag: member="csHash::GetElementPointer" ref="be068c7c222f4e78640e990a1810b6c5" args="(const K &amp;key) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const T* <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetElementPointer           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a pointer to the first element matching the given key, or 0 if there is none. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00430">430</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="hashr_8h-source.html#l00079">csHashReversible&lt; T, K &gt;::GetKeyPointer()</a>, and <a class="el" href="hash_8h-source.html#l00469">csHash&lt; csEventCord *, csStringID &gt;::operator[]()</a>.</p>

</div>
</div><p>
<a class="anchor" name="63496fcf5fb4a0898fe2c4a7222ae364"></a><!-- doxytag: member="csHash::GetIterator" ref="63496fcf5fb4a0898fe2c4a7222ae364" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsHash_1_1ConstGlobalIterator.html">ConstGlobalIterator</a> <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a const iterator for the hash, to iterate over all elements. 
<p>
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>Modifying the hash (except with <a class="el" href="classcsHash.html#bd90b6c8da7870ee7f5cd80299b92115" title="Delete the element pointed by the iterator.">DeleteElement()</a>) while you have open iterators will result in undefined behaviour. </dd></dl>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00995">995</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="4ad6807c13abf6668420e4587a2bb0a9"></a><!-- doxytag: member="csHash::GetIterator" ref="4ad6807c13abf6668420e4587a2bb0a9" args="(const K &amp;key) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsHash_1_1ConstIterator.html">ConstIterator</a> <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetIterator           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a const iterator for the hash, to iterate only over the elements with the given key. 
<p>
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>Modifying the hash (except with <a class="el" href="classcsHash.html#bd90b6c8da7870ee7f5cd80299b92115" title="Delete the element pointed by the iterator.">DeleteElement()</a>) while you have open iterators will result in undefined behaviour. </dd></dl>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00985">985</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="87ee4aae183859a13101daf80b4032de"></a><!-- doxytag: member="csHash::GetIterator" ref="87ee4aae183859a13101daf80b4032de" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsHash_1_1GlobalIterator.html">GlobalIterator</a> <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return an iterator for the hash, to iterate over all elements. 
<p>
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>Modifying the hash (except with <a class="el" href="classcsHash.html#bd90b6c8da7870ee7f5cd80299b92115" title="Delete the element pointed by the iterator.">DeleteElement()</a>) while you have open iterators will result in undefined behaviour. </dd></dl>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00974">974</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="0a5d83ba5963da614ba6d19819d4eb07"></a><!-- doxytag: member="csHash::GetIterator" ref="0a5d83ba5963da614ba6d19819d4eb07" args="(const K &amp;key)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsHash_1_1Iterator.html">Iterator</a> <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetIterator           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return an iterator for the hash, to iterate only over the elements with the given key. 
<p>
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>Modifying the hash (except with <a class="el" href="classcsHash.html#bd90b6c8da7870ee7f5cd80299b92115" title="Delete the element pointed by the iterator.">DeleteElement()</a>) while you have open iterators will result in undefined behaviour. </dd></dl>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00964">964</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="c0e6f8aea25fa59de886e3d85bd4ea9e"></a><!-- doxytag: member="csHash::GetSize" ref="c0e6f8aea25fa59de886e3d85bd4ea9e" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::GetSize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the number of elements in the hash. 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00567">567</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="set_8h-source.html#l00146">csSet&lt; csPtrKey&lt; iMeshWrapper &gt; &gt;::GetSize()</a>, and <a class="el" href="hash_8h-source.html#l00577">csHash&lt; csEventCord *, csStringID &gt;::IsEmpty()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6ecfc915e059391cc2558c592264b671"></a><!-- doxytag: member="csHash::In" ref="6ecfc915e059391cc2558c592264b671" args="(const K &amp;key) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::In           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns whether at least one element matches the given key. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This is rigidly equivalent to Contains(key), but may be considered more idiomatic by some. </dd></dl>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00423">423</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="e67b2dfd18740126a3866d9d4fbb391c"></a><!-- doxytag: member="csHash::IsEmpty" ref="e67b2dfd18740126a3866d9d4fbb391c" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::IsEmpty           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return true if the hash is empty. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Rigidly equivalent to <code>return <a class="el" href="classcsHash.html#c0e6f8aea25fa59de886e3d85bd4ea9e" title="Get the number of elements in the hash.">GetSize()</a> == 0</code>, but more idiomatic. </dd></dl>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00577">577</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="0bd143a491197e0ba2cd3a2e7bd58ec3"></a><!-- doxytag: member="csHash::operator[]" ref="0bd143a491197e0ba2cd3a2e7bd58ec3" args="(const K &amp;key)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::operator[]           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
h["key"] shorthand notation for h.GetElementPoint ("key") 
<p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00469">469</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="25d78ac60667a3f6950ef9212db6a12c"></a><!-- doxytag: member="csHash::Put" ref="25d78ac60667a3f6950ef9212db6a12c" args="(const K &amp;key, const T &amp;value)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::Put           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add an element to the hash table. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>If `key' is already present, does NOT replace the existing value, but merely adds `value' as an additional value of `key'. To retrieve all values for a given key, use <a class="el" href="classcsHash.html#7a852c5b0ab7a745795411974890baca" title="Get all the elements with the given key, or empty if there are none.">GetAll()</a>. If you instead want to replace an existing value for 'key', use <a class="el" href="classcsHash.html#26669d4e89f8a5615cbb974442cf92ab" title="Add an element to the hash table, overwriting if the key already exists.">PutUnique()</a>. </dd></dl>

<p>Reimplemented in <a class="el" href="classcsHashReversible.html#9c25406a6642d4e8f2d8a7d4da52b089">csHashReversible&lt; T, K &gt;</a>.</p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00346">346</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="set_8h-source.html#l00103">csSet&lt; csPtrKey&lt; iMeshWrapper &gt; &gt;::AddNoTest()</a>, and <a class="el" href="hashr_8h-source.html#l00059">csHashReversible&lt; T, K &gt;::Put()</a>.</p>

</div>
</div><p>
<a class="anchor" name="26669d4e89f8a5615cbb974442cf92ab"></a><!-- doxytag: member="csHash::PutUnique" ref="26669d4e89f8a5615cbb974442cf92ab" args="(const K &amp;key, const T &amp;value)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class K = unsigned int, class ArrayMemoryAlloc = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcsHash.html">csHash</a>&lt; T, K, ArrayMemoryAlloc &gt;::PutUnique           </td>
          <td>(</td>
          <td class="paramtype">const K &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add an element to the hash table, overwriting if the key already exists. 
<p>

<p>Reimplemented in <a class="el" href="classcsHashReversible.html#9942c91231ae37ef9bfe08966348e24e">csHashReversible&lt; T, K &gt;</a>.</p>

<p>Definition at line <a class="el" href="hash_8h-source.html#l00383">383</a> of file <a class="el" href="hash_8h-source.html">hash.h</a>.</p>

<p>Referenced by <a class="el" href="hashr_8h-source.html#l00069">csHashReversible&lt; T, K &gt;::PutUnique()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="hash_8h-source.html">hash.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>