3 #ifndef GEODE_HASHFUNCTION_H_ 4 #define GEODE_HASHFUNCTION_H_ 23 #include "geode_globals.hpp" 48 HashSB(
const Hasher hashFn) : m_hashFn(hashFn) {}
50 int32_t operator()(
const SharedBasePtr& p)
const {
return m_hashFn(p); }
61 EqualToSB(
const EqualTo equalFn) : m_equalFn(equalFn) {}
63 bool operator()(
const SharedBasePtr& x,
const SharedBasePtr& y)
const {
64 return m_equalFn(x, y);
68 template <
typename TKEY>
69 inline int32_t hashFunction(
const TKEY& k) {
73 template <
typename TKEY>
74 inline bool equalToFunction(
const TKEY& x,
const TKEY& y) {
75 return (*x.ptr() == *y.ptr());
81 #endif // GEODE_HASHFUNCTION_H_ Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
bool(* EqualTo)(const SharedBasePtr &, const SharedBasePtr &)
typedef for the hashing key equality function.
Definition: HashFunction.hpp:38
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:52
int32_t(* Hasher)(const SharedBasePtr &)
typedef for the hash function used by the hashing schemes.
Definition: HashFunction.hpp:35
This namespace contains all the Geode C++ API classes, enumerations and globals.