]> git.localhorst.tv Git - blank.git/blob - src/shared/ResourceIndex.hpp
make command output visible to player(s)
[blank.git] / src / shared / ResourceIndex.hpp
1 #ifndef BLANK_SHARED_RESOURCEINDEX_HPP_
2 #define BLANK_SHARED_RESOURCEINDEX_HPP_
3
4 #include <map>
5 #include <string>
6
7
8 namespace blank {
9
10 class ResourceIndex {
11
12         using MapType = std::map<std::string, std::size_t>;
13
14 public:
15         ResourceIndex();
16
17         std::size_t GetID(const std::string &);
18
19         std::size_t Size() const noexcept { return id_map.size(); }
20         const MapType &Entries() const noexcept { return id_map; }
21
22 private:
23         MapType id_map;
24
25 };
26
27 };
28
29 #endif