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

Go to the source code of this file.
The Private Flat Buffer Types and Interface.
The standard contiguous flat buffer is the foundation for many other containers. It is the standard, reliable, dynamic buffer. It points to externally managed memory so that the metadata struct is separate from the memory it manages.
Data Structures | |
| struct | CCC_Flat_buffer |
Macros | |
| #define | CCC_private_flat_buffer_default(private_type_name) |
| #define | CCC_private_flat_buffer_for( private_type_name, private_capacity, private_count, private_data...) |
| #define | CCC_private_flat_buffer_from( private_allocator, private_optional_capacity, private_compound_literal_array...) |
| #define | CCC_private_flat_buffer_with_capacity( private_type_name, private_allocator, private_capacity) |
| #define | CCC_private_flat_buffer_with_storage( private_count, private_compound_literal_array...) |
| #define | CCC_private_flat_buffer_emplace( private_flat_buffer_pointer, index, private_type_compound_literal...) |
| #define | CCC_private_flat_buffer_emplace_back( private_flat_buffer_pointer, private_allocator_pointer, private_type_compound_literal...) |
| #define CCC_private_flat_buffer_default | ( | private_type_name | ) |
| #define CCC_private_flat_buffer_emplace | ( | private_flat_buffer_pointer, | |
| index, | |||
| private_type_compound_literal... | |||
| ) |
| #define CCC_private_flat_buffer_emplace_back | ( | private_flat_buffer_pointer, | |
| private_allocator_pointer, | |||
| private_type_compound_literal... | |||
| ) |
| #define CCC_private_flat_buffer_for | ( | private_type_name, | |
| private_capacity, | |||
| private_count, | |||
| private_data... | |||
| ) |
Initializes the Flat_buffer with a default size of 0. However the user can specify that the Flat_buffer has some count of elements from index [0, capacity - 1) at initialization time. The Flat_buffer assumes these elements are contiguous.
| #define CCC_private_flat_buffer_from | ( | private_allocator, | |
| private_optional_capacity, | |||
| private_compound_literal_array... | |||
| ) |
For dynamic containers to perform the allocation and initialization in one convenient step for user.
| #define CCC_private_flat_buffer_with_capacity | ( | private_type_name, | |
| private_allocator, | |||
| private_capacity | |||
| ) |
For dynamic containers to perform initialization and reservation of memory in one step.
| #define CCC_private_flat_buffer_with_storage | ( | private_count, | |
| private_compound_literal_array... | |||
| ) |
Clang is more forgiving with what qualifies as a constant expression for both constructing compound literals and using static asserts. The static asserts are so helpful that it is worth every effort to give them to the user. GCC is not so forgiving.
Initializes a fixed size buffer with no allocation or context.