]> git.localhorst.tv Git - blank.git/blobdiff - src/shared/ResourceIndex.hpp
lil cleanup of common and unused stuff
[blank.git] / src / shared / ResourceIndex.hpp
diff --git a/src/shared/ResourceIndex.hpp b/src/shared/ResourceIndex.hpp
new file mode 100644 (file)
index 0000000..e04ec6f
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef BLANK_SHARED_RESOURCEINDEX_HPP_
+#define BLANK_SHARED_RESOURCEINDEX_HPP_
+
+#include <map>
+#include <string>
+
+
+namespace blank {
+
+class ResourceIndex {
+
+       using MapType = std::map<std::string, std::size_t>;
+
+public:
+       ResourceIndex();
+
+       std::size_t GetID(const std::string &);
+
+       std::size_t Size() const noexcept { return id_map.size(); }
+       const MapType &Entries() const noexcept { return id_map; }
+
+private:
+       MapType id_map;
+
+};
+
+};
+
+#endif