ecsnet
Loading...
Searching...
No Matches
component_storage_t Struct Reference

Storage container for a single component type. Each registered component type gets its own storage structure. It contains: More...

#include <ecs_internal.h>

Collaboration diagram for component_storage_t:

Public Attributes

component_descriptor_t descriptor
void * data
bool * used
bool * is_dirty
size_t capacity

Detailed Description

Storage container for a single component type. Each registered component type gets its own storage structure. It contains:

  • The descriptor describing the component type (size, name, serialization functions).
  • A contiguous block of memory for all entities' data of this component type.
  • Arrays to track which entities have this component (used) and which ones have been modified (is_dirty).

Member Data Documentation

◆ capacity

size_t component_storage_t::capacity

Current capacity for entity slots (matches ecs->entity_capacity).

◆ data

void* component_storage_t::data

Contiguous memory storing component data for all entities.

◆ descriptor

component_descriptor_t component_storage_t::descriptor

Metadata describing the component type.

◆ is_dirty

bool* component_storage_t::is_dirty

Dynamic array indicating which components have been modified.

◆ used

bool* component_storage_t::used

Dynamic array indicating which entities have this component.


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