]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Set.hpp
test asset loading
[blobs.git] / src / world / Set.hpp
index c4aa6e9f37b6691b38385884e258810913e2dadc..ce832ac06d9cadbe65bc29204db617c3ab46af28 100644 (file)
@@ -22,6 +22,10 @@ public:
                types.back().id = id;
                return id;
        }
+       bool Has(int id) const noexcept { return id < types.size(); }
+       bool Has(const std::string &name) const noexcept { return names.find(name) != names.end(); }
+
+       typename std::vector<Type>::size_type Size() const noexcept { return types.size(); }
 
        Type &operator [](int id) noexcept { return types[id]; }
        const Type &operator [](int id) const noexcept { return types[id]; }