32#include "impl/impl_types.h"
131typedef enum : uint8_t
547#ifdef TYPES_USING_NAMESPACE_CCC
566# define entry_occupied(entry_ptr) ccc_entry_occupied(entry_ptr)
567# define entry_insert_error(entry_ptr) ccc_entry_insert_error(entry_ptr)
568# define entry_unwrap(entry_ptr) ccc_entry_unwrap(entry_ptr)
569# define get_entry_status(entry_ptr) ccc_get_entry_status(entry_ptr)
570# define entry_status_msg(status) ccc_entry_status_msg(status)
571# define handle_occupied(handle_ptr) ccc_handle_occupied(handle_ptr)
572# define handle_insert_error(handle_ptr) ccc_handle_insert_error(handle_ptr)
573# define handle_unwrap(handle_ptr) ccc_handle_unwrap(handle_ptr)
574# define get_handle_status(handle_ptr) ccc_get_handle_status(handle_ptr)
575# define handle_status_msg(status) ccc_handle_status_msg(status)
576# define begin_range(range_ptr) ccc_begin_range(range_ptr)
577# define end_range(range_ptr) ccc_end_range(range_ptr)
578# define rbegin_rrange(range_ptr) ccc_rbegin_rrange(range_ptr)
579# define rend_rrange(range_ptr) ccc_rend_rrange(range_ptr)
580# define result_msg(res) ccc_result_msg(res)
A key comparison helper to avoid argument swapping.
Definition: types.h:231
void * aux
Definition: types.h:237
void const *const any_key_lhs
Definition: types.h:233
void const *const any_type_rhs
Definition: types.h:235
A read only reference to a key type matching the key field type used for hash containers.
Definition: types.h:258
void const *const any_key
Definition: types.h:260
void * aux
Definition: types.h:262
An element comparison helper.
Definition: types.h:203
void const *const any_type_lhs
Definition: types.h:205
void const *const any_type_rhs
Definition: types.h:207
void * aux
Definition: types.h:209
A reference to a user type within the container.
Definition: types.h:245
void * any_type
Definition: types.h:247
void * aux
Definition: types.h:249
A type for returning an unsigned integer from a container for counting. Intended to count sizes,...
Definition: types.h:187
size_t count
Definition: types.h:191
ccc_result error
Definition: types.h:189
void * ccc_entry_unwrap(ccc_entry const *e)
Unwraps the provided entry providing a reference to the user type obtained from the operation that pr...
char const * ccc_result_msg(ccc_result res)
Obtain a string message with a description of the error returned from a container operation,...
ccc_tribool ccc_entry_occupied(ccc_entry const *e)
Determine if an entry is Occupied in the container.
ccc_tribool ccc_handle_insert_error(ccc_handle const *e)
Determine if an insertion error has occurred when a function that attempts to insert a value in a con...
ccc_threeway_cmp ccc_any_type_cmp_fn(ccc_any_type_cmp)
A callback function for comparing two elements in a container.
Definition: types.h:320
size_t ccc_handle_i
A stable index to user data in a container that uses a flat array as the underlying storage method.
Definition: types.h:93
void * ccc_any_alloc_fn(void *ptr, size_t size, void *aux)
An allocation function at the core of all containers.
Definition: types.h:312
ccc_tribool ccc_handle_input_error(ccc_handle const *e)
Determine if an input error has occurred for a function that generates an handle.
enum ccc_entry_status ccc_handle_status
The status monitoring and handle state once it is obtained.
Definition: types.h:103
void * ccc_begin_range(ccc_range const *r)
Obtain a reference to the beginning user element stored in a container in the provided range.
ccc_result
A result of actions on containers.
Definition: types.h:132
@ CCC_RESULT_ARG_ERROR
Definition: types.h:142
@ CCC_RESULT_MEM_ERROR
Definition: types.h:140
@ CCC_RESULT_SIZE
Definition: types.h:144
@ CCC_RESULT_FAIL
Definition: types.h:136
@ CCC_RESULT_OK
Definition: types.h:134
@ CCC_RESULT_NO_ALLOC
Definition: types.h:138
ccc_handle_status ccc_get_handle_status(ccc_handle const *e)
Obtain the handle status from a generic handle.
ccc_handle_i ccc_handle_unwrap(ccc_handle const *e)
Unwraps the provided handle providing a reference to the user type obtained from the operation that p...
union ccc_handle ccc_handle
An Occupied or Vacant handle to a flat searchable container entry.
Definition: types.h:81
union ccc_range ccc_range
The result of a range query on iterable containers.
Definition: types.h:44
union ccc_rrange ccc_rrange
The result of a rrange query on iterable containers.
Definition: types.h:52
ccc_tribool ccc_entry_input_error(ccc_entry const *e)
Determine if an input error has occurred for a function that generates an entry.
ccc_tribool
A three state boolean to allow for an error state. Error is -1, False is 0, and True is 1.
Definition: types.h:117
@ CCC_TRIBOOL_ERROR
Definition: types.h:119
@ CCC_TRUE
Definition: types.h:123
@ CCC_FALSE
Definition: types.h:121
void * ccc_rend_rrange(ccc_rrange const *r)
Obtain a reference to the reverse end user element stored in a container in the provided range.
void * ccc_end_range(ccc_range const *r)
Obtain a reference to the end user element stored in a container in the provided range.
enum ccc_entry_status ccc_entry_status
The status monitoring and entry state once it is obtained.
Definition: types.h:71
void ccc_any_type_destructor_fn(ccc_any_type)
A callback function for destroying an element in the container.
Definition: types.h:347
union ccc_entry ccc_entry
An Occupied or Vacant position in a searchable container.
Definition: types.h:61
char const * ccc_entry_status_msg(ccc_entry_status status)
Obtain a string message with a description of the entry status.
char const * ccc_handle_status_msg(ccc_handle_status status)
Obtain a string message with a description of the handle status.
ccc_tribool ccc_any_key_eq_fn(ccc_any_key_cmp)
A callback function to determining equality between two stored keys.
Definition: types.h:355
ccc_threeway_cmp ccc_any_key_cmp_fn(ccc_any_key_cmp)
A callback function for three-way comparing two stored keys.
Definition: types.h:362
uint64_t ccc_any_key_hash_fn(ccc_any_key to_hash)
A callback function to hash the key type used in a container.
Definition: types.h:368
ccc_tribool ccc_entry_insert_error(ccc_entry const *e)
Determine if an insertion error has occurred when a function that attempts to insert a value in a con...
ccc_tribool ccc_handle_occupied(ccc_handle const *e)
Determine if an handle is Occupied in the container.
void ccc_any_type_update_fn(ccc_any_type)
A callback function for modifying an element in the container.
Definition: types.h:329
ccc_entry_status ccc_get_entry_status(ccc_entry const *e)
Obtain the entry status from a generic entry.
void * ccc_rbegin_rrange(ccc_rrange const *r)
Obtain a reference to the reverse beginning user element stored in a container in the provided range.
ccc_threeway_cmp
A three-way comparison for comparison functions.
Definition: types.h:153
@ CCC_EQL
Definition: types.h:157
@ CCC_GRT
Definition: types.h:159
@ CCC_LES
Definition: types.h:155
@ CCC_CMP_ERROR
Definition: types.h:161