<!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> <title>Class Poco::HashMap</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/> <meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/> <meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/> <meta name="language" content="en"/> <meta name="date" content="2009-11-24"/> <meta name="generator" content="PocoDoc"/> <link rel="stylesheet" href="css/styles.css" type="text/css"/> </head> <body bgcolor="#ffffff" leftmargin="0" topmargin="0"> <div class="header"> <h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1> <h1 class="template">template < class Key, class Mapped, class HashFunc = Hash < Key > ></h1> <h1 class="symbol">class HashMap</h1> </div> <div class="body"> <p> <b>Library:</b> Foundation<br /> <b>Package:</b> Hashing<br /> <b>Header:</b> Poco/HashMap.h</p> <h2>Description</h2> <div class="description"> <p>This class implements a map using a <a href="Poco.LinearHashTable.html" title="class Poco::LinearHashTable">LinearHashTable</a>. </p> <p>A <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a> can be used just like a std::map. </p> </div> <h2>Member Summary</h2> <p><b>Member Functions: </b><a href="Poco.HashMap.html#7368" title="Poco::HashMap::begin()">begin</a>, <a href="Poco.HashMap.html#7384" title="Poco::HashMap::clear()">clear</a>, <a href="Poco.HashMap.html#7386" title="Poco::HashMap::empty()">empty</a>, <a href="Poco.HashMap.html#7369" title="Poco::HashMap::end()">end</a>, <a href="Poco.HashMap.html#7380" title="Poco::HashMap::erase()">erase</a>, <a href="Poco.HashMap.html#7372" title="Poco::HashMap::find()">find</a>, <a href="Poco.HashMap.html#7376" title="Poco::HashMap::insert()">insert</a>, <a href="Poco.HashMap.html#7387" title="Poco::HashMap::operator()">operator</a>, <a href="Poco.HashMap.html#7364" title="Poco::HashMap::operator =()">operator =</a>, <a href="Poco.HashMap.html#7385" title="Poco::HashMap::size()">size</a>, <a href="Poco.HashMap.html#7366" title="Poco::HashMap::swap()">swap</a></p> <h2>Types</h2> <h3><a name="7360">ConstIterator</a></h3> <p class="decl">typedef typename <a href="Poco.HashTable.html#7456" title="Poco::HashTable::ConstIterator">HashTable::ConstIterator</a> <a href="Poco.HashMap.html#7360" title="Poco::HashMap::ConstIterator">ConstIterator</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7354">ConstPointer</a></h3> <p class="decl">typedef const Mapped * <a href="Poco.HashMap.html#7354" title="Poco::HashMap::ConstPointer">ConstPointer</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7352">ConstReference</a></h3> <p class="decl">typedef const Mapped & <a href="Poco.HashMap.html#7352" title="Poco::HashMap::ConstReference">ConstReference</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7358">HashTable</a></h3> <p class="decl">typedef <a href="Poco.LinearHashTable.html" title="class Poco::LinearHashTable">LinearHashTable</a> < <a href="Poco.HashMap.html#7355" title="Poco::HashMap::ValueType">ValueType</a>, <a href="Poco.HashMap.html#7357" title="Poco::HashMap::HashType">HashType</a> > <a href="Poco.HashMap.html#7358" title="Poco::HashMap::HashTable">HashTable</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7357">HashType</a></h3> <p class="decl">typedef <a href="Poco.HashMapEntryHash.html" title="struct Poco::HashMapEntryHash">HashMapEntryHash</a> < <a href="Poco.HashMap.html#7355" title="Poco::HashMap::ValueType">ValueType</a>, HashFunc > <a href="Poco.HashMap.html#7357" title="Poco::HashMap::HashType">HashType</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7359">Iterator</a></h3> <p class="decl">typedef typename <a href="Poco.HashTable.html#7457" title="Poco::HashTable::Iterator">HashTable::Iterator</a> <a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7349">KeyType</a></h3> <p class="decl">typedef Key <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7350">MappedType</a></h3> <p class="decl">typedef Mapped <a href="Poco.HashMap.html#7350" title="Poco::HashMap::MappedType">MappedType</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7356">PairType</a></h3> <p class="decl">typedef std::pair < <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a>, <a href="Poco.HashMap.html#7350" title="Poco::HashMap::MappedType">MappedType</a> > <a href="Poco.HashMap.html#7356" title="Poco::HashMap::PairType">PairType</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7353">Pointer</a></h3> <p class="decl">typedef Mapped * <a href="Poco.HashMap.html#7353" title="Poco::HashMap::Pointer">Pointer</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7351">Reference</a></h3> <p class="decl">typedef Mapped & <a href="Poco.HashMap.html#7351" title="Poco::HashMap::Reference">Reference</a>;</p> <div class="description"> <p></p> </div> <h3><a name="7355">ValueType</a></h3> <p class="decl">typedef <a href="Poco.HashMapEntry.html" title="struct Poco::HashMapEntry">HashMapEntry</a> < Key, Mapped > <a href="Poco.HashMap.html#7355" title="Poco::HashMap::ValueType">ValueType</a>;</p> <div class="description"> <p></p> </div> <h2>Constructors</h2> <h3><a name="7361">HashMap</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a>();</p> <div class="description"> <p>Creates an empty <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a>. </p> </div> <h3><a name="7362">HashMap</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a>(<br /> std::size_t initialReserve<br />);</p> <div class="description"> <p>Creates the <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a> with room for initialReserve entries. </p> </div> <h2>Member Functions</h2> <h3><a name="7368">begin</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7360" title="Poco::HashMap::ConstIterator">ConstIterator</a> begin() const;</p> <div class="description"> <p></p> </div> <h3><a name="7370">begin</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a> begin();</p> <div class="description"> <p></p> </div> <h3><a name="7384">clear</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">void clear();</p> <div class="description"> <p></p> </div> <h3><a name="7386">empty</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">bool empty() const;</p> <div class="description"> <p></p> </div> <h3><a name="7369">end</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7360" title="Poco::HashMap::ConstIterator">ConstIterator</a> end() const;</p> <div class="description"> <p></p> </div> <h3><a name="7371">end</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a> end();</p> <div class="description"> <p></p> </div> <h3><a name="7380">erase</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">void erase(<br /> <a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a> it<br />);</p> <div class="description"> <p></p> </div> <h3><a name="7382">erase</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">void erase(<br /> const <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a> & key<br />);</p> <div class="description"> <p></p> </div> <h3><a name="7372">find</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7360" title="Poco::HashMap::ConstIterator">ConstIterator</a> find(<br /> const <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a> & key<br />) const;</p> <div class="description"> <p></p> </div> <h3><a name="7374">find</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a> find(<br /> const <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a> & key<br />);</p> <div class="description"> <p></p> </div> <h3><a name="7376">insert</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">std::pair < <a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a>, bool > insert(<br /> const <a href="Poco.HashMap.html#7356" title="Poco::HashMap::PairType">PairType</a> & pair<br />);</p> <div class="description"> <p></p> </div> <h3><a name="7378">insert</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">std::pair < <a href="Poco.HashMap.html#7359" title="Poco::HashMap::Iterator">Iterator</a>, bool > insert(<br /> const <a href="Poco.HashMap.html#7355" title="Poco::HashMap::ValueType">ValueType</a> & value<br />);</p> <div class="description"> <p></p> </div> <h3><a name="7387">operator</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7352" title="Poco::HashMap::ConstReference">ConstReference</a> operator[] (<br /> const <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a> & key<br />) const;</p> <div class="description"> <p></p> </div> <h3><a name="7389">operator</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html#7351" title="Poco::HashMap::Reference">Reference</a> operator[] (<br /> const <a href="Poco.HashMap.html#7349" title="Poco::HashMap::KeyType">KeyType</a> & key<br />);</p> <div class="description"> <p></p> </div> <h3><a name="7364">operator =</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl"><a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a> & operator = (<br /> const <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a> & map<br />);</p> <div class="description"> <p>Assigns another <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a>. </p> </div> <h3><a name="7385">size</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">std::size_t size() const;</p> <div class="description"> <p></p> </div> <h3><a name="7366">swap</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3> <p class="decl">void swap(<br /> <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a> & map<br />);</p> <div class="description"> <p>Swaps the <a href="Poco.HashMap.html" title="class Poco::HashMap">HashMap</a> with another one. </p> </div> <p class="footer">POCO C++ Libraries 1.3.6-all<br /> Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p> </div> </body> </html>