2#include "gaia/config/config.h"
6#include "gaia/ecs/chunk.h"
7#include "gaia/ecs/component.h"
8#include "gaia/ecs/component_getter.h"
12 struct ComponentRawMutView;
29 decltype(
auto)
mut() {
37 template <typename T, typename U = typename actual_type_t<T>::Type>
64 if constexpr (uses_ct_sparse_storage_v<T>)
65 return smut<T>(
m_pChunk->template comp_entity<T>());
74 template <typename T, typename U = typename actual_type_t<T>::Type>
79 smut<T>() = GAIA_FWD(value);
Fixed-capacity archetype storage unit holding entities and their component columns.
Definition chunk.h:36
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
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
ComponentGetter(const World &world, const Chunk *pChunk, Entity entity, uint16_t row)
Creates an accessor for one entity row.
Definition component_getter.h:31
uint16_t m_row
Entity row within the chunk.
Definition component_getter.h:24
Non-owning mutable view over raw component bytes on an entity.
Definition component_cursor.h:64
Entity-scoped mutable component accessor bound to a specific world, chunk and row....
Definition component_setter.h:16
decltype(auto) mut()
Returns a mutable reference to component without triggering hooks, observers or world-version updates...
Definition component_setter.h:29
GAIA_NODISCARD ComponentRawMutView mut_raw(Entity component)
Returns a mutable raw byte view for a runtime component without finishing the write....
Definition world.h:17359
GAIA_NODISCARD ComponentRawMutView mut_raw_field(Entity component, uint32_t fieldIdx)
Returns one mutable SoA field value without finishing the component write. Pair with modify_raw(compo...
Definition world.h:17365
ComponentSetter & set(U &&value)
Sets the value of the component.
Definition world.h:17435
decltype(auto) smut()
Returns a mutable reference to component without triggering a world version update.
Definition component_setter.h:60
ComponentSetter & modify_raw(Entity component)
Marks a raw payload or SoA field returned by a mutable raw view as modified.
Definition world.h:17380
ComponentSetter & sset(U &&value)
Sets the value of the component without triggering a world version update.
Definition component_setter.h:75
ComponentSetter & set_raw(Entity component, const void *data, uint32_t size)
Replaces a runtime component payload and emits normal post-write set notifications.
Definition world.h:17371
Identifier of an entity or component instance in the world. Packs the entity index,...
Definition id.h:231