2#ifndef LIBSBX_SCENES_ASSET_IO_HPP_
3#define LIBSBX_SCENES_ASSET_IO_HPP_
7#include <unordered_map>
9#include <yaml-cpp/yaml.h>
11#include <libsbx/utility/hashed_string.hpp>
13#include <libsbx/scenes/asset_registry.hpp>
15namespace sbx::scenes {
21 template<std::invocable<asset_registry&, const utility::hashed_
string&, const YAML::Node&> Load>
22 auto register_loader(
const std::string& category, Load&& load) ->
void {
23 _loaders[category] = std::forward<Load>(load);
26 auto has(
const std::string& category)
const ->
bool {
27 return _loaders.contains(category);
31 std::invoke(_loaders.at(category), assets, name,
node);
Definition: asset_io.hpp:17
Definition: asset_registry.hpp:81
Definition: hashed_string.hpp:17