16 using RawLoader = std::function<std::unique_ptr<Asset>(std::vector<uint8_t>)>;
17 using TomlLoader = std::function<std::unique_ptr<Asset>(toml::table)>;
18 using SchemaTomlLoader = std::function<std::unique_ptr<Asset>(toml::table,
Handle<Schema>)>;
22 static void registerRaw(std::string_view type, RawLoader loader);
23 static void registerToml(std::string_view type, TomlLoader loader);
24 static void registerSchemaToml(std::string_view type, SchemaTomlLoader loader);
27 static auto hasRaw(std::string_view type) -> bool;
30 static auto hasToml(std::string_view type) -> bool;
33 static auto hasSchemaToml(std::string_view type) -> bool;
35 static auto createRaw(std::string_view type, std::vector<uint8_t> data) -> std::unique_ptr<Asset>;
36 static auto createToml(std::string_view type, toml::table table) -> std::unique_ptr<Asset>;
37 static auto createSchemaToml(std::string_view type, toml::table table,
Handle<Schema> schema) -> std::unique_ptr<Asset>;
39 static void registerLuaName(std::string_view type, std::string_view lua_name);
42 static auto registeredLuaNames() ->
const std::unordered_map<std::string, std::string>&;
45 static std::unordered_map<std::string, RawLoader> s_raw;
46 static std::unordered_map<std::string, TomlLoader> s_toml;
47 static std::unordered_map<std::string, SchemaTomlLoader> s_schema_toml;
48 static std::unordered_map<std::string, std::string> s_lua_names;