Lines Matching refs:hash
23 * \brief Memory pool hash-array class.
37 * \brief Declare a template pool hash-array (array with hash) class interface.
38 * \param TYPENAME Type name of the declared hash-array.
46 * The functions for operating the hash are:
54 * Value* HashArray_find (Hash* hashArray, Key key);
55 * deBool HashArray_insert (Hash* hashArray, Key key, Value value);
56 * deBool HashArray_copyToArray (Hash* hashArray, KeyArray* keys, ValueArray* values);
62 DE_DECLARE_POOL_HASH(TYPENAME##Hash, KEYTYPE, int); \
66 TYPENAME##Hash* hash; \
85 int* ndxPtr = TYPENAME##Hash_find(hashArray->hash, key); \
102 TYPENAME##Hash_reset(hashArray->hash); \
109 * \brief Implement a template pool hash-array class.
110 * \param TYPENAME Type name of the declared hash.
118 * This macro has implements the hash declared with DE_DECLARE_POOL_HASH.
125 DE_IMPLEMENT_POOL_HASH(TYPENAME##Hash, KEYTYPE, int, KEYHASHFUNC, KEYCMPFUNC); \
131 if ((hashArray->hash = TYPENAME##Hash_create(pool)) == DE_NULL) \
141 DE_ASSERT(TYPENAME##Hash_getNumElements(hashArray->hash) == numElements); \
142 DE_ASSERT(!TYPENAME##Hash_find(hashArray->hash, key)); \
144 !TYPENAME##Hash_insert(hashArray->hash, key, numElements)) \
153 TYPENAME##Hash* hash = hashArray->hash; \
155 DE_ASSERT(TYPENAME##Hash_getNumElements(hashArray->hash) == numElements); \
159 for (TYPENAME##HashIter_init(hash, &iter); TYPENAME##HashIter_hasItem(&iter); TYPENAME##HashIter_next(&iter)) \