TStructureTerrain struc;struc.Matrix.set(10,10);
C++ (Qt)struct TStructureTerrain { TGeoPnt GeoPnt_LowerLeft; TGeoPnt GeoPnt_SW; TGeoPnt GeoPnt_NW; TGeoPnt GeoPnt_NE; TGeoPnt GeoPnt_SE; TSmallintSpaceXY Matrix; };
C++ (Qt)class TSmallintSpaceXY { Q_PROPERTY(qint16 Item READ get WRITE set)private: qint16 *FData; bool CheckIndex(int X, int Y);public: int FX, FY; TSmallintSpaceXY(); TSmallintSpaceXY(int, int); ~TSmallintSpaceXY(); qint16 get(int X, int Y); bool set(int X, int Y, qint16 Value);};
C++ (Qt)TStructureTerrain struc; TSmallintSpaceXY struc.Matrix(10,10);
C++ (Qt)TSmallintSpaceXY tmp(10,10);
C++ (Qt)struct TStructureTerrain { TGeoPnt GeoPnt_LowerLeft; TGeoPnt GeoPnt_SW; TGeoPnt GeoPnt_NW; TGeoPnt GeoPnt_NE; TGeoPnt GeoPnt_SE; TSmallintSpaceXY Matrix; TStructureTerrain(int n, int m) : Matrix(n,m) {} };
C++ (Qt)TStructureTerrain struc(10, 10);
TStructureTerrain struc;struc.Matrix.~TSmallintSpaceXY(); // удаляем УЖЕ СОЗДАННЫЙ матриксnew (&struc.Matrix) TSmallintSpaceXY(10,10); // создаем новый на его месте
C++ (Qt)TStructureTerrain struc;struc.Matrix = TSmallintSpaceXY(10,10);
C++ (Qt)class TSmallintSpaceXY ... TSmallintSpaceXY(int n = 10, int m = 10);
C++ (Qt)struct TStructureTerrain {... TStructureTerrain() : Matrix(10, 10) {},,,};