12 #ifndef ROC_CORE_HASHMAP_NODE_H_
13 #define ROC_CORE_HASHMAP_NODE_H_
64 if (hashmap_data_.
bucket != NULL) {
66 "hashmap node: attempt to destroy node while it's still in hashmap");
77 return &hashmap_data_;
Base class for Hashmap element.
static HashmapNode * hashmap_node(HashmapData *data)
Get pointer to parent node from pointer to internal data.
HashmapData * hashmap_data() const
Get pointer to internal data.
Base class for non-copyable objects.
#define ROC_CONTAINER_OF(ptr, type, member)
Cast a member of a structure out to the containing structure.
size_t hashsum_t
Hash type.
#define roc_panic(...)
Print error message and terminate program gracefully.
Commonly used types and functions.
Hashmap node internal data.
HashmapData * bucket_next
Next node in bucket.
HashmapData * all_prev
Previous node in list of all nodes.
HashmapData * all_next
Next node in in list of all nodes.
void * bucket
The bucket this node belongs to.
hashsum_t hash
Cached node hash.
HashmapData * bucket_prev
Previous node in bucket.