class

IComponentColumn

Type-erased column: one per ComponentID an Archetype tracks. Components are stored contiguously and matched 1:1 with the archetype's entity list by row index, so World can hold heterogeneous columns in one map without losing SoA.

Module
ECS
Header
#include "ECS/Archetype.h"
Namespace
Mowo

Constructors

SignatureNameDescription
virtual ~IComponentColumn() = default~IComponentColumn

Public functions

ReturnsNameDescription
size_tSize
size_tEmplaceDefaultAppends a default-constructed slot for migration to fill; returns its row.
voidPopBack
voidMoveAssignFromOtherBoth columns must hold the same component type — the caller checks ComponentID equality.
voidMoveAssignInternalSwap-remove: move the last row into the removed row's slot, then PopBack.
void*RawCallers that know the type cast to T*; World hides the cast behind GetComponent<T>().
const void*Raw
void*DataStart of the contiguous buffer, for iteration without a per-row indirection.
const void*Data
size_tElementSize
ComponentIDComponentId
std::unique_ptr<IComponentColumn>MakeEmptyOfSameTypeA migration target needs columns for every component in the source's signature but can't know the C++ types; only the source column does.
std::unique_ptr<IComponentColumn>CloneDeep

Function details

~IComponentColumn

C++
virtual ~IComponentColumn() = default

Size

C++
virtual size_t Size() const = 0

EmplaceDefault

C++
virtual size_t EmplaceDefault() = 0

Appends a default-constructed slot for migration to fill; returns its row.

PopBack

C++
virtual void PopBack() = 0

MoveAssignFromOther

C++
virtual void MoveAssignFromOther(size_t dstRow, IComponentColumn& src, size_t srcRow) = 0

Both columns must hold the same component type — the caller checks ComponentID equality. Used for cross-archetype migration.

MoveAssignInternal

C++
virtual void MoveAssignInternal(size_t dstRow, size_t srcRow) = 0

Swap-remove: move the last row into the removed row's slot, then PopBack.

Raw

C++
virtual void* Raw(size_t row) = 0

Callers that know the type cast to T*; World hides the cast behind GetComponent<T>().

Raw

C++
virtual const void* Raw(size_t row) const = 0

Data

C++
virtual void* Data() = 0

Start of the contiguous buffer, for iteration without a per-row indirection.

Data

C++
virtual const void* Data() const = 0

ElementSize

C++
virtual size_t ElementSize() const = 0

ComponentId

C++
virtual ComponentID ComponentId() const = 0

MakeEmptyOfSameType

C++
virtual std::unique_ptr<IComponentColumn> MakeEmptyOfSameType() const = 0

A migration target needs columns for every component in the source's signature but can't know the C++ types; only the source column does.

CloneDeep

C++
virtual std::unique_ptr<IComponentColumn> CloneDeep() const = 0
Generated from ECS/Archetype.h via ecs.json · Nov 4, 2026Version 1.0.0