/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #pragma once #include "IO/FileDescription.hpp" #include "Data/Containers/Array.hpp" #include #include namespace OpenVulkano { class ArchiveReader; class ArchiveReaderIterator { public: using iterator_category = std::input_iterator_tag; using value_type = std::pair>; using difference_type = std::ptrdiff_t; using pointer = const value_type*; using reference = const value_type&; private: ArchiveReader* m_reader; std::pair> m_current; public: explicit ArchiveReaderIterator(ArchiveReader* reader = nullptr); reference operator*() const { return m_current; } pointer operator->() const { return &m_current; } ArchiveReaderIterator& operator++(); ArchiveReaderIterator operator++(int) { ArchiveReaderIterator tmp = *this; ++(*this); return tmp; } bool operator==(const ArchiveReaderIterator& other) const { return m_reader == other.m_reader; } bool operator!=(const ArchiveReaderIterator& other) const { return !(*this == other); } }; }