ludus::gameplay::world::WorldBindingTable¶
Ludus Wiki · API overview · Browse API
Class
PersistentObjectKey -> EntityId(durable key to runtime handle), and- runtime slot -> optional durable binding, validated by owner and generation so a recycled slot never inherits a former object's UUID.
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
#include <ludus/gameplay/world/binding_table.h>
class ludus::gameplay::world::WorldBindingTable final
Methods¶
WorldBindingTable¶
ludus::gameplay::world::WorldBindingTable::WorldBindingTable() noexcept=default
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
WorldBindingTable¶
ludus::gameplay::world::WorldBindingTable::WorldBindingTable(const WorldBindingTable &)=delete
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
operator=¶
WorldBindingTable & ludus::gameplay::world::WorldBindingTable::operator=(const WorldBindingTable &)=delete
Related types: WorldBindingTable
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
WorldBindingTable¶
ludus::gameplay::world::WorldBindingTable::WorldBindingTable(WorldBindingTable &&other) noexcept=default
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
operator=¶
WorldBindingTable & ludus::gameplay::world::WorldBindingTable::operator=(WorldBindingTable &&other) noexcept=default
Related types: WorldBindingTable
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
~WorldBindingTable¶
ludus::gameplay::world::WorldBindingTable::~WorldBindingTable()=default
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
TryInitialize¶
Status ludus::gameplay::world::WorldBindingTable::TryInitialize(foundation::uint32 slotCapacity) noexcept
| Parameter | Description |
|---|---|
slotCapacity |
The owning registry's slot capacity (GetCapacity()).
|
Returns
Related types: foundation::uint32 · Status
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
TryReserve¶
Status ludus::gameplay::world::WorldBindingTable::TryReserve(foundation::usize additional) noexcept
additional new bindings before a commit. | Parameter | Description |
|---|---|
additional |
Number of bindings the next batch will publish.
|
Returns
Related types: foundation::usize · Status
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
TryActivate¶
Status ludus::gameplay::world::WorldBindingTable::TryActivate(const EntityRegistry ®istry, std::span< const BindingCandidate > candidates) noexcept
| Parameter | Description |
|---|---|
registry |
The owning registry that issued the candidate handles.
|
candidates |
The bindings to publish; keys must be unique within the batch.
|
Returns
Related types: EntityRegistry · Status · BindingCandidate
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
DetachBinding¶
Status ludus::gameplay::world::WorldBindingTable::DetachBinding(const EntityRegistry ®istry, EntityId entity) noexcept
| Parameter | Description |
|---|---|
registry |
The owning registry (its world token identifies ownership).
|
entity |
The entity whose durable binding is being detached.
|
Returns
entity belongs to another registry. Related types: EntityRegistry · Status · EntityId
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
TryResolve¶
ResolveStatus ludus::gameplay::world::WorldBindingTable::TryResolve(const EntityRegistry ®istry, const foundation::identity::PersistentObjectKey &key, EntityId &outEntity) noexcept
| Parameter | Description |
|---|---|
registry |
The owning registry used to validate the incarnation.
|
key |
The durable key to resolve.
|
outEntity |
Receives the live handle on Resolved; unchanged otherwise.
|
Returns
Related types: EntityRegistry · ResolveStatus · foundation::identity::PersistentObjectKey · EntityId
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
TryGetBinding¶
bool ludus::gameplay::world::WorldBindingTable::TryGetBinding(EntityId entity, foundation::identity::PersistentObjectKey &outKey) const noexcept
entity's slot only when the recorded owner and generation match entity exactly, so a recycled slot never reports a former object's key. Writes outKey only when it returns true. | Parameter | Description |
|---|---|
entity |
The runtime handle whose durable binding is queried.
|
outKey |
Receives the durable key when a matching binding exists.
|
Returns
Related types: foundation::identity::PersistentObjectKey · EntityId
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
GetBindingCount¶
foundation::usize ludus::gameplay::world::WorldBindingTable::GetBindingCount() const noexcept
Related types: foundation::usize
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h
GetBindingRevision¶
foundation::uint64 ludus::gameplay::world::WorldBindingTable::GetBindingRevision() const noexcept
Related types: foundation::uint64
Declared in modules/gameplay/world/include/ludus/gameplay/world/binding_table.h