#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 auto get(const Vector2 &pos) const noexcept -> Element = 0; virtual void set(const Vector2 &pos, Element element) noexcept = 0; [[nodiscard]] virtual auto get_row_cnt() const noexcept -> uint32_t = 0; [[nodiscard]] virtual auto get_column_cnt() const noexcept -> uint32_t = 0; [[nodiscard]] virtual auto begin() const noexcept -> MatrixIterator = 0; [[nodiscard]] virtual auto end() const noexcept -> MatrixIterator = 0; auto operator=(const IMatrix &matrix) noexcept -> IMatrix & = default; auto operator=(IMatrix &&matrix) noexcept -> IMatrix & = default; }; template using IMatrixFactory = std::shared_ptr> (*)(const Bounds &bounds);