#pragma once #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" #include "engine/graphics/matrix_iterator.hpp" #include #include template // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) class IMatrix { public: using Element = ElementType; 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; }; template using IMatrixFactory = yacppdic::Factory>(const Bounds &bounds)>;