NameTable
Generated from engine/core/name_table.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/core/name_table.h" · namespace labrador
class NameTable
Section titled “class NameTable”Named elements stored by value, resolved to handles once and then read by index. The same names-in, handles-out bargain as Registry, for the case where the elements are part of a larger asset rather than assets in their own right: a sprite sheet's frames and animation strips.
Registry is the one to reach for when the entries have independent lifetimes - when something can be released and reloaded underneath a live handle. A NameTable is filled once by a loader and is const thereafter, so it stores elements directly: one allocation for the lot, contiguous, and no indirection on the read.
Because it never grows after loading, references into it are stable, which is what lets a caller hold a const Element& across a frame.
NameTable
Section titled “NameTable”kind names the element type in error messages: "sprite frame", "animation strip". Stored, not copied - pass a literal.
void add(const std::string& name, Element element);Load-time only. A repeated name replaces the earlier element and keeps its index, so no handle resolved from this table is ever left dangling.
resolve
Section titled “resolve”Throws std::out_of_range naming the element and the kind if the table has no such name - a sheet asked for a frame it does not contain is a content bug, and it should say so at load rather than draw nothing.
The per-frame read: a bounds check and an index. Throws rather than return a reference to nothing.
contains
Section titled “contains”bool contains(const std::string& name) const;Related types
Section titled “Related types”Named in the public declarations above: Handle.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
tests/core/name_table_tests.cpptests/render/animation_object_tests.cpp,null_tests.cpp,sprite_sheet_object_tests.cpp,visual_tests.cpptests/scene/cull_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.