diff options
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/matrix.hpp | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/src/interfaces/matrix.hpp b/src/interfaces/matrix.hpp index 44a26ed..c22c0a7 100644 --- a/src/interfaces/matrix.hpp +++ b/src/interfaces/matrix.hpp @@ -3,45 +3,39 @@ #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" +#include "engine/matrix_iterator.hpp" + #include <memory> template <typename Element> class IMatrix { public: + IMatrix() noexcept = default; + + IMatrix(const IMatrix &matrix) noexcept = default; + + IMatrix(IMatrix &&matrix) noexcept = default; + virtual ~IMatrix() noexcept = default; - /** - * Fills the matrix with a element. - * - * @param element A element - */ virtual void fill(Element element) noexcept = 0; - /** - * Returns a element of the matrix. - * - * @param pos The position of a element - */ [[nodiscard]] virtual Element get(const Vector2 &pos) const noexcept = 0; - /** - * Sets a element of the matrix. - * - * @param pos The position of a element - * @param element A new element - */ virtual void set(const Vector2 &pos, Element element) noexcept = 0; - /** - * Returns the number of rows the matrix has. - */ - [[nodiscard]] virtual uint32_t rows() const 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<std::string_view> begin() const noexcept = 0; + + [[nodiscard]] virtual MatrixIterator<std::string_view> end() const noexcept = 0; + + IMatrix &operator=(const IMatrix &matrix) noexcept = default; - /** - * Returns the number of columns the matrix has. - */ - [[nodiscard]] virtual uint32_t columns() const noexcept = 0; + IMatrix &operator=(IMatrix &&matrix) noexcept = default; }; template <typename Element> |