]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/containers/hash.hpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / containers / hash.hpp
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from src/moof/stlplus/hash.hpp
rename to src/stlplus/containers/hash.hpp
index 05d3b7d..1962481
@@ -14,6 +14,7 @@
 #include "exceptions.hpp"\r
 #include "safe_iterator.hpp"\r
 #include <map>\r
+#include <iostream>\r
 \r
 namespace stlplus\r
 {\r
@@ -151,10 +152,14 @@ namespace stlplus
     iterator insert(const K& key);\r
 \r
     // remove a key/data pair from the hash table\r
-    bool erase(const K& key);\r
+    // as in map, this returns the number of elements erased\r
+    size_type erase(const K& key);\r
+    // remove an element from the hash table using an iterator\r
+    // as in map, returns an iterator to the next element\r
+    iterator erase(iterator it);\r
     // remove all elements from the hash table\r
     void erase(void);\r
-    // provide the std::map equivalent clear function\r
+    // map equivalent of above\r
     void clear(void);\r
 \r
     // find a key and return an iterator to it\r
@@ -176,6 +181,10 @@ namespace stlplus
     const_iterator end(void) const;\r
     iterator end(void);\r
 \r
+    // diagnostic report shows the number of items in each bin so can be used\r
+    // to diagnose effectiveness of hash functions\r
+    void debug_report(std::ostream&) const;\r
+\r
     // internals\r
   private:\r
     friend class hash_element<K,T,H,E>;\r
This page took 0.019046 seconds and 4 git commands to generate.