C Container Collection (CCC)
Loading...
Searching...
No Matches
private_traits.h File Reference

The Private Traits _Generic Interface. More...

Include dependency graph for private_traits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

The Private Traits _Generic Interface.

The private trait _Generic manager. This code must also be aware of whether it is allowed to select on the specialized containers or not, depending on compile options.

Macros

#define CCC_private_swap_entry(container_pointer, swap_arguments...)
 
#define CCC_private_swap_handle(container_pointer, swap_arguments...)
 
#define CCC_private_try_insert(container_pointer, try_insert_arguments...)
 
#define CCC_private_insert_or_assign( container_pointer, insert_or_assign_arguments...)
 
#define CCC_private_remove_key_value( container_pointer, key_val_container_array_pointer...)
 
#define CCC_private_remove_entry(container_entry_pointer, ...)
 
#define CCC_private_remove_handle(container_array_pointer)
 
#define CCC_private_entry(container_pointer, key_pointer, ...)
 
#define CCC_private_handle(container_pointer, key_pointer...)
 
#define CCC_private_and_modify( container_entry_pointer, modifier_pointer...)
 
#define CCC_private_insert_entry( container_entry_pointer, key_val_container_array_pointer...)
 
#define CCC_private_insert_handle( container_array_pointer, key_val_container_array_pointer...)
 
#define CCC_private_or_insert( container_entry_pointer, key_val_container_array_pointer...)
 
#define CCC_private_unwrap(container_entry_pointer)
 
#define CCC_private_occupied(container_entry_pointer)
 
#define CCC_private_insert_error(container_entry_pointer)
 
#define CCC_private_get_key_value(container_pointer, key_pointer...)
 
#define CCC_private_contains(container_pointer, key_pointer...)
 
#define CCC_private_push(container_pointer, container_array_pointer...)
 
#define CCC_private_push_back(container_pointer, container_array_pointer...)
 
#define CCC_private_push_front(container_pointer, container_array_pointer...)
 
#define CCC_private_pop(container_pointer, ...)
 
#define CCC_private_pop_front(container_pointer, ...)
 
#define CCC_private_pop_back(container_pointer, ...)
 
#define CCC_private_front(container_pointer)
 
#define CCC_private_back(container_pointer)
 
#define CCC_private_update(container_pointer, update_arguments...)
 
#define CCC_private_increase(container_pointer, increase_arguments...)
 
#define CCC_private_decrease(container_pointer, decrease_arguments...)
 
#define CCC_private_extract(container_pointer, container_array_pointer...)
 
#define CCC_private_erase(container_pointer, container_array_pointer...)
 
#define CCC_private_extract_range( container_pointer, container_array_begin_end_pointer...)
 
#define CCC_private_begin(container_pointer)
 
#define CCC_private_reverse_begin(container_pointer)
 
#define CCC_private_next(container_pointer, void_iterator_pointer)
 
#define CCC_private_reverse_next(container_pointer, void_iterator_pointer)
 
#define CCC_private_end(container_pointer)
 
#define CCC_private_reverse_end(container_pointer)
 
#define CCC_private_equal_range( container_pointer, begin_and_end_key_pointer...)
 
#define CCC_private_equal_range_reverse( container_pointer, reverse_begin_and_reverse_end_key_pointer...)
 
#define CCC_private_range_begin(range_pointer)
 
#define CCC_private_range_end(range_pointer)
 
#define CCC_private_range_reverse_begin(range_reverse_pointer)
 
#define CCC_private_range_reverse_end(range_reverse_pointer)
 
#define CCC_private_splice(container_pointer, splice_arguments...)
 
#define CCC_private_splice_range(container_pointer, splice_range_arguments...)
 
#define CCC_private_copy( destination_container_pointer, source_container_pointer, allocate_pointer)
 
#define CCC_private_reserve(container_pointer, n_to_add, allocate_pointer)
 
#define CCC_private_clear(container_pointer, ...)
 
#define CCC_private_clear_and_free(container_pointer, ...)
 
#define CCC_private_count(container_pointer)
 
#define CCC_private_capacity(container_pointer)
 
#define CCC_private_is_empty(container_pointer)
 
#define CCC_private_validate(container_pointer)
 

Macro Definition Documentation

◆ CCC_private_and_modify

#define CCC_private_and_modify (   container_entry_pointer,
  modifier_pointer... 
)
Value:
(container_entry_pointer), modifier_pointer \
)
CCC_Array_tree_map_handle * CCC_array_tree_map_and_modify(CCC_Array_tree_map_handle *handle, CCC_Modifier const *modifier)
Modifies the provided handle if it is Occupied.
CCC_Flat_hash_map_entry * CCC_flat_hash_map_and_modify(CCC_Flat_hash_map_entry *entry, CCC_Modifier const *modifier)
Modifies the provided entry if it is Occupied.
Definition: private_array_tree_map.h:174
Definition: private_flat_hash_map.h:178
Definition: private_tree_map.h:83
CCC_Tree_map_entry * CCC_tree_map_and_modify(CCC_Tree_map_entry *entry, CCC_Modifier const *modifier)
Modifies the provided entry if it is Occupied.

◆ CCC_private_back

#define CCC_private_back (   container_pointer)
Value:
(container_pointer) \
)
void * CCC_doubly_linked_list_back(CCC_Doubly_linked_list const *list)
Returns the user type at the back of the list. O(1).
void * CCC_flat_buffer_back(CCC_Flat_buffer const *buffer)
return the final element in the Flat_buffer according the current size.
void * CCC_flat_double_ended_queue_back(CCC_Flat_double_ended_queue const *queue)
Return a reference to the back of the flat_double_ended_queue. O(1).
Definition: private_doubly_linked_list.h:73
Definition: private_flat_buffer.h:40
Definition: private_flat_double_ended_queue.h:43

◆ CCC_private_begin

#define CCC_private_begin (   container_pointer)
Value:
(container_pointer) \
)
CCC_Handle_index CCC_array_tree_map_begin(CCC_Array_tree_map const *map)
Return the start of an inorder traversal of the map. O(lg N).
void * CCC_doubly_linked_list_begin(CCC_Doubly_linked_list const *list)
Return the user type at the start of the list or NULL if empty. O(1).
void * CCC_flat_buffer_begin(CCC_Flat_buffer const *buffer)
obtain the base address of the Flat_buffer in preparation for iteration.
void * CCC_flat_double_ended_queue_begin(CCC_Flat_double_ended_queue const *queue)
Return a pointer to the front element of the flat_double_ended_queue. O(1).
void * CCC_flat_hash_map_begin(CCC_Flat_hash_map const *map)
Obtains a pointer to the first element in the table.
void * CCC_singly_linked_list_begin(CCC_Singly_linked_list const *list)
Return the user type at the front of the list. O(1).
Definition: private_array_tree_map.h:148
Definition: private_flat_hash_map.h:152
Definition: private_singly_linked_list.h:72
Definition: private_tree_map.h:63
void * CCC_tree_map_begin(CCC_Tree_map const *map)
Return the start of an inorder traversal of the map. Amortized O(lg N).

◆ CCC_private_capacity

#define CCC_private_capacity (   container_pointer)
Value:
(container_pointer) \
)
CCC_Count CCC_array_tree_map_capacity(CCC_Array_tree_map const *map)
Returns the capacity of the map representing total available slots.
CCC_Count CCC_flat_bitset_capacity(CCC_Flat_bitset const *bitset)
Return total number of bits the capacity of the set can hold.
CCC_Count CCC_flat_buffer_capacity(CCC_Flat_buffer const *buffer)
Return the current capacity of total possible slots.
CCC_Count CCC_flat_double_ended_queue_capacity(CCC_Flat_double_ended_queue const *queue)
Return the capacity representing total possible slots. O(1).
CCC_Count CCC_flat_hash_map_capacity(CCC_Flat_hash_map const *map)
Return the full capacity of the backing storage.
CCC_Count CCC_flat_priority_queue_capacity(CCC_Flat_priority_queue const *priority_queue)
Returns the capacity of the priority_queue representing total possible slots.
Definition: private_flat_bitset.h:41
Definition: private_flat_priority_queue.h:45

◆ CCC_private_clear

#define CCC_private_clear (   container_pointer,
  ... 
)
Value:
(container_pointer)__VA_OPT__(, __VA_ARGS__) \
)
CCC_Result CCC_array_tree_map_clear(CCC_Array_tree_map *map, CCC_Destructor const *destructor)
Frees all slots in the map for use without affecting capacity.
CCC_Result CCC_doubly_linked_list_clear(CCC_Doubly_linked_list *list, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Clear the contents of the list freeing elements, if given allocation permission. O(N).
CCC_Result CCC_flat_bitset_clear(CCC_Flat_bitset *bitset)
Clears the bit set by setting the size to 0 and all bits to 0. The underlying memory capacity remains...
CCC_Result CCC_flat_buffer_clear(CCC_Flat_buffer *buffer, CCC_Destructor const *destructor)
Set size of buffer to 0 and call destroy on each element if needed. O(1) if no destroy is provided,...
CCC_Result CCC_flat_double_ended_queue_clear(CCC_Flat_double_ended_queue *queue, CCC_Destructor const *destructor)
Set size of queue to 0 and call destructor on each element if needed. O(1) if no destructor is provid...
CCC_Result CCC_flat_hash_map_clear(CCC_Flat_hash_map *map, CCC_Destructor const *destructor)
Frees all slots in the table for use without affecting capacity.
CCC_Result CCC_flat_priority_queue_clear(CCC_Flat_priority_queue *priority_queue, CCC_Destructor const *destructor)
Clears the priority_queue calling destroy on every element if provided. O(1)-O(N).
CCC_Result CCC_singly_linked_list_clear(CCC_Singly_linked_list *list, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Clears the list freeing memory if needed. O(N).
CCC_Result CCC_tree_map_clear(CCC_Tree_map *map, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Pops every element from the map calling destructor if destructor is non-NULL. O(N).

◆ CCC_private_clear_and_free

#define CCC_private_clear_and_free (   container_pointer,
  ... 
)
Value:
(container_pointer)__VA_OPT__(, __VA_ARGS__) \
)
CCC_Result CCC_array_tree_map_clear_and_free(CCC_Array_tree_map *map, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Frees all slots in the map and frees the underlying buffer.
CCC_Result CCC_flat_bitset_clear_and_free(CCC_Flat_bitset *bitset, CCC_Allocator const *allocator)
Clears the bit set by setting the size to 0 and freeing the underlying memory. Capacity becomes 0 as ...
CCC_Result CCC_flat_buffer_clear_and_free(CCC_Flat_buffer *buffer, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Set size of buffer to 0 and call destroy on each element if needed. Free the underlying Flat_buffer s...
CCC_Result CCC_flat_double_ended_queue_clear_and_free(CCC_Flat_double_ended_queue *queue, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Set size of queue to 0 and call destructor on each element if needed. Free the underlying Flat_buffer...
CCC_Result CCC_flat_hash_map_clear_and_free(CCC_Flat_hash_map *map, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Frees all slots in the table and frees the underlying buffer.
CCC_Result CCC_flat_priority_queue_clear_and_free(CCC_Flat_priority_queue *priority_queue, CCC_Destructor const *destructor, CCC_Allocator const *allocator)
Clears the priority_queue calling destroy on every element if provided. O(1)-O(N).

◆ CCC_private_contains

#define CCC_private_contains (   container_pointer,
  key_pointer... 
)
Value:
(container_pointer), key_pointer \
)
CCC_Tribool CCC_array_tree_map_contains(CCC_Array_tree_map const *map, void const *key)
Searches the map for the presence of key.
CCC_Tribool CCC_flat_hash_map_contains(CCC_Flat_hash_map const *map, void const *key)
Searches the table for the presence of key.
CCC_Tribool CCC_tree_map_contains(CCC_Tree_map const *map, void const *key)
Searches the map for the presence of key.

◆ CCC_private_copy

#define CCC_private_copy (   destination_container_pointer,
  source_container_pointer,
  allocate_pointer 
)
Value:
(destination_container_pointer), \
(source_container_pointer), \
(allocate_pointer) \
)
CCC_Result CCC_array_tree_map_copy(CCC_Array_tree_map *destination, CCC_Array_tree_map const *source, CCC_Allocator const *allocator)
Copy the map at source to destination.
CCC_Result CCC_flat_bitset_copy(CCC_Flat_bitset *destination, CCC_Flat_bitset const *source, CCC_Allocator const *allocator)
Copy the bit set at source to destination.
CCC_Result CCC_flat_double_ended_queue_copy(CCC_Flat_double_ended_queue *destination, CCC_Flat_double_ended_queue const *source, CCC_Allocator const *allocator)
Copy the queue from source to newly initialized destination.
CCC_Result CCC_flat_hash_map_copy(CCC_Flat_hash_map *destination, CCC_Flat_hash_map const *source, CCC_Allocator const *allocator)
Copy the map at source to destination.
CCC_Result CCC_flat_priority_queue_copy(CCC_Flat_priority_queue *destination, CCC_Flat_priority_queue const *source, CCC_Allocator const *allocator)
Copy the priority_queue from source to newly initialized destination.

◆ CCC_private_count

#define CCC_private_count (   container_pointer)
Value:
(container_pointer) \
)
CCC_Count CCC_array_tree_map_count(CCC_Array_tree_map const *map)
Returns the count of map occupied slots.
CCC_Count CCC_doubly_linked_list_count(CCC_Doubly_linked_list const *list)
Return the count of elements in the list. O(N).
CCC_Count CCC_flat_bitset_count(CCC_Flat_bitset const *bitset)
Return total number of bits actively tracked by the user and set.
CCC_Count CCC_flat_buffer_count(CCC_Flat_buffer const *buffer)
obtain the count of Flat_buffer active slots.
CCC_Count CCC_flat_double_ended_queue_count(CCC_Flat_double_ended_queue const *queue)
Return the count of active queue slots. O(1).
CCC_Count CCC_flat_hash_map_count(CCC_Flat_hash_map const *map)
Returns the count of table occupied slots.
CCC_Count CCC_flat_priority_queue_count(CCC_Flat_priority_queue const *priority_queue)
Returns the count of the priority_queue active slots.
CCC_Count CCC_singly_linked_list_count(CCC_Singly_linked_list const *list)
Return the count of nodes in the list. O(N).
CCC_Count CCC_tree_map_count(CCC_Tree_map const *map)
Returns the count of map occupied nodes.

◆ CCC_private_decrease

#define CCC_private_decrease (   container_pointer,
  decrease_arguments... 
)
Value:
_Generic((container_pointer), CCC_Flat_priority_queue *: CCC_flat_priority_queue_decrease)( \
(container_pointer), decrease_arguments \
)
void * CCC_flat_priority_queue_decrease(CCC_Flat_priority_queue const *priority_queue, void *type, void *temp, CCC_Modifier const *modifier)
Decrease e that is a handle to the stored flat_priority_queue element. O(lgN).

◆ CCC_private_end

#define CCC_private_end (   container_pointer)
Value:
(container_pointer) \
)
CCC_Handle_index CCC_array_tree_map_end(CCC_Array_tree_map const *map)
Return the end of an inorder traversal of the map. O(1).
void * CCC_doubly_linked_list_end(CCC_Doubly_linked_list const *list)
Return the end sentinel with no accessible fields. O(1).
void * CCC_flat_buffer_end(CCC_Flat_buffer const *buffer)
return the end position of the Flat_buffer according to size.
void * CCC_flat_double_ended_queue_end(CCC_Flat_double_ended_queue const *queue)
Return a pointer to the end element. It may not be accessed. O(1).
void * CCC_flat_hash_map_end(CCC_Flat_hash_map const *map)
Check the current iterator against the end for loop termination.
void * CCC_singly_linked_list_end(CCC_Singly_linked_list const *list)
Return the sentinel at the end of the list. Do not access sentinel. O(1).
void * CCC_tree_map_end(CCC_Tree_map const *map)
Return the end of an inorder traversal of the map. O(1).

◆ CCC_private_entry

#define CCC_private_entry (   container_pointer,
  key_pointer,
  ... 
)
Value:
(container_pointer), key_pointer __VA_OPT__(, __VA_ARGS__) \
)
CCC_Flat_hash_map_entry CCC_flat_hash_map_entry(CCC_Flat_hash_map *map, void const *key, CCC_Allocator const *allocator)
Obtains an entry for the provided key in the table for future use.
CCC_Tree_map_entry CCC_tree_map_entry(CCC_Tree_map const *map, void const *key)
Obtains an entry for the provided key in the map for future use.

◆ CCC_private_equal_range

#define CCC_private_equal_range (   container_pointer,
  begin_and_end_key_pointer... 
)
Value:
(container_pointer), begin_and_end_key_pointer \
)
CCC_Handle_range CCC_array_tree_map_equal_range(CCC_Array_tree_map const *map, void const *begin_key, void const *end_key)
Return an iterable range of values from [begin_key, end_key). O(lgN).
CCC_Range CCC_tree_map_equal_range(CCC_Tree_map const *map, void const *begin_key, void const *end_key)
Return an iterable range of values from [begin_key, end_key). Amortized O(lg N).

◆ CCC_private_equal_range_reverse

#define CCC_private_equal_range_reverse (   container_pointer,
  reverse_begin_and_reverse_end_key_pointer... 
)
Value:
(container_pointer), reverse_begin_and_reverse_end_key_pointer \
)
CCC_Handle_range_reverse CCC_array_tree_map_equal_range_reverse(CCC_Array_tree_map const *map, void const *reverse_begin_key, void const *reverse_end_key)
Return an iterable range_reverse of values from [begin_key, end_key). O(lg N).
CCC_Range_reverse CCC_tree_map_equal_range_reverse(CCC_Tree_map const *map, void const *reverse_begin_key, void const *reverse_end_key)
Return an iterable range_reverse of values from [begin_key, end_key). Amortized O(lg N).

◆ CCC_private_erase

#define CCC_private_erase (   container_pointer,
  container_array_pointer... 
)
Value:
_Generic((container_pointer), CCC_Flat_priority_queue *: CCC_flat_priority_queue_erase)( \
(container_pointer), container_array_pointer \
)
CCC_Result CCC_flat_priority_queue_erase(CCC_Flat_priority_queue *priority_queue, void *type, void *temp)
Erase element e that is a handle to the stored flat_priority_queue element.

◆ CCC_private_extract

#define CCC_private_extract (   container_pointer,
  container_array_pointer... 
)
Value:
(container_pointer), container_array_pointer \
)
void * CCC_doubly_linked_list_extract(CCC_Doubly_linked_list *list, CCC_Doubly_linked_list_node *type_intruder)
Returns the element following an extracted element from the list without deallocating regardless of a...
void * CCC_singly_linked_list_extract(CCC_Singly_linked_list *list, CCC_Singly_linked_list_node *type_intruder)
Extracts an element from the list without freeing it. O(N).

◆ CCC_private_extract_range

#define CCC_private_extract_range (   container_pointer,
  container_array_begin_end_pointer... 
)
Value:
(container_pointer), container_array_begin_end_pointer \
)
void * CCC_doubly_linked_list_extract_range(CCC_Doubly_linked_list *list, CCC_Doubly_linked_list_node *type_intruder_begin, CCC_Doubly_linked_list_node *type_intruder_end)
Returns the element following an extracted range of elements from the list without deallocating regar...
void * CCC_singly_linked_list_extract_range(CCC_Singly_linked_list *list, CCC_Singly_linked_list_node *type_intruder_begin, CCC_Singly_linked_list_node *type_intruder_end)
Extracts a range of elements from the list without freeing them. O(N).

◆ CCC_private_front

#define CCC_private_front (   container_pointer)
Value:
(container_pointer) \
)
void * CCC_doubly_linked_list_front(CCC_Doubly_linked_list const *list)
Returns the user type at the front of the list. O(1).
void * CCC_flat_double_ended_queue_front(CCC_Flat_double_ended_queue const *queue)
Return a reference to the front of the flat_double_ended_queue. O(1).
void * CCC_flat_priority_queue_front(CCC_Flat_priority_queue const *priority_queue)
Return a pointer to the front (min or max) element in the flat_priority_queue. O(1).
void * CCC_singly_linked_list_front(CCC_Singly_linked_list const *list)
Return a pointer to the element at the front of the list. O(1).

◆ CCC_private_get_key_value

#define CCC_private_get_key_value (   container_pointer,
  key_pointer... 
)
Value:
(container_pointer), key_pointer \
)
CCC_Handle_index CCC_array_tree_map_get_key_value(CCC_Array_tree_map const *map, void const *key)
Returns a reference into the map at handle key.
void * CCC_flat_hash_map_get_key_value(CCC_Flat_hash_map const *map, void const *key)
Returns a reference into the table at entry key.
void * CCC_tree_map_get_key_value(CCC_Tree_map const *map, void const *key)
Returns a reference into the map at entry key.

◆ CCC_private_handle

#define CCC_private_handle (   container_pointer,
  key_pointer... 
)
Value:
(container_pointer), key_pointer \
)
CCC_Array_tree_map_handle CCC_array_tree_map_handle(CCC_Array_tree_map const *map, void const *key)
Obtains a handle for the provided key in the map for future use.

◆ CCC_private_increase

#define CCC_private_increase (   container_pointer,
  increase_arguments... 
)
Value:
_Generic((container_pointer), CCC_Flat_priority_queue *: CCC_flat_priority_queue_increase)( \
(container_pointer), increase_arguments \
)
void * CCC_flat_priority_queue_increase(CCC_Flat_priority_queue const *priority_queue, void *type, void *temp, CCC_Modifier const *modifier)
Increase type that is a handle to the stored flat_priority_queue element. O(lgN).

◆ CCC_private_insert_entry

#define CCC_private_insert_entry (   container_entry_pointer,
  key_val_container_array_pointer... 
)
Value:
(container_entry_pointer), key_val_container_array_pointer \
)
void * CCC_flat_hash_map_insert_entry(CCC_Flat_hash_map_entry const *entry, void const *type)
Inserts the provided entry invariantly.
void * CCC_tree_map_insert_entry(CCC_Tree_map_entry const *entry, CCC_Tree_map_node *type_intruder, CCC_Allocator const *allocator)
Inserts the provided entry invariantly.

◆ CCC_private_insert_error

#define CCC_private_insert_error (   container_entry_pointer)
Value:
(container_entry_pointer) \
)
CCC_Tribool CCC_array_tree_map_insert_error(CCC_Array_tree_map_handle const *handle)
Provides the status of the handle should an insertion follow.
CCC_Tribool CCC_flat_hash_map_insert_error(CCC_Flat_hash_map_entry const *entry)
Provides the status of the entry should an insertion follow.
An Occupied or Vacant position in a searchable container.
Definition: types.h:135
An Occupied or Vacant handle to a flat searchable container entry.
Definition: types.h:150
CCC_Tribool CCC_tree_map_insert_error(CCC_Tree_map_entry const *entry)
Returns the Vacant or Occupied status of the entry.
CCC_Tribool CCC_entry_insert_error(CCC_Entry const *entry)
Determine if an insertion error has occurred when a function that attempts to insert a value in a con...
CCC_Tribool CCC_handle_insert_error(CCC_Handle const *handle)
Determine if an insertion error has occurred when a function that attempts to insert a value in a con...

◆ CCC_private_insert_handle

#define CCC_private_insert_handle (   container_array_pointer,
  key_val_container_array_pointer... 
)
Value:
(container_array_pointer), key_val_container_array_pointer \
)
CCC_Handle_index CCC_array_tree_map_insert_handle(CCC_Array_tree_map_handle const *handle, void const *type, CCC_Allocator const *allocator)
Inserts the provided user type invariantly.

◆ CCC_private_insert_or_assign

#define CCC_private_insert_or_assign (   container_pointer,
  insert_or_assign_arguments... 
)
Value:
(container_pointer), insert_or_assign_arguments \
)
CCC_Handle CCC_array_tree_map_insert_or_assign(CCC_Array_tree_map *map, void const *type, CCC_Allocator const *allocator)
Invariantly inserts or overwrites a user struct into the map.
CCC_Entry CCC_flat_hash_map_insert_or_assign(CCC_Flat_hash_map *map, void const *type, CCC_Allocator const *allocator)
Invariantly inserts or overwrites a user struct into the table.
CCC_Entry CCC_tree_map_insert_or_assign(CCC_Tree_map *map, CCC_Tree_map_node *type_intruder, CCC_Allocator const *allocator)
Invariantly inserts or overwrites a user struct into the map.

◆ CCC_private_is_empty

#define CCC_private_is_empty (   container_pointer)
Value:
(container_pointer) \
)
CCC_Tribool CCC_array_tree_map_is_empty(CCC_Array_tree_map const *map)
Returns the size status of the map.
CCC_Tribool CCC_doubly_linked_list_is_empty(CCC_Doubly_linked_list const *list)
Return if the size of the list is equal to 0. O(1).
CCC_Tribool CCC_flat_bitset_is_empty(CCC_Flat_bitset const *bitset)
Return true if no bits are actively tracked by the user and set.
CCC_Tribool CCC_flat_buffer_is_empty(CCC_Flat_buffer const *buffer)
return true if the size of the Flat_buffer is 0.
CCC_Tribool CCC_flat_double_ended_queue_is_empty(CCC_Flat_double_ended_queue const *queue)
Return true if the size of the queue is 0. O(1).
CCC_Tribool CCC_flat_hash_map_is_empty(CCC_Flat_hash_map const *map)
Returns the size status of the table.
CCC_Tribool CCC_flat_priority_queue_is_empty(CCC_Flat_priority_queue const *priority_queue)
Returns true if the priority_queue is empty false if not. O(1).
CCC_Tribool CCC_singly_linked_list_is_empty(CCC_Singly_linked_list const *list)
Return true if the list is empty. O(1).
CCC_Tribool CCC_tree_map_is_empty(CCC_Tree_map const *map)
Returns the size status of the map.

◆ CCC_private_next

#define CCC_private_next (   container_pointer,
  void_iterator_pointer 
)
Value:
(container_pointer), (void_iterator_pointer) \
)
CCC_Handle_index CCC_array_tree_map_next(CCC_Array_tree_map const *map, CCC_Handle_index iterator)
Return the next element in an inorder traversal of the map. O(1).
void * CCC_doubly_linked_list_next(CCC_Doubly_linked_list const *list, CCC_Doubly_linked_list_node const *type_intruder)
Return the user type following the element known to be in the list. O(1).
void * CCC_flat_buffer_next(CCC_Flat_buffer const *buffer, void const *iterator)
advance the iterator to the next slot in the Flat_buffer according to size.
void * CCC_flat_double_ended_queue_next(CCC_Flat_double_ended_queue const *queue, void const *iterator_pointer)
Return the next element in the queue moving front to back. O(1).
void * CCC_flat_hash_map_next(CCC_Flat_hash_map const *map, void const *type_iterator)
Advances the iterator to the next occupied table slot.
void * CCC_singly_linked_list_next(CCC_Singly_linked_list const *list, CCC_Singly_linked_list_node const *type_intruder)
Return the user type following type_intruder in the list. O(1).
void * CCC_tree_map_next(CCC_Tree_map const *map, CCC_Tree_map_node const *iterator_intruder)
Return the next element in an inorder traversal of the map. O(1).

◆ CCC_private_occupied

#define CCC_private_occupied (   container_entry_pointer)
Value:
(container_entry_pointer) \
)
CCC_Tribool CCC_array_tree_map_occupied(CCC_Array_tree_map_handle const *handle)
Returns the Vacant or Occupied status of the handle.
CCC_Tribool CCC_flat_hash_map_occupied(CCC_Flat_hash_map_entry const *entry)
Returns the Vacant or Occupied status of the entry.
CCC_Tribool CCC_tree_map_occupied(CCC_Tree_map_entry const *entry)
Provides the status of the entry should an insertion follow.
CCC_Tribool CCC_entry_occupied(CCC_Entry const *entry)
Determine if an entry is Occupied in the container.
CCC_Tribool CCC_handle_occupied(CCC_Handle const *handle)
Determine if an handle is Occupied in the container.

◆ CCC_private_or_insert

#define CCC_private_or_insert (   container_entry_pointer,
  key_val_container_array_pointer... 
)
Value:
(container_entry_pointer), key_val_container_array_pointer \
)
CCC_Handle_index CCC_array_tree_map_or_insert(CCC_Array_tree_map_handle const *handle, void const *type, CCC_Allocator const *allocator)
Inserts the provided user type if the handle is Vacant.
void * CCC_flat_hash_map_or_insert(CCC_Flat_hash_map_entry const *entry, void const *type)
Inserts the struct with handle elem if the entry is Vacant.
void * CCC_tree_map_or_insert(CCC_Tree_map_entry const *entry, CCC_Tree_map_node *type_intruder, CCC_Allocator const *allocator)
Inserts the struct with handle type_intruder if the entry is Vacant.

◆ CCC_private_pop

#define CCC_private_pop (   container_pointer,
  ... 
)
Value:
_Generic((container_pointer), CCC_Flat_priority_queue *: CCC_flat_priority_queue_pop)( \
(container_pointer)__VA_OPT__(, __VA_ARGS__) \
)
CCC_Result CCC_flat_priority_queue_pop(CCC_Flat_priority_queue *priority_queue, void *temp)
Pop the front element (min or max) element in the flat_priority_queue. O(lgN).

◆ CCC_private_pop_back

#define CCC_private_pop_back (   container_pointer,
  ... 
)
Value:
(container_pointer)__VA_OPT__(, __VA_ARGS__) \
)
CCC_Result CCC_doubly_linked_list_pop_back(CCC_Doubly_linked_list *list, CCC_Allocator const *allocator)
Pop the user type at the back of the list. O(1).
CCC_Tribool CCC_flat_bitset_pop_back(CCC_Flat_bitset *bitset)
Remove the Most Significant Bit from the set.
CCC_Result CCC_flat_buffer_pop_back(CCC_Flat_buffer *buffer)
pop the back element from the Flat_buffer according to size.
CCC_Result CCC_flat_double_ended_queue_pop_back(CCC_Flat_double_ended_queue *queue)
Pop an element from the back of the flat_double_ended_queue. O(1).

◆ CCC_private_pop_front

#define CCC_private_pop_front (   container_pointer,
  ... 
)
Value:
(container_pointer)__VA_OPT__(, __VA_ARGS__) \
)
CCC_Result CCC_doubly_linked_list_pop_front(CCC_Doubly_linked_list *list, CCC_Allocator const *allocator)
Pop the user type at the front of the list. O(1).
CCC_Result CCC_flat_double_ended_queue_pop_front(CCC_Flat_double_ended_queue *queue)
Pop an element from the front of the flat_double_ended_queue. O(1).
CCC_Result CCC_singly_linked_list_pop_front(CCC_Singly_linked_list *list, CCC_Allocator const *allocator)
Pop the front element from the list. O(1).

◆ CCC_private_push

#define CCC_private_push (   container_pointer,
  container_array_pointer... 
)
Value:
_Generic((container_pointer), CCC_Flat_priority_queue *: CCC_flat_priority_queue_push)( \
(container_pointer), container_array_pointer \
)
void * CCC_flat_priority_queue_push(CCC_Flat_priority_queue *priority_queue, void const *type, void *temp, CCC_Allocator const *allocator)
Pushes element pointed to at e into flat_priority_queue. O(lgN).

◆ CCC_private_push_back

#define CCC_private_push_back (   container_pointer,
  container_array_pointer... 
)
Value:
(container_pointer), container_array_pointer \
)
void * CCC_doubly_linked_list_push_back(CCC_Doubly_linked_list *list, CCC_Doubly_linked_list_node *type_intruder, CCC_Allocator const *allocator)
Push user type wrapping type_intruder to the back of the list. O(1).
CCC_Result CCC_flat_bitset_push_back(CCC_Flat_bitset *bitset, CCC_Tribool bit, CCC_Allocator const *allocator)
Append a bit value to the set as the new Most Significant Bit.
void * CCC_flat_buffer_push_back(CCC_Flat_buffer *buffer, void const *data, CCC_Allocator const *allocator)
return the newly pushed data into the last slot of the buffer according to size.
void * CCC_flat_double_ended_queue_push_back(CCC_Flat_double_ended_queue *queue, void const *type, CCC_Allocator const *allocator)
Push the user type to the back of the flat_double_ended_queue. O(1) if no allocation permission amort...

◆ CCC_private_push_front

#define CCC_private_push_front (   container_pointer,
  container_array_pointer... 
)
Value:
(container_pointer), container_array_pointer \
)
void * CCC_doubly_linked_list_push_front(CCC_Doubly_linked_list *list, CCC_Doubly_linked_list_node *type_intruder, CCC_Allocator const *allocator)
Push user type wrapping type_intruder to the front of the list. O(1).
void * CCC_flat_double_ended_queue_push_front(CCC_Flat_double_ended_queue *queue, void const *type, CCC_Allocator const *allocator)
Push the user type to the front of the flat_double_ended_queue. O(1) if no allocation permission amor...
void * CCC_singly_linked_list_push_front(CCC_Singly_linked_list *list, CCC_Singly_linked_list_node *type_intruder, CCC_Allocator const *allocator)
Push the type wrapping type_intruder to the front of the list. O(1).

◆ CCC_private_range_begin

#define CCC_private_range_begin (   range_pointer)
Value:
(range_pointer) \
)
The result of a range query on iterable containers. Handles are stable indices into an array until re...
Definition: types.h:82
The result of a range query on iterable containers.
Definition: types.h:42
#define CCC_range_begin(range_pointer)
Obtain the beginning of the range iterator.
Definition: traits.h:434
CCC_Handle_index CCC_handle_range_begin(CCC_Handle_range const *range)
Obtain a handle to the beginning user element stored in a container in the provided range.

These generic macros will take precedence over any name shortening the user may have requested from the types.h file. The standard range name conflicts with these generic selectors. But if the user wants traits we should select the appropriate range from the selections.

◆ CCC_private_range_end

#define CCC_private_range_end (   range_pointer)
Value:
(range_pointer) \
)
#define CCC_range_end(range_pointer)
Obtain the end of the range iterator.
Definition: traits.h:440
CCC_Handle_index CCC_handle_range_end(CCC_Handle_range const *range)
Obtain a handle to the end user element stored in a container in the provided range.

◆ CCC_private_range_reverse_begin

#define CCC_private_range_reverse_begin (   range_reverse_pointer)
Value:
(range_reverse_pointer) \
)
The result of a range_reverse query on iterable containers. Handles are stable indices into an array ...
Definition: types.h:97
The result of a range_reverse query on iterable containers.
Definition: types.h:55
#define CCC_range_reverse_begin(range_reverse_pointer)
Obtain the beginning of the reverse range iterator.
Definition: traits.h:446
CCC_Handle_index CCC_handle_range_reverse_begin(CCC_Handle_range_reverse const *range)
Obtain a handle to the reverse beginning user element stored in a container in the provided range.

◆ CCC_private_range_reverse_end

#define CCC_private_range_reverse_end (   range_reverse_pointer)
Value:
(range_reverse_pointer) \
)
#define CCC_range_reverse_end(range_reverse_pointer)
Obtain the end of the reverse range iterator.
Definition: traits.h:453
CCC_Handle_index CCC_handle_range_reverse_end(CCC_Handle_range_reverse const *range)
Obtain a handle to the reverse end user element stored in a container in the provided range.

◆ CCC_private_remove_entry

#define CCC_private_remove_entry (   container_entry_pointer,
  ... 
)
Value:
(container_entry_pointer)__VA_OPT__(, __VA_ARGS__) \
)
CCC_Entry CCC_flat_hash_map_remove_entry(CCC_Flat_hash_map_entry const *entry)
Remove the entry from the table if Occupied.
CCC_Entry CCC_tree_map_remove_entry(CCC_Tree_map_entry const *entry, CCC_Allocator const *allocator)
Remove the entry from the map if Occupied.

◆ CCC_private_remove_handle

#define CCC_private_remove_handle (   container_array_pointer)
Value:
(container_array_pointer) \
)
CCC_Handle CCC_array_tree_map_remove_handle(CCC_Array_tree_map_handle const *handle)
Remove the handle from the map if Occupied.

◆ CCC_private_remove_key_value

#define CCC_private_remove_key_value (   container_pointer,
  key_val_container_array_pointer... 
)
Value:
(container_pointer), key_val_container_array_pointer \
)
CCC_Handle CCC_array_tree_map_remove_key_value(CCC_Array_tree_map *map, void *type_output)
Removes the key value in the map storing the old value, if present, in the type_output provided by th...
CCC_Entry CCC_flat_hash_map_remove_key_value(CCC_Flat_hash_map *map, void *type_output)
Removes the key value in the map storing the old value, if present, in the struct containing out_hand...
CCC_Entry CCC_tree_map_remove_key_value(CCC_Tree_map *map, CCC_Tree_map_node *output_intruder, CCC_Allocator const *allocator)
Removes the key value in the map storing the old value, if present, in the struct containing output_i...

◆ CCC_private_reserve

#define CCC_private_reserve (   container_pointer,
  n_to_add,
  allocate_pointer 
)
Value:
(container_pointer), (n_to_add), (allocate_pointer) \
)
CCC_Result CCC_array_tree_map_reserve(CCC_Array_tree_map *map, size_t to_add, CCC_Allocator const *allocator)
Reserves space for at least to_add more elements.
CCC_Result CCC_flat_bitset_reserve(CCC_Flat_bitset *bitset, size_t to_add, CCC_Allocator const *allocator)
Reserves space for at least to_add more bits.
CCC_Result CCC_flat_buffer_reserve(CCC_Flat_buffer *buffer, size_t to_add, CCC_Allocator const *allocator)
Reserves space for at least to_add more elements.
CCC_Result CCC_flat_double_ended_queue_reserve(CCC_Flat_double_ended_queue *queue, size_t to_add, CCC_Allocator const *allocator)
Reserves space for at least to_add more elements.
CCC_Result CCC_flat_hash_map_reserve(CCC_Flat_hash_map *map, size_t to_add, CCC_Allocator const *allocator)
Reserve space required to add a specified number of elements to the map. If the current capacity is s...
CCC_Result CCC_flat_priority_queue_reserve(CCC_Flat_priority_queue *priority_queue, size_t to_add, CCC_Allocator const *allocator)
Reserves space for at least to_add more elements.

◆ CCC_private_reverse_begin

#define CCC_private_reverse_begin (   container_pointer)
Value:
(container_pointer) \
)
CCC_Handle_index CCC_array_tree_map_reverse_begin(CCC_Array_tree_map const *map)
Return the start of a reverse inorder traversal of the map. O(lg N).
void * CCC_doubly_linked_list_reverse_begin(CCC_Doubly_linked_list const *list)
Return the user type at the end of the list or NULL if empty. O(1).
void * CCC_flat_buffer_reverse_begin(CCC_Flat_buffer const *buffer)
obtain the address of the last element in the Flat_buffer in preparation for iteration according to s...
void * CCC_flat_double_ended_queue_reverse_begin(CCC_Flat_double_ended_queue const *queue)
Return a pointer to the back element of the flat_double_ended_queue. O(1).
void * CCC_tree_map_reverse_begin(CCC_Tree_map const *map)
Return the start of a reverse inorder traversal of the map. Amortized O(lg N).

◆ CCC_private_reverse_end

#define CCC_private_reverse_end (   container_pointer)
Value:
(container_pointer) \
)
CCC_Handle_index CCC_array_tree_map_reverse_end(CCC_Array_tree_map const *map)
Return the reverse_end of a reverse inorder traversal of the map. O(1).
void * CCC_doubly_linked_list_reverse_end(CCC_Doubly_linked_list const *list)
Return the start sentinel with no accessible fields. O(1).
void * CCC_flat_buffer_reverse_end(CCC_Flat_buffer const *buffer)
return the reverse_end position of the buffer.
void * CCC_flat_double_ended_queue_reverse_end(CCC_Flat_double_ended_queue const *queue)
Return a pointer to the start element. It may not be accessed. O(1).
void * CCC_tree_map_reverse_end(CCC_Tree_map const *map)
Return the reverse_end of a reverse inorder traversal of the map. O(1).

◆ CCC_private_reverse_next

#define CCC_private_reverse_next (   container_pointer,
  void_iterator_pointer 
)
Value:
(container_pointer), (void_iterator_pointer) \
)
CCC_Handle_index CCC_array_tree_map_reverse_next(CCC_Array_tree_map const *map, CCC_Handle_index iterator)
Return the reverse_next element in a reverse inorder traversal of the map. O(1).
void * CCC_doubly_linked_list_reverse_next(CCC_Doubly_linked_list const *list, CCC_Doubly_linked_list_node const *type_intruder)
Return the user type following the element known to be in the list moving from back to front....
void * CCC_flat_buffer_reverse_next(CCC_Flat_buffer const *buffer, void const *iterator)
advance the iterator to the next slot in the Flat_buffer according to size and in reverse order.
void * CCC_flat_double_ended_queue_reverse_next(CCC_Flat_double_ended_queue const *queue, void const *iterator_pointer)
Return the next element in the queue moving back to front. O(1).
void * CCC_tree_map_reverse_next(CCC_Tree_map const *map, CCC_Tree_map_node const *iterator_intruder)
Return the reverse_next element in a reverse inorder traversal of the map. O(1).

◆ CCC_private_splice

#define CCC_private_splice (   container_pointer,
  splice_arguments... 
)
Value:
(container_pointer), splice_arguments \
)
CCC_Result CCC_doubly_linked_list_splice(CCC_Doubly_linked_list *position_doubly_linked_list, CCC_Doubly_linked_list_node *type_intruder_position, CCC_Doubly_linked_list *to_cut_doubly_linked_list, CCC_Doubly_linked_list_node *type_intruder_to_cut)
Repositions to_cut before pos. Only list pointers are modified. O(1).
CCC_Result CCC_singly_linked_list_splice(CCC_Singly_linked_list *position_list, CCC_Singly_linked_list_node *type_intruder_position, CCC_Singly_linked_list *splice_list, CCC_Singly_linked_list_node *type_intruder_splice)
Inserts splice element after the provided position. O(N).

◆ CCC_private_splice_range

#define CCC_private_splice_range (   container_pointer,
  splice_range_arguments... 
)
Value:
(container_pointer), splice_range_arguments \
)
CCC_Result CCC_doubly_linked_list_splice_range(CCC_Doubly_linked_list *position_doubly_linked_list, CCC_Doubly_linked_list_node *type_intruder_position, CCC_Doubly_linked_list *to_cut_doubly_linked_list, CCC_Doubly_linked_list_node *type_intruder_to_cut_begin, CCC_Doubly_linked_list_node *type_intruder_to_cut_exclusive_end)
Splices the list to cut before the specified position. The range being cut is exclusive from [start,...
CCC_Result CCC_singly_linked_list_splice_range(CCC_Singly_linked_list *position_list, CCC_Singly_linked_list_node *type_intruder_position, CCC_Singly_linked_list *to_cut_list, CCC_Singly_linked_list_node *type_intruder_to_cut_begin, CCC_Singly_linked_list_node *type_intruder_to_cut_exclusive_end)
Inserts the [begin, end) of spliced elements after the provided position. O(N).

◆ CCC_private_swap_entry

#define CCC_private_swap_entry (   container_pointer,
  swap_arguments... 
)
Value:
(container_pointer), swap_arguments \
)
CCC_Entry CCC_flat_hash_map_swap_entry(CCC_Flat_hash_map *map, void *type_output, CCC_Allocator const *allocator)
Invariantly inserts the key value wrapping out_handle.
CCC_Entry CCC_tree_map_swap_entry(CCC_Tree_map *map, CCC_Tree_map_node *type_intruder, CCC_Tree_map_node *temp_intruder, CCC_Allocator const *allocator)
Invariantly inserts the key value wrapping type_intruder.

◆ CCC_private_swap_handle

#define CCC_private_swap_handle (   container_pointer,
  swap_arguments... 
)
Value:
_Generic((container_pointer), CCC_Array_tree_map *: CCC_array_tree_map_swap_handle)( \
(container_pointer), swap_arguments \
)
CCC_Handle CCC_array_tree_map_swap_handle(CCC_Array_tree_map *map, void *type_output, CCC_Allocator const *allocator)
Invariantly inserts the key value in type_output.

◆ CCC_private_try_insert

#define CCC_private_try_insert (   container_pointer,
  try_insert_arguments... 
)
Value:
(container_pointer), try_insert_arguments \
)
CCC_Handle CCC_array_tree_map_try_insert(CCC_Array_tree_map *map, void const *type, CCC_Allocator const *allocator)
Attempts to insert the key value in type.
CCC_Entry CCC_flat_hash_map_try_insert(CCC_Flat_hash_map *map, void const *type, CCC_Allocator const *allocator)
Attempts to insert the key value wrapping key_val_handle.
CCC_Entry CCC_tree_map_try_insert(CCC_Tree_map *map, CCC_Tree_map_node *type_intruder, CCC_Allocator const *allocator)
Attempts to insert the key value wrapping type_intruder.

◆ CCC_private_unwrap

#define CCC_private_unwrap (   container_entry_pointer)
Value:
(container_entry_pointer) \
)
CCC_Handle_index CCC_array_tree_map_unwrap(CCC_Array_tree_map_handle const *handle)
Unwraps the provided handle to obtain a view into the map element.
void * CCC_flat_hash_map_unwrap(CCC_Flat_hash_map_entry const *entry)
Unwraps the provided entry to obtain a view into the table element.
void * CCC_tree_map_unwrap(CCC_Tree_map_entry const *entry)
Unwraps the provided entry to obtain a view into the map element.
void * CCC_entry_unwrap(CCC_Entry const *entry)
Unwraps the provided entry providing a reference to the user type obtained from the operation that pr...
CCC_Handle_index CCC_handle_unwrap(CCC_Handle const *handle)
Unwraps the provided handle providing a reference to the user type obtained from the operation that p...

◆ CCC_private_update

#define CCC_private_update (   container_pointer,
  update_arguments... 
)
Value:
_Generic((container_pointer), CCC_Flat_priority_queue *: CCC_flat_priority_queue_update)( \
(container_pointer), update_arguments \
)
void * CCC_flat_priority_queue_update(CCC_Flat_priority_queue const *priority_queue, void *type, void *temp, CCC_Modifier const *modifier)
Update e that is a handle to the stored priority_queue element. O(lgN).

◆ CCC_private_validate

#define CCC_private_validate (   container_pointer)
Value:
(container_pointer) \
)
CCC_Tribool CCC_array_tree_map_validate(CCC_Array_tree_map const *map)
Validation of invariants for the map.
CCC_Tribool CCC_doubly_linked_list_validate(CCC_Doubly_linked_list const *list)
Validates internal state of the list.
CCC_Tribool CCC_flat_double_ended_queue_validate(CCC_Flat_double_ended_queue const *queue)
Return true if the internal invariants of the flat_double_ended_queue.
CCC_Tribool CCC_flat_hash_map_validate(CCC_Flat_hash_map const *map)
Validation of invariants for the hash table.
CCC_Tribool CCC_flat_priority_queue_validate(CCC_Flat_priority_queue const *priority_queue)
Verifies the internal invariants of the priority_queue hold.
CCC_Tribool CCC_singly_linked_list_validate(CCC_Singly_linked_list const *list)
Returns true if the invariants of the list hold.
CCC_Tribool CCC_tree_map_validate(CCC_Tree_map const *map)
Validation of invariants for the map.