C++ (Qt)struct Point3D { double x, y, z; };struct Point3F { float x, y, z; };struct Point3W { float x, y, z, w; };
C++ (Qt)std::vector <Point3D> vec1;std::vector <Point3F> vec2;и.т.д.
C++ (Qt)struct base_point {virtual ~base_point() {}}; template <class T>struct point : public base_point{ T x, y, z;}; list<base_point*> list_of_points;
C++ (Qt)typedef vector<PointF> vector_of_pointsf;typedef vector<PointD> vector_of_pointsd;...
C++ (Qt)class CModel { ... CoordVec * mCoord; // или CoordVec & mCoord; };
C++ (Qt)enum typeOfCoordVector { VectorPointF, VectorPointD}; struct base_coord_vec{ virtual ~base_coord_vec() {} virtual type_coord_vec() const = 0;}; struct coord_vec_d : public base_coord_vec{ typedef std::vector<PointD> vector_type; vector_type vector; virtual type_coord_vec() const { return VectorPointD; }}; struct coord_vec_f : public base_coord_vec{ typedef std::vector<PointF> vector_type; vector_type vector; virtual type_coord_vec() const { return VectorPointF; }}; class CModel { base_coord_vec *mCoord;};
C++ (Qt)vector<variant>
C++ (Qt)template <class T>class CModel { ... vector <T> mCoord;};
C++ (Qt)typedef std::vector<variant> super_vector;
C++ (Qt)struct CoordVec { virtual size_t size( void ) const = 0; virtual Point3D & Get3D( size_t index ) = 0; virtual Point3F & Get3F( size_t index ) = 0; virtual Point3W & Get3W( size_t index ) = 0; // то же для Set и.т.д}; template <class T>struct CoordVecT : public CoordVec { virtual size_t size( void ) const { return mData.size(); }.. vector <T> mData;};
C++ (Qt)virtual typeOfVector type() const = 0;
C++ (Qt)void Append( CoordVec & dst, const CoordVec & src );