|
C Container Collection (CCC)
|
The Private Array Tree Map Types and Interface. More...
#include "../types.h"

Go to the source code of this file.
The Private Array Tree Map Types and Interface.
The private struct-of-array based WAVL tree. The goal of this implementation is to optimize space while providing stable indices for the lifetime of user allocations of elements in the buffer. The intrusive variant offers pointer stability and is significantly less space efficient.
Data Structures | |
| struct | CCC_Array_tree_map_node |
| struct | CCC_Array_tree_map |
| struct | CCC_Array_tree_map_handle |
Macros | |
| #define | CCC_private_array_tree_map_blocks(private_cap) |
| #define | CCC_private_array_tree_map_compound_literal_array_capacity( private_type_compound_literal_array) |
| #define | CCC_private_array_tree_map_storage_for( private_type_compound_literal_array, optional_storage_specifier...) |
| #define | CCC_private_array_tree_map_default( private_type_name, private_key_field, private_comparator...) |
| #define | CCC_private_array_tree_map_for( private_type_name, private_key_field, private_comparator, private_capacity, private_memory_pointer) |
| #define | CCC_private_array_tree_map_from( private_key_field, private_comparator, private_allocator, private_optional_cap, private_array_compound_literal...) |
| #define | CCC_private_array_tree_map_with_capacity( private_type_name, private_key_field, private_comparator, private_allocator, private_cap) |
| #define | CCC_private_array_tree_map_with_storage( private_key_node_field, private_comparator, private_compound_literal, private_optional_storage_specifier...) |
| #define | CCC_private_array_tree_map_as( array_tree_map_pointer, type_name, handle...) |
| #define | CCC_private_array_tree_map_with_allocator_storage( private_key_field, private_comparator, private_allocator, private_compound_literal) |
| #define | CCC_private_array_tree_map_and_modify_with( array_tree_map_handle_pointer, closure_parameter, closure_over_closure_parameter...) |
| #define | CCC_private_array_tree_map_or_insert_with( array_tree_map_handle_pointer, private_allocator_pointer, type_compound_literal...) |
| #define | CCC_private_array_tree_map_insert_handle_with( array_tree_map_handle_pointer, private_allocator_pointer, type_compound_literal...) |
| #define | CCC_private_array_tree_map_try_insert_with( array_tree_map_pointer, key, private_allocator_pointer, type_compound_literal...) |
| #define | CCC_private_array_tree_map_insert_or_assign_with( array_tree_map_pointer, key, private_allocator_pointer, type_compound_literal...) |
Functions | |
| void * | CCC_private_array_tree_map_data_at (struct CCC_Array_tree_map const *, size_t) |
| void * | CCC_private_array_tree_map_key_at (struct CCC_Array_tree_map const *, size_t) |
| struct CCC_Array_tree_map_handle | CCC_private_array_tree_map_handle (struct CCC_Array_tree_map const *, void const *) |
| void | CCC_private_array_tree_map_insert (struct CCC_Array_tree_map *, size_t, CCC_Order, size_t) |
| size_t | CCC_private_array_tree_map_allocate_slot (struct CCC_Array_tree_map *, CCC_Allocator const *) |
| #define CCC_private_array_tree_map_and_modify_with | ( | array_tree_map_handle_pointer, | |
| closure_parameter, | |||
| closure_over_closure_parameter... | |||
| ) |
| #define CCC_private_array_tree_map_as | ( | array_tree_map_pointer, | |
| type_name, | |||
| handle... | |||
| ) |
| #define CCC_private_array_tree_map_blocks | ( | private_cap | ) |
Calculates the number of parity blocks needed to support the given capacity. Provide the type used for the parity block array and the number of blocks needed to round up to will be returned.
| #define CCC_private_array_tree_map_compound_literal_array_capacity | ( | private_type_compound_literal_array | ) |
| #define CCC_private_array_tree_map_default | ( | private_type_name, | |
| private_key_field, | |||
| private_comparator... | |||
| ) |
All other fields default to NULL or 0.
| #define CCC_private_array_tree_map_for | ( | private_type_name, | |
| private_key_field, | |||
| private_comparator, | |||
| private_capacity, | |||
| private_memory_pointer | |||
| ) |
Initialization only tracks pointers to support a variety of memory sources for both fixed and dynamic maps. The nodes and parity pointers will be lazily initialized upon the first runtime opportunity. This allows the initial memory provided to the data pointer to come from any source at compile or runtime.
| #define CCC_private_array_tree_map_from | ( | private_key_field, | |
| private_comparator, | |||
| private_allocator, | |||
| private_optional_cap, | |||
| private_array_compound_literal... | |||
| ) |
Initialize an array tree map from user input list.
| #define CCC_private_array_tree_map_insert_handle_with | ( | array_tree_map_handle_pointer, | |
| private_allocator_pointer, | |||
| type_compound_literal... | |||
| ) |
| #define CCC_private_array_tree_map_insert_or_assign_with | ( | array_tree_map_pointer, | |
| key, | |||
| private_allocator_pointer, | |||
| type_compound_literal... | |||
| ) |
| #define CCC_private_array_tree_map_or_insert_with | ( | array_tree_map_handle_pointer, | |
| private_allocator_pointer, | |||
| type_compound_literal... | |||
| ) |
| #define CCC_private_array_tree_map_storage_for | ( | private_type_compound_literal_array, | |
| optional_storage_specifier... | |||
| ) |
The user can declare a fixed size realtime ordered map with the help of static asserts to ensure the layout is compatible with our internal metadata.
| #define CCC_private_array_tree_map_try_insert_with | ( | array_tree_map_pointer, | |
| key, | |||
| private_allocator_pointer, | |||
| type_compound_literal... | |||
| ) |
| #define CCC_private_array_tree_map_with_allocator_storage | ( | private_key_field, | |
| private_comparator, | |||
| private_allocator, | |||
| private_compound_literal | |||
| ) |
Helper for allocating a fixed size map dynamically.
| #define CCC_private_array_tree_map_with_capacity | ( | private_type_name, | |
| private_key_field, | |||
| private_comparator, | |||
| private_allocator, | |||
| private_cap | |||
| ) |
| #define CCC_private_array_tree_map_with_storage | ( | private_key_node_field, | |
| private_comparator, | |||
| private_compound_literal, | |||
| private_optional_storage_specifier... | |||
| ) |
| size_t CCC_private_array_tree_map_allocate_slot | ( | struct CCC_Array_tree_map * | , |
| CCC_Allocator const * | |||
| ) |
| void * CCC_private_array_tree_map_data_at | ( | struct CCC_Array_tree_map const * | , |
| size_t | |||
| ) |
| struct CCC_Array_tree_map_handle CCC_private_array_tree_map_handle | ( | struct CCC_Array_tree_map const * | , |
| void const * | |||
| ) |
| void CCC_private_array_tree_map_insert | ( | struct CCC_Array_tree_map * | , |
| size_t | , | ||
| CCC_Order | , | ||
| size_t | |||
| ) |
| void * CCC_private_array_tree_map_key_at | ( | struct CCC_Array_tree_map const * | , |
| size_t | |||
| ) |