2#include "gaia/config/config.h"
6#include "gaia/ecs/chunk.h"
7#include "gaia/ecs/component.h"
12 struct ComponentRawView;
38 GAIA_NODISCARD
decltype(
auto)
get()
const {
44 if constexpr (actual_type_t<T>::Kind == EntityKind::EK_Gen)
55 GAIA_NODISCARD
decltype(
auto)
get(
Entity type)
const;
Fixed-capacity archetype storage unit holding entities and their component columns.
Definition chunk.h:36
Owns entities, components, archetypes, queries, observers, and systems.
Definition world.h:80
Entity-scoped component accessor bound to a specific world, chunk and row. It is not a standalone chu...
Definition component_getter.h:16
const Chunk * m_pChunk
Chunk containing the entity's table-backed data.
Definition component_getter.h:20
GAIA_NODISCARD decltype(auto) get() const
Returns the value stored in the component T on entity.
Definition component_getter.h:38
Entity m_entity
Entity whose components are accessed.
Definition component_getter.h:22
const World * m_pWorld
World used to resolve inherited and sparse component data.
Definition component_getter.h:18
GAIA_NODISCARD decltype(auto) get(Entity type) const
Returns the value stored in the component associated with type on entity.
GAIA_NODISCARD ComponentRawView get_raw(Entity component) const
Returns a raw byte view for a runtime component on this entity.
Definition world.h:15197
ComponentGetter(const World &world, const Chunk *pChunk, Entity entity, uint16_t row)
Creates an accessor for one entity row.
Definition component_getter.h:31
GAIA_NODISCARD ComponentRawView get_raw_field(Entity component, uint32_t fieldIdx) const
Returns one read-only SoA field value for a runtime component on this entity.
Definition world.h:15203
uint16_t m_row
Entity row within the chunk.
Definition component_getter.h:24
Non-owning read-only view over raw component bytes on an entity.
Definition component_cursor.h:38
Identifier of an entity or component instance in the world. Packs the entity index,...
Definition id.h:296