|
libclod
C library for interacting with NBTs, region files, LOD data and other things.
|
#include <tree.h>
Public Attributes | |
| struct clod_tree_node * | root |
| Pointer to the root node. | |
| unsigned char | key_size |
| Size of keys in the tree. | |
| unsigned char | val_size |
| Size of values in the tree. | |
| bool | disable_checksum |
| Disables the checksum used to validate each node. | |
| unsigned short | node_size |
| Size of each node in the tree. | |
| void * | compare_user |
User variable passed to invocations of compare. | |
| int(* | compare )(const void *key1, const void *key2, void *user) |
| Comparison function. | |
| clod_allocator | allocator |
Configuration options and handle to a tree structure. Must not be modified after creation.
Keys and values are aligned to the maximum of 32 or the largest factor of their sizes, whichever is smaller. E.g. a size of 8 results in an alignment of 8, while 1, 3, or 31 result in no alignment. In addition, values inherit the key's alignment.
The caller always retains ownership of memory passed as keys and values, as the tree implementation always copies to its own memory.
| struct clod_tree_node* clod_tree::root |
| bool clod_tree::disable_checksum |
| unsigned short clod_tree::node_size |
| void* clod_tree::compare_user |
| int(* clod_tree::compare) (const void *key1, const void *key2, void *user) |
| clod_allocator clod_tree::allocator |