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
|
<!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::HashSet</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 Value, class HashFunc = Hash < Value > ></h1>
<h1 class="symbol">class HashSet</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Hashing<br />
<b>Header:</b> Poco/HashSet.h</p>
<h2>Description</h2>
<div class="description">
<p>This class implements a set using a <a href="Poco.LinearHashTable.html" title="class Poco::LinearHashTable">LinearHashTable</a>. </p>
<p>A <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a> can be used just like a std::set. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.HashSet.html#7412" title="Poco::HashSet::begin()">begin</a>, <a href="Poco.HashSet.html#7428" title="Poco::HashSet::clear()">clear</a>, <a href="Poco.HashSet.html#7420" title="Poco::HashSet::count()">count</a>, <a href="Poco.HashSet.html#7430" title="Poco::HashSet::empty()">empty</a>, <a href="Poco.HashSet.html#7413" title="Poco::HashSet::end()">end</a>, <a href="Poco.HashSet.html#7424" title="Poco::HashSet::erase()">erase</a>, <a href="Poco.HashSet.html#7416" title="Poco::HashSet::find()">find</a>, <a href="Poco.HashSet.html#7422" title="Poco::HashSet::insert()">insert</a>, <a href="Poco.HashSet.html#7408" title="Poco::HashSet::operator =()">operator =</a>, <a href="Poco.HashSet.html#7429" title="Poco::HashSet::size()">size</a>, <a href="Poco.HashSet.html#7410" title="Poco::HashSet::swap()">swap</a></p>
<h2>Types</h2>
<h3><a name="7401">ConstIterator</a></h3>
<p class="decl">typedef typename <a href="Poco.HashTable.html#7456" title="Poco::HashTable::ConstIterator">HashTable::ConstIterator</a> <a href="Poco.HashSet.html#7401" title="Poco::HashSet::ConstIterator">ConstIterator</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7397">ConstPointer</a></h3>
<p class="decl">typedef const Value * <a href="Poco.HashSet.html#7397" title="Poco::HashSet::ConstPointer">ConstPointer</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7395">ConstReference</a></h3>
<p class="decl">typedef const Value & <a href="Poco.HashSet.html#7395" title="Poco::HashSet::ConstReference">ConstReference</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7398">Hash</a></h3>
<p class="decl">typedef HashFunc <a href="Poco.HashSet.html#7398" title="Poco::HashSet::Hash">Hash</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7399">HashTable</a></h3>
<p class="decl">typedef <a href="Poco.LinearHashTable.html" title="class Poco::LinearHashTable">LinearHashTable</a> < <a href="Poco.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a>, <a href="Poco.HashSet.html#7398" title="Poco::HashSet::Hash">Hash</a> > <a href="Poco.HashSet.html#7399" title="Poco::HashSet::HashTable">HashTable</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7400">Iterator</a></h3>
<p class="decl">typedef typename <a href="Poco.HashTable.html#7457" title="Poco::HashTable::Iterator">HashTable::Iterator</a> <a href="Poco.HashSet.html#7400" title="Poco::HashSet::Iterator">Iterator</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7396">Pointer</a></h3>
<p class="decl">typedef Value * <a href="Poco.HashSet.html#7396" title="Poco::HashSet::Pointer">Pointer</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7394">Reference</a></h3>
<p class="decl">typedef Value & <a href="Poco.HashSet.html#7394" title="Poco::HashSet::Reference">Reference</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="7393">ValueType</a></h3>
<p class="decl">typedef Value <a href="Poco.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a>;</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="7402">HashSet</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>();</p>
<div class="description">
<p>Creates an empty <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>. </p>
</div>
<h3><a name="7403">HashSet</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>(<br /> std::size_t initialReserve<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>, using the given initialReserve. </p>
</div>
<h3><a name="7405">HashSet</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>(<br /> const <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a> & set<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a> by copying another one. </p>
</div>
<h2>Destructor</h2>
<h3><a name="7407">~HashSet</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">~<a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="7412">begin</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html#7401" title="Poco::HashSet::ConstIterator">ConstIterator</a> begin() const;</p>
<div class="description">
<p>Returns an iterator pointing to the first entry, if one exists. </p>
</div>
<h3><a name="7414">begin</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html#7400" title="Poco::HashSet::Iterator">Iterator</a> begin();</p>
<div class="description">
<p>Returns an iterator pointing to the first entry, if one exists. </p>
</div>
<h3><a name="7428">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>Erases all elements. </p>
</div>
<h3><a name="7420">count</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::size_t count(<br /> const <a href="Poco.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a> & value<br />) const;</p>
<div class="description">
<p>Returns the number of elements with the given value, with is either 1 or 0. </p>
</div>
<h3><a name="7430">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>Returns true if and only if the table is empty. </p>
</div>
<h3><a name="7413">end</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html#7401" title="Poco::HashSet::ConstIterator">ConstIterator</a> end() const;</p>
<div class="description">
<p>Returns an iterator pointing to the end of the table. </p>
</div>
<h3><a name="7415">end</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html#7400" title="Poco::HashSet::Iterator">Iterator</a> end();</p>
<div class="description">
<p>Returns an iterator pointing to the end of the table. </p>
</div>
<h3><a name="7424">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.HashSet.html#7400" title="Poco::HashSet::Iterator">Iterator</a> it<br />);</p>
<div class="description">
<p>Erases the element pointed to by it. </p>
</div>
<h3><a name="7426">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.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a> & value<br />);</p>
<div class="description">
<p>Erases the element with the given value, if it exists. </p>
</div>
<h3><a name="7416">find</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html#7401" title="Poco::HashSet::ConstIterator">ConstIterator</a> find(<br /> const <a href="Poco.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a> & value<br />) const;</p>
<div class="description">
<p>Finds an entry in the table. </p>
</div>
<h3><a name="7418">find</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html#7400" title="Poco::HashSet::Iterator">Iterator</a> find(<br /> const <a href="Poco.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a> & value<br />);</p>
<div class="description">
<p>Finds an entry in the table. </p>
</div>
<h3><a name="7422">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.HashSet.html#7400" title="Poco::HashSet::Iterator">Iterator</a>, bool > insert(<br /> const <a href="Poco.HashSet.html#7393" title="Poco::HashSet::ValueType">ValueType</a> & value<br />);</p>
<div class="description">
<p>Inserts an element into the set. </p>
<p>If the element already exists in the set, a pair(iterator, false) with iterator pointing to the existing element is returned. Otherwise, the element is inserted an a pair(iterator, true) with iterator pointing to the new element is returned. </p>
</div>
<h3><a name="7408">operator =</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a> & operator = (<br /> const <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a> & table<br />);</p>
<div class="description">
<p>Assigns another <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</a>. </p>
</div>
<h3><a name="7429">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>Returns the number of elements in the table. </p>
</div>
<h3><a name="7410">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.HashSet.html" title="class Poco::HashSet">HashSet</a> & set<br />);</p>
<div class="description">
<p>Swaps the <a href="Poco.HashSet.html" title="class Poco::HashSet">HashSet</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>
|