#pragma once #include "compat/defs.hpp" #include "atlas-loader-fwd.hpp" #include "policy.hpp" #include namespace floormat::loader_detail { template class atlas_loader final { [[fm_no_unique_address]] TRAITS t; atlas_storage s; public: using Traits = TRAITS; using Atlas = ATLAS; using Cell = typename TRAITS::Cell; ~atlas_loader() noexcept = default; fm_DECLARE_DELETED_COPY_ASSIGNMENT(atlas_loader); fm_DECLARE_DELETED_MOVE_ASSIGNMENT(atlas_loader); atlas_loader(TRAITS&& traits); atlas_loader() requires std::is_default_constructible_v; ArrayView ensure_atlas_list(); const std::shared_ptr& get_atlas(StringView name, loader_policy p); std::shared_ptr make_atlas(StringView name, const Cell& cell); bool cell_exists(StringView name); const Cell& get_cell(StringView name); void register_cell(Cell&& c); const Cell& get_invalid_atlas(); }; } // namespace floormat::loader_detail