Skip to content

Engine → Core

slot_key_format.h

Text form of slot_key: to_string, parse_slot_key and the std::formatter specialisation. Kept apart from slot_map.h so code that only stores and looks up handles does not pay for <format> and the string headers.

Structs

File Description
std::formatter<conjure::core::slot_key>

Functions

Public

parse_slot_key

[[nodiscard]] CONJURE_API std::optional<slot_key> parse_slot_key(
    std::string_view text) noexcept;

Parses the to_string() form. Returns nullopt for anything else.

to_string

[[nodiscard]] CONJURE_API std::string to_string(
    slot_key key);

"index:generation" in decimal, e.g. "12:3". The null key prints as "0:0".