#pragma once #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" #include "engine/matrix_iterator.hpp" #include template class IMatrix { public: IMatrix() noexcept = default; IMatrix(const IMatrix &matrix) noexcept = default; IMatrix(IMatrix &&matrix) noexcept = default; virtual ~IMatrix() noexcept = default; virtual void fill(Element element) noexcept = 0; [[nodiscard]] virtual Element get(const Vector2 &pos) const noexcept = 0; virtual void set(const Vector2 &pos, Element element) noexcept = 0; [[nodiscard]] virtual uint32_t get_row_cnt() const noexcept = 0; [[nodiscard]] virtual uint32_t get_column_cnt() const noexcept = 0; [[nodiscard]] virtual MatrixIterator begin() const noexcept = 0; [[nodiscard]] virtual MatrixIterator end() const noexcept = 0; IMatrix &operator=(const IMatrix &matrix) noexcept = default; IMatrix &operator=(IMatrix &&matrix) noexcept = default; }; template using IMatrixFactory = std::shared_ptr> (*)(const Bounds &bounds);