X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FBlockTypeRegistry.hpp;h=9d9597dde0716348245f8a3e4d0622b008b50d8c;hb=9240fdf2e68ee014da0d0a89a7fb2f29ebf28e2d;hp=38afac4b6be98b18a8ad2273d284bf5e7a18f14d;hpb=825f479edf9867938b6789215ad7ae6303596cba;p=blank.git diff --git a/src/world/BlockTypeRegistry.hpp b/src/world/BlockTypeRegistry.hpp index 38afac4..9d9597d 100644 --- a/src/world/BlockTypeRegistry.hpp +++ b/src/world/BlockTypeRegistry.hpp @@ -11,12 +11,23 @@ namespace blank { class BlockTypeRegistry { public: - BlockTypeRegistry(); + using size_type = std::vector::size_type; + using reference = std::vector::reference; + using const_reference = std::vector::const_reference; + using iterator = std::vector::iterator; + using const_iterator = std::vector::const_iterator; public: + BlockTypeRegistry(); + Block::Type Add(const BlockType &); - size_t Size() const noexcept { return types.size(); } + size_t size() const noexcept { return types.size(); } + + iterator begin() noexcept { return types.begin(); } + const_iterator begin() const noexcept { return types.begin(); } + iterator end() noexcept { return types.end(); } + const_iterator end() const noexcept { return types.end(); } BlockType &operator [](Block::Type id) { return types[id]; } const BlockType &operator [](Block::Type id) const { return types[id]; }