17#include "impl/impl_types.h"
116typedef enum : uint8_t
518#ifdef TYPES_USING_NAMESPACE_CCC
537# define entry_occupied(entry_ptr) ccc_entry_occupied(entry_ptr)
538# define entry_insert_error(entry_ptr) ccc_entry_insert_error(entry_ptr)
539# define entry_unwrap(entry_ptr) ccc_entry_unwrap(entry_ptr)
540# define get_entry_status(entry_ptr) ccc_get_entry_status(entry_ptr)
541# define entry_status_msg(status) ccc_entry_status_msg(status)
542# define handle_occupied(handle_ptr) ccc_handle_occupied(handle_ptr)
543# define handle_insert_error(handle_ptr) ccc_handle_insert_error(handle_ptr)
544# define handle_unwrap(handle_ptr) ccc_handle_unwrap(handle_ptr)
545# define get_handle_status(handle_ptr) ccc_get_handle_status(handle_ptr)
546# define handle_status_msg(status) ccc_handle_status_msg(status)
547# define begin_range(range_ptr) ccc_begin_range(range_ptr)
548# define end_range(range_ptr) ccc_end_range(range_ptr)
549# define rbegin_rrange(range_ptr) ccc_rbegin_rrange(range_ptr)
550# define rend_rrange(range_ptr) ccc_rend_rrange(range_ptr)
551# define result_msg(res) ccc_result_msg(res)
An element comparison helper.
Definition: types.h:188
void * aux
Definition: types.h:194
void const *const user_type_lhs
Definition: types.h:190
void const *const user_type_rhs
Definition: types.h:192
A key comparison helper to avoid argument swapping.
Definition: types.h:202
void const *const user_type_rhs
Definition: types.h:206
void * aux
Definition: types.h:208
void const *const key_lhs
Definition: types.h:204
A type for returning an unsigned integer from a container for counting. Intended to count sizes,...
Definition: types.h:172
size_t count
Definition: types.h:176
ccc_result error
Definition: types.h:174
A read only reference to a key type matching the key field type used for hash containers.
Definition: types.h:229
void const *const user_key
Definition: types.h:231
void * aux
Definition: types.h:233
A reference to a user type within the container.
Definition: types.h:216
void * user_type
Definition: types.h:218
void * aux
Definition: types.h:220
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...
uint64_t ccc_hash_fn(ccc_user_key to_hash)
A callback function to hash the key type used in a container.
Definition: types.h:339
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.
void ccc_update_fn(ccc_user_type)
A callback function for modifying an element in the container.
Definition: types.h:300
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...
union ccc_handle_ ccc_handle
An Occupied or Vacant handle to a flat searchable container entry.
Definition: types.h:66
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:78
union ccc_range_ ccc_range
The result of a range query on iterable containers.
Definition: types.h:29
ccc_tribool ccc_handle_input_error(ccc_handle const *e)
Determine if an input error has occurred for a function that generates an handle.
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:117
@ CCC_RESULT_ARG_ERROR
Definition: types.h:127
@ CCC_RESULT_MEM_ERROR
Definition: types.h:125
@ CCC_RESULT_SIZE
Definition: types.h:129
@ CCC_RESULT_FAIL
Definition: types.h:121
@ CCC_RESULT_OK
Definition: types.h:119
@ CCC_RESULT_NO_ALLOC
Definition: types.h:123
enum ccc_entry_status_ ccc_handle_status
The status monitoring and handle state once it is obtained.
Definition: types.h:88
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_entry_ ccc_entry
An Occupied or Vacant position in a searchable container.
Definition: types.h:46
ccc_threeway_cmp ccc_cmp_fn(ccc_cmp)
A callback function for comparing two elements in a container.
Definition: types.h:291
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_threeway_cmp ccc_key_cmp_fn(ccc_key_cmp)
A callback function for three-way comparing two stored keys.
Definition: types.h:333
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:102
@ CCC_TRIBOOL_ERROR
Definition: types.h:104
@ CCC_TRUE
Definition: types.h:108
@ CCC_FALSE
Definition: types.h:106
void * ccc_alloc_fn(void *ptr, size_t size, void *aux)
An allocation function at the core of all containers.
Definition: types.h:283
enum ccc_entry_status_ ccc_entry_status
The status monitoring and entry state once it is obtained.
Definition: types.h:56
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.
void ccc_destructor_fn(ccc_user_type)
A callback function for destroying an element in the container.
Definition: types.h:318
ccc_tribool ccc_key_eq_fn(ccc_key_cmp)
A callback function to determining equality between two stored keys.
Definition: types.h:326
char const * ccc_entry_status_msg(ccc_entry_status status)
Obtain a string message with a description of the entry status.
union ccc_rrange_ ccc_rrange
The result of a rrange query on iterable containers.
Definition: types.h:37
char const * ccc_handle_status_msg(ccc_handle_status status)
Obtain a string message with a description of the handle status.
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.
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:138
@ CCC_EQL
Definition: types.h:142
@ CCC_GRT
Definition: types.h:144
@ CCC_LES
Definition: types.h:140
@ CCC_CMP_ERROR
Definition: types.h:146