12 #ifndef ROC_CORE_HASHMAP_NODE_H_
13 #define ROC_CORE_HASHMAP_NODE_H_
67 if (hashmap_data_.
bucket != NULL) {
69 " can't call destructor for an element that is still in hashmap");
75 return &hashmap_data_;
79 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.
HashmapNodeData * all_next
Next node in in list of all nodes.
void * bucket
The bucket this node belongs to.
HashmapNode * container_of()
Get HashmapNode object that contains this HashmapData object.
hashsum_t hash
Cached node hash.
HashmapNodeData * bucket_prev
Previous node in bucket.
HashmapNodeData * all_prev
Previous node in list of all nodes.
HashmapNodeData * bucket_next
Next node in bucket.