12#ifndef ROC_CORE_LIST_NODE_H_
13#define ROC_CORE_LIST_NODE_H_
48template <
class Tag =
void>
class ListNode :
public NonCopyable<ListNode<Tag> > {
51 if (list_data_.list != NULL) {
52 roc_panic(
"list node: attempt to destroy node while it's still in queue");
Base class for List element.
static ListNode * list_node(ListData *data)
Get pointer to parent node from pointer to internal data.
ListData * list_data() const
Get pointer to internal data.
#define ROC_CONTAINER_OF(ptr, type, member)
Cast a member of a structure out to the containing structure.
General-purpose building blocks and platform abstraction layer.
#define roc_panic(...)
Print error message and terminate program gracefully.
Commonly used types and functions.
ListData * next
Next list element.
void * list
The list this node is member of.
ListData * prev
Previous list element.