ludus::foundation::StringTable¶
Ludus Wiki · API overview · Browse API
Class
StringTableConfig::MaxAllocatedBytes; that domain must outlive this table and any FrozenStringTable it becomes. Entries are never removed or reused.Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
#include <ludus/foundation/strings/string_table.hpp>
class ludus::foundation::StringTable final
Methods¶
StringTable¶
ludus::foundation::StringTable::StringTable() noexcept=default
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
~StringTable¶
ludus::foundation::StringTable::~StringTable() noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
StringTable¶
ludus::foundation::StringTable::StringTable(StringTable &&other) noexcept
other, which becomes empty. Requires quiescence. Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
operator=¶
StringTable & ludus::foundation::StringTable::operator=(StringTable &&other) noexcept
other, which becomes empty. Related types: StringTable
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
StringTable¶
ludus::foundation::StringTable::StringTable(const StringTable &)=delete
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
operator=¶
StringTable & ludus::foundation::StringTable::operator=(const StringTable &)=delete
Related types: StringTable
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
IsValid¶
bool ludus::foundation::StringTable::IsValid() const noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
TryIntern¶
StringStatus ludus::foundation::StringTable::TryIntern(std::string_view value, NameId &outId) noexcept
| Parameter | Description |
|---|---|
value |
Counted bytes, checked against the configured length, UTF-8 and zero-byte rules.
|
outId |
Receives the table-qualified ID on success; unchanged on failure.
|
Returns
Related types: StringStatus · NameId
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
TryFind¶
StringStatus ludus::foundation::StringTable::TryFind(std::string_view value, NameId &outId) const noexcept
| Parameter | Description |
|---|---|
value |
Counted bytes, checked against the configured spelling rules.
|
outId |
Receives the table-qualified ID on success; unchanged on failure.
|
Returns
Related types: StringStatus · NameId
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
TryResolve¶
StringStatus ludus::foundation::StringTable::TryResolve(NameId id, std::string_view &outSpelling) const &noexcept
| Parameter | Description |
|---|---|
id |
ID to resolve.
|
outSpelling |
Receives the spelling on success; unchanged on failure.
|
Returns
Related types: StringStatus · NameId
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
TryResolve¶
StringStatus ludus::foundation::StringTable::TryResolve(NameId, std::string_view &) const &&=delete
Related types: StringStatus · NameId
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp
TryFreeze¶
StringStatus ludus::foundation::StringTable::TryFreeze(FrozenStringTable &outTable) noexcept
outTable must be empty. No allocation required. | Parameter | Description |
|---|---|
outTable |
Receives the table's storage on success; unchanged on failure.
|
Returns
outTable already owns a table. Failure leaves both objects unchanged. Related types: StringStatus
Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp