--- /dev/null
+
+/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
+**] All rights reserved.
+*
+* vi:ts=4 sw=4 tw=75
+*
+* Distributable under the terms and conditions of the 2-clause BSD license;
+* see the file COPYING for a complete text of the license.
+*
+**************************************************************************/
+
+#ifndef _MOOF_HASH_HH_
+#define _MOOF_HASH_HH_
+
+/**
+ * \file hash.hh
+ * Hash tables and functions.
+ */
+
+#include <string>
+
+#include <moof/stlplus/hash.hpp>
+
+
+namespace moof {
+
+
+using stlplus::hash;
+
+
+struct hash_function
+{
+ // generic hash function
+ unsigned operator () (const void* key, int len,
+ unsigned seed = -1) const;
+
+ unsigned operator () (const std::string& val) const
+ {
+ return (*this)(val.data(), val.length());
+ }
+
+ unsigned operator () (int val) const
+ {
+ return val;
+ }
+};
+
+
+} // namespace moof
+
+#endif // _MOOF_HASH_HH_
+