Machinarium/Classes/Geometry/Primitives/Rectangle.hpp: In instantiation of ‘class Rectangle<unsigned int>’:
Machinarium/Classes/Geometry/Primitives/Rectangle.cpp:33:1: required from here
Machinarium/Classes/Geometry/Primitives/Rectangle.hpp:16:46: error: invalid abstract return type ‘Axis<unsigned int>’
16 | ParameterGetSetTypedClassVariable(Axis<T>, axis);
| ^~~~
#pragma once
#ifndef __RECTANGLE__HPP_
#define __RECTANGLE__HPP_
#include "Point.hpp"
#include "Axis.hpp"
/**
* @brief Класс двумерной ограниченной плоскости.
*
* @tparam T
*/
template<typename T> class Rectangle : public Point2D<T>
{
ParameterGetSetTypedClassVariable(Axis<T>, axis);
ParameterGetSetTyped(T, w, 0);
ParameterGetSetTyped(T, h, 0);
#define ParameterGetSetTypedClassVariable(var_type, name) \
private: \
var_type __ ## name; \
public: \
inline var_type name (var_type value) { \
set_ ## name(value); \
return value;} \
inline const var_type & get_ ## name () const {return this->__ ## name;} \
inline void set_ ## name (var_type value) {__ ## name = value;}
template<typename T> class Axis : public IShape<T>
{
ParameterGetSetTypedClassVariable(Point2D<T>, position);
ParameterGetSetTyped(T, rotation, 0);
public:
Axis(T rotation, Point2D<T> position);
inline virtual std::string getShapeName();
virtual void draw() const;
virtual inline T perimeter();
virtual inline T area();
};