summaryrefslogtreecommitdiffhomepage
path: root/loader/atlas-loader-storage.hpp
blob: f428be0a323ef6ca9c5f378e195a26a2d4fe2ca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "compat/int-hash.hpp"
#include "atlas-loader-fwd.hpp"
#include <vector>
#include <tsl/robin_map.h>

namespace floormat::loader_detail {

template<typename ATLAS, typename TRAITS>
struct atlas_storage
{
    using Traits = TRAITS;
    using Cell = typename TRAITS::Cell;

    tsl::robin_map<StringView, Cell*, hash_string_view> name_map;
    std::vector<Cell> cell_array;
    std::vector<String> missing_atlas_names;
    Pointer<Cell> invalid_atlas;

    bool is_empty() const { return cell_array.empty(); }
};

} // namespace floormat::loader_detail