*
**************************************************************************/
-#ifndef _MOOF_HASHTOOLS_HH_
-#define _MOOF_HASHTOOLS_HH_
+#ifndef _MOOF_HASH_HH_
+#define _MOOF_HASH_HH_
+
+/**
+ * \file hash.hh
+ * Hash tables and functions.
+ */
#include <string>
-#include <stlplus/hash.hpp>
+#include <moof/stlplus/hash.hpp>
+
+
+namespace moof {
-namespace Mf {
+using stlplus::hash;
-struct HashFunction
+struct hash_function
{
// generic hash function
- unsigned operator()(const void* key, int len,
- unsigned seed = -1) const;
+ unsigned operator () (const void* key, int len,
+ unsigned seed = -1) const;
- inline unsigned operator()(const std::string& val) const
+ unsigned operator () (const std::string& val) const
{
return (*this)(val.data(), val.length());
}
- inline unsigned operator()(int val) const
+ unsigned operator () (int val) const
{
return val;
}
};
-} // namespace Mf
+} // namespace moof
-#endif // _MOOF_HASHTOOLS_HH_
+#endif // _MOOF_HASH_HH_