ludus::foundation::StringIndex¶
Ludus Wiki · API overview · Browse API
Struct
Index is meaningful only inside its enclosing table/snapshot.
Never persist a runtime NameId or compare indices across dictionaries.
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
#include <ludus/foundation/strings/string_table.hpp>
struct ludus::foundation::StringIndex final
Static fields¶
INVALID_VALUE¶
static constexpr uint32 ludus::foundation::StringIndex::INVALID_VALUE = 0xffffffffU
Reserved invalid index value (
0xffffffff); never names an entry. Tables and dictionaries therefore hold fewer than 2^32 entries. Owners that store indices may also use it to mark unused slots.
Related types: uint32
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
Fields¶
Value¶
uint32 ludus::foundation::StringIndex::Value {INVALID_VALUE}
Zero-based entry index; the default is INVALID_VALUE. In a StringTable, index zero is the empty spelling. Range checks belong to the owning table.
Related types: uint32
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
Members¶
operator==¶
constexpr bool operator==(StringIndex, StringIndex) noexcept=default
Compares raw index values; meaningful only for indices of the same table or dictionary.
Related types: StringIndex
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp