|
C Container Collection (CCC)
|
#include <private_buffer.h>
A Buffer is a contiguous array of a uniform type. The user can specify any type. The Buffer can be fixed size if no allocation permission is given or dynamic if allocation permission is granted. The Buffer can also be manually resized via the interface.
Data Fields | |
| void * | data |
| size_t | count |
| size_t | capacity |
| size_t | sizeof_type |
| CCC_Allocator * | allocate |
| void * | context |
| CCC_Allocator* CCC_Buffer::allocate |
An allocation function for resizing, if allowed.
| size_t CCC_Buffer::capacity |
The total Buffer slots possible for this array.
| void* CCC_Buffer::context |
Auxiliary data, if any.
| size_t CCC_Buffer::count |
The current count of active Buffer slots.
| void* CCC_Buffer::data |
The contiguous memory of uniform type.
| size_t CCC_Buffer::sizeof_type |
The size of the type the user stores in the buffer.