CArray v1.0.0-build
Minimal and Extensible Array Implementation for C
Loading...
Searching...
No Matches
CARR Struct Reference

Represents a pointer-based vector container. More...

#include <carr.h>

Public Attributes

bool __initialized
 Internal initialization-state flag.
size_t cap
 Maximum number of elements that can be stored without resizing.
bool dynamic
 Indicates whether the vector supports dynamic resizing.
size_t size
 Number of elements currently stored in the vector.
void ** vec
 Pointer to the array of stored element pointers.

Detailed Description

Represents a pointer-based vector container.

Stores pointers to elements in a contiguous array. Tracks the number of elements currently stored and the allocated capacity.

Warning
Avoid modifying the internal fields directly

Definition at line 39 of file carr.h.

Member Data Documentation

◆ __initialized

bool CARR::__initialized

Internal initialization-state flag.

Used by the implementation to track whether the vector has been initialized.

Definition at line 75 of file carr.h.

◆ cap

size_t CARR::cap

Maximum number of elements that can be stored without resizing.

Definition at line 52 of file carr.h.

◆ dynamic

bool CARR::dynamic

Indicates whether the vector supports dynamic resizing.

When true, the vector may grow or shrink through resizing operations. When false, capacity is intended to remain fixed.

Definition at line 65 of file carr.h.

◆ size

size_t CARR::size

Number of elements currently stored in the vector.

Definition at line 57 of file carr.h.

◆ vec

void** CARR::vec

Pointer to the array of stored element pointers.

Each element is a void *. The array itself is managed by the CARR implementation.

Definition at line 47 of file carr.h.


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