#pragma once #include "interfaces/vector2.hpp" #include #include enum CoordsValidation { VALID, X_HIGH, Y_HIGH }; class IBounds { public: virtual ~IBounds() = default; [[nodiscard]] virtual unsigned int width() const = 0; virtual void width(unsigned int width) = 0; [[nodiscard]] virtual unsigned int height() const = 0; virtual void height(unsigned int height) = 0; [[nodiscard]] virtual CoordsValidation validate_coords(const IVector2 &coords) const = 0; virtual const IBounds &operator*=(const IBounds &bounds) = 0; virtual const IBounds &operator+=(const IBounds &bounds) = 0; virtual const IBounds &operator-=(const IBounds &bounds) = 0; }; struct IBoundsOptions { unsigned int width; unsigned int height; }; using IBoundsFactory = std::function(const IBoundsOptions &options)>;