CVEC v1.0.0-build
Functional C++ vector-like manipulation for C
Loading...
Searching...
No Matches
CVEC Struct Reference

Custom generic dynamic vector type. More...

#include <cvec.h>

Public Attributes

bool __usedSplit
 Internal flag used by split operations.
size_t cap
 Allocated storage capacity.
void * data
 Pointer to contiguous allocated memory storing array elements.
bool dynamicCap
 Enables automatic capacity growth when true.
size_t elemLen
 Size in bytes of each element.
bool forceCap
 Prevents capacity expansion if true; insertion fails when full.
bool initialized
 Tracks whether this CVEC has been properly initialized.
size_t size
 Current number of stored items.

Detailed Description

Custom generic dynamic vector type.

CVEC is a flexible container that stores a sequence of elements of uniform size. It behaves similarly to std::vector in C++, supporting dynamic resizing, insertion, deletion, merging, reversing, and splitting.

Note
Direct modification of structure fields should be avoided — prefer CVEC API usage.

Definition at line 54 of file cvec.h.

Member Data Documentation

◆ __usedSplit

bool CVEC::__usedSplit

Internal flag used by split operations.

Definition at line 57 of file cvec.h.

◆ cap

size_t CVEC::cap

Allocated storage capacity.

Definition at line 62 of file cvec.h.

◆ data

void* CVEC::data

Pointer to contiguous allocated memory storing array elements.

Definition at line 58 of file cvec.h.

◆ dynamicCap

bool CVEC::dynamicCap

Enables automatic capacity growth when true.

Definition at line 60 of file cvec.h.

◆ elemLen

size_t CVEC::elemLen

Size in bytes of each element.

Definition at line 63 of file cvec.h.

◆ forceCap

bool CVEC::forceCap

Prevents capacity expansion if true; insertion fails when full.

Definition at line 59 of file cvec.h.

◆ initialized

bool CVEC::initialized

Tracks whether this CVEC has been properly initialized.

Definition at line 56 of file cvec.h.

◆ size

size_t CVEC::size

Current number of stored items.

Definition at line 61 of file cvec.h.


The documentation for this struct was generated from the following file: