#pragma once #include "interfaces/bounds.hpp" #include "interfaces/vector2.hpp" #include #include template class IMatrix { public: virtual ~IMatrix() = default; /** * Fills the matrix with a element. * * @param element A element */ virtual void fill(Element element) = 0; /** * Returns a element of the matrix. * * @param pos The position of a element */ [[nodiscard]] virtual Element get(const IVector2 &pos) const = 0; /** * Sets a element of the matrix. * * @param pos The position of a element * @param element A new element */ virtual void set(const IVector2 &pos, Element element) = 0; /** * Returns the number of rows the matrix has. */ [[nodiscard]] virtual unsigned int rows() const = 0; /** * Returns the number of columns the matrix has. */ [[nodiscard]] virtual unsigned int columns() const = 0; }; template using IMatrixFactory = std::function>(const IBounds &bounds)>;