Data Fields
tommy_node_struct Struct Reference

Data structure node. More...

#include <tommytypes.h>

Data Fields

struct tommy_node_structnext
 Next node. More...
 
struct tommy_node_structprev
 Previous node. More...
 
void * data
 Pointer to the object containing the node. More...
 
tommy_size_t index
 Index of the node. More...
 

Detailed Description

Data structure node.

This node type is shared between all the data structures and used to store some info directly into the objects you want to store.

A typical declaration is:

struct object {
tommy_node node;
// other fields
};
Data structure node.
Definition: tommytypes.h:211

Field Documentation

◆ next

struct tommy_node_struct* tommy_node_struct::next

Next node.

The tail node has it at 0, like a 0 terminated list.

◆ prev

struct tommy_node_struct* tommy_node_struct::prev

Previous node.

The head node points to the tail node, like a circular list.

◆ data

void* tommy_node_struct::data

Pointer to the object containing the node.

This field is initialized when inserting nodes into a data structure.

◆ index

tommy_size_t tommy_node_struct::index

Index of the node.

With tries this field is used to store the key. With hashtables this field is used to store the hash value. With lists this field is not used.


The documentation for this struct was generated from the following file: