Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_hash_table_example.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!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>TB9.2 Example Applications: CHashTableExample 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.2 -->
<div class="contents">
<h1>CHashTableExample Class Reference</h1><!-- doxytag: class="CHashTableExample" -->
<p><a href="class_c_hash_table_example-members.html">List of all members.</a></p>
<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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a6bd4064e26fb1b4d23555aaf95445a87">~CHashTableExample</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a9f45f193bd3d5827ec302510e210a4ab">ConstructDefaultHashSet</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#af0c455879cdb6f865a22fbf22bbff1d8">ConstructOwnHashSet</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#aa0fb5a532b9e4fcc8e67da7acf7ac339">OperationsToHashSetL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a5d812199c1ec12e9f4fb087881c7486e">ConstructDefaultPtrHashSet</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#aa5ee720dec65ddad2526ec9f4ef9d83a">ConstructOwnPtrHashSet</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#ae386e8c189e8574d2e58e84b3e72d88a">OperationsToPtrHashSetL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#aa5cab6d3367986e74c7751ad7ffbff56">ConstructDefaultHashMap</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a3eb16d70e743b00df2392d58ce36d906">ConstructOwnHashMap</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a44a2596c976b9bf32231603e74453f38">OperationsToHashMapL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a002b4a538fbbfcb250b5b6b0553559a4">ConstructDefaultPtrHashMap</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a88d7ae0091bd0fa4682736db79c88975">ConstructOwnPtrHashMap</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#a3c2f6d5cdfd1b1f2ac2074fab48ca98a">OperationsToPtrHashMapL</a> ()</td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_hash_table_example.html">CHashTableExample</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_hash_table_example.html#acf16d511ffe0f92724a2938659902ce8">NewL</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Demonstrates some uses of the Symbian platform hash table APIs of the User Library component.</p>
<p>The class demonstrates how to construct and operate a hash set, a hash set of pointers, a hash map and a hash map of pointers.</p>
<ul>
<li>Construction of these includes<ul>
<li>using the default hash and identity functions for integers and for descriptors</li>
<li>providing custom hash and identity functions</li>
</ul>
</li>
<li>Operation of these includes<ul>
<li>inserting items</li>
<li>finding items</li>
<li>removing items</li>
<li>iterating through items</li>
<li>closing and cleanup </li>
</ul>
</li>
</ul>

<p>Definition at line <a class="el" href="hashtableexample_8h_source.html#l00092">92</a> of file <a class="el" href="hashtableexample_8h_source.html">hashtableexample.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6bd4064e26fb1b4d23555aaf95445a87"></a><!-- doxytag: member="CHashTableExample::~CHashTableExample" ref="a6bd4064e26fb1b4d23555aaf95445a87" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CHashTableExample::~CHashTableExample </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00044">44</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acf16d511ffe0f92724a2938659902ce8"></a><!-- doxytag: member="CHashTableExample::NewL" ref="acf16d511ffe0f92724a2938659902ce8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_hash_table_example.html">CHashTableExample</a> * CHashTableExample::NewL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Allocates and constructs a <a class="el" href="class_c_hash_table_example.html">CHashTableExample</a> object. Initialises all member data to their default values. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="class_c_hash_table_example.html">CHashTableExample</a> object </dd></dl>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00055">55</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9f45f193bd3d5827ec302510e210a4ab"></a><!-- doxytag: member="CHashTableExample::ConstructDefaultHashSet" ref="a9f45f193bd3d5827ec302510e210a4ab" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructDefaultHashSet </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a hash set using the default hash and identity functions for integers and for descriptors. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00068">68</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af0c455879cdb6f865a22fbf22bbff1d8"></a><!-- doxytag: member="CHashTableExample::ConstructOwnHashSet" ref="af0c455879cdb6f865a22fbf22bbff1d8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructOwnHashSet </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a hash set using the custom hash and identity functions to demonstrate the options. The objects declared aren't used elsewhere in the example. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00120">120</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa0fb5a532b9e4fcc8e67da7acf7ac339"></a><!-- doxytag: member="CHashTableExample::OperationsToHashSetL" ref="aa0fb5a532b9e4fcc8e67da7acf7ac339" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::OperationsToHashSetL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Applies various operations to hash set:</p>
<ul>
<li>Inserting items</li>
<li>Finding items</li>
<li>Iterating items</li>
<li>Removing items</li>
<li>closing and cleanup items  KErrNoMemory An attempt to allocate memory has failed  KErrNotFound Item not found </li>
</ul>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00143">143</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5d812199c1ec12e9f4fb087881c7486e"></a><!-- doxytag: member="CHashTableExample::ConstructDefaultPtrHashSet" ref="a5d812199c1ec12e9f4fb087881c7486e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructDefaultPtrHashSet </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a hash set of pointers using the default hash and identity functions for integers and for descriptors </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00228">228</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa5ee720dec65ddad2526ec9f4ef9d83a"></a><!-- doxytag: member="CHashTableExample::ConstructOwnPtrHashSet" ref="aa5ee720dec65ddad2526ec9f4ef9d83a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructOwnPtrHashSet </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs hash set of pointers using the custom hash and identity functions to demonstrate the options. The objects declared aren't used elsewhere in the example. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00248">248</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae386e8c189e8574d2e58e84b3e72d88a"></a><!-- doxytag: member="CHashTableExample::OperationsToPtrHashSetL" ref="ae386e8c189e8574d2e58e84b3e72d88a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::OperationsToPtrHashSetL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Applies various operations to hash set of pointers:</p>
<ul>
<li>Inserting items</li>
<li>Finding items</li>
<li>Iterating items</li>
<li>Removing items.</li>
<li>Closing and cleanup items.  KErrNoMemory An attempt to allocate memory has failed  KErrNotFound Item not found </li>
</ul>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00342">342</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa5cab6d3367986e74c7751ad7ffbff56"></a><!-- doxytag: member="CHashTableExample::ConstructDefaultHashMap" ref="aa5cab6d3367986e74c7751ad7ffbff56" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructDefaultHashMap </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a hash map using the default hash and identity functions for integers and for descriptors. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00431">431</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3eb16d70e743b00df2392d58ce36d906"></a><!-- doxytag: member="CHashTableExample::ConstructOwnHashMap" ref="a3eb16d70e743b00df2392d58ce36d906" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructOwnHashMap </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a hash map using the custom hash and identity functions to demonstrate the options. The objects declared aren't used elsewhere in the example. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00451">451</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a44a2596c976b9bf32231603e74453f38"></a><!-- doxytag: member="CHashTableExample::OperationsToHashMapL" ref="a44a2596c976b9bf32231603e74453f38" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::OperationsToHashMapL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Applies various operations to hash map:</p>
<ul>
<li>Inserting items</li>
<li>Finding items</li>
<li>Iterating items</li>
<li>Removing items</li>
<li>Closing and cleanup items.  KErrNoMemory An attempt to allocate memory has failed  KErrNotFound Item not found </li>
</ul>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00474">474</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a002b4a538fbbfcb250b5b6b0553559a4"></a><!-- doxytag: member="CHashTableExample::ConstructDefaultPtrHashMap" ref="a002b4a538fbbfcb250b5b6b0553559a4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructDefaultPtrHashMap </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs hash map of pointers using the default hash and identity functions for integers and for descriptors. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00552">552</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a88d7ae0091bd0fa4682736db79c88975"></a><!-- doxytag: member="CHashTableExample::ConstructOwnPtrHashMap" ref="a88d7ae0091bd0fa4682736db79c88975" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::ConstructOwnPtrHashMap </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs hash map of pointers using the custom hash and identity functions to demonstrate the options. The objects declared aren't used elsewhere in the example. </p>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00572">572</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3c2f6d5cdfd1b1f2ac2074fab48ca98a"></a><!-- doxytag: member="CHashTableExample::OperationsToPtrHashMapL" ref="a3c2f6d5cdfd1b1f2ac2074fab48ca98a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CHashTableExample::OperationsToPtrHashMapL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Applies various operations to hash map of pointers:</p>
<ul>
<li>Inserting items</li>
<li>Finding items</li>
<li>Iterating items</li>
<li>Removing items</li>
<li>Closing and cleanup items.  KErrNoMemory An attempt to allocate memory has failed  KErrNotFound Item not found </li>
</ul>

<p>Definition at line <a class="el" href="hashtableexample_8cpp_source.html#l00595">595</a> of file <a class="el" href="hashtableexample_8cpp_source.html">hashtableexample.cpp</a>.</p>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>