C Container Collection (CCC)
Loading...
Searching...
No Matches
impl_types.h
1
16#ifndef CCC_IMPL_TYPES_H
17#define CCC_IMPL_TYPES_H
18
20#include <stddef.h>
21#include <stdint.h>
25enum ccc_entry_status : uint8_t
26{
27 CCC_ENTRY_VACANT = 0,
28 CCC_ENTRY_OCCUPIED = 0x1,
29 CCC_ENTRY_INSERT_ERROR = 0x2,
30 CCC_ENTRY_ARG_ERROR = 0x4,
31 CCC_ENTRY_NO_UNWRAP = 0x8,
32};
33
35struct ccc_ent
36{
37 void *e;
38 enum ccc_entry_status stats;
39};
40
42union ccc_entry
43{
44 struct ccc_ent impl;
45};
46
48struct ccc_handl
49{
50 size_t i;
51 enum ccc_entry_status stats;
52};
53
55union ccc_handle
56{
57 struct ccc_handl impl;
58};
59
61struct ccc_range_u
62{
63 union
64 {
65 void *begin;
66 void *rbegin;
67 };
68 union
69 {
70 void *end;
71 void *rend;
72 };
73};
74
76union ccc_range
77{
78 struct ccc_range_u impl;
79};
80
82union ccc_rrange
83{
84 struct ccc_range_u impl;
85};
86
87#endif /* CCC_IMPL_TYPES_H */
#define ccc_entry(container_ptr, key_ptr...)
Obtain a container specific entry for the Entry Interface.
Definition: traits.h:141
#define ccc_handle(container_ptr, key_ptr...)
Obtain a container specific handle for the handle Interface.
Definition: traits.h:150
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