12#ifndef ROC_CORE_HASHMAP_NODE_H_
13#define ROC_CORE_HASHMAP_NODE_H_
59 if (hashmap_data_.
bucket != NULL) {
61 " can't call destructor for an element that is still in hashmap");
67 return &hashmap_data_;
71 mutable HashmapNodeData hashmap_data_;
Base class for hashmap element.
HashmapNodeData * hashmap_node_data() const
Get hashmap node 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.
HashmapNode * container_of()
Get HashmapNode object that contains this HashmapData object.
void * bucket
The bucket this node belongs to.
hashsum_t hash
Cached node hash.
HashmapNodeData * next
Next node in bucket.
HashmapNodeData * prev
Previous node in bucket.