Fix move sematic.

(grafted from fb8691f522f3515d7c3014a0ea90b60b352a444e)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-12-30 13:00:57 +02:00
parent 6fc51d83b0
commit 74bb3e4369
68 changed files with 617 additions and 105 deletions

View File

@ -208,6 +208,21 @@ QmuParserCallback &QmuParserCallback::operator=(const QmuParserCallback &a_Fun)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
QmuParserCallback &QmuParserCallback::operator=(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW
{
Swap(a_Fun);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void QmuParserCallback::Swap(QmuParserCallback &a_Fun) Q_DECL_NOTHROW
{
std::swap(d, a_Fun.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief Return true if the function is conservative. * @brief Return true if the function is conservative.

View File

@ -86,11 +86,10 @@ public:
QmuParserCallback &operator=(const QmuParserCallback &a_Fun); QmuParserCallback &operator=(const QmuParserCallback &a_Fun);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
QmuParserCallback &operator=(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW { Swap(a_Fun); return *this; } QmuParserCallback &operator=(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(QmuParserCallback &a_Fun) Q_DECL_NOTHROW void Swap(QmuParserCallback &a_Fun) Q_DECL_NOTHROW;
{ std::swap(d, a_Fun.d); }
Q_REQUIRED_RESULT QmuParserCallback* Clone() const; Q_REQUIRED_RESULT QmuParserCallback* Clone() const;

View File

@ -78,6 +78,22 @@ VAbstractArc &VAbstractArc::operator=(const VAbstractArc &arc)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractArc &VAbstractArc::operator=(VAbstractArc &&arc) Q_DECL_NOTHROW
{
Swap(arc);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VAbstractArc::Swap(VAbstractArc &arc) Q_DECL_NOTHROW
{
VAbstractCurve::Swap(arc);
std::swap(d, arc.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VAbstractArc::~VAbstractArc() VAbstractArc::~VAbstractArc()
{} {}

View File

@ -58,11 +58,10 @@ public:
VAbstractArc& operator= (const VAbstractArc &arc); VAbstractArc& operator= (const VAbstractArc &arc);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VAbstractArc &operator=(VAbstractArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; } VAbstractArc &operator=(VAbstractArc &&arc) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VAbstractArc &arc) Q_DECL_NOTHROW void Swap(VAbstractArc &arc) Q_DECL_NOTHROW;
{ VAbstractCurve::Swap(arc); std::swap(d, arc.d); }
QString GetFormulaF1 () const; QString GetFormulaF1 () const;
void SetFormulaF1 (const QString &formula, qreal value); void SetFormulaF1 (const QString &formula, qreal value);

View File

@ -59,6 +59,22 @@ VAbstractCurve &VAbstractCurve::operator=(const VAbstractCurve &curve)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractCurve &VAbstractCurve::operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW
{
Swap(curve);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VAbstractCurve::Swap(VAbstractCurve &curve) Q_DECL_NOTHROW
{
VGObject::Swap(curve);
std::swap(d, curve.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VAbstractCurve::~VAbstractCurve() VAbstractCurve::~VAbstractCurve()
{} {}

View File

@ -57,11 +57,10 @@ public:
VAbstractCurve& operator= (const VAbstractCurve &curve); VAbstractCurve& operator= (const VAbstractCurve &curve);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VAbstractCurve &operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; } VAbstractCurve &operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VAbstractCurve &curve) Q_DECL_NOTHROW void Swap(VAbstractCurve &curve) Q_DECL_NOTHROW;
{ VGObject::Swap(curve); std::swap(d, curve.d); }
virtual QVector<QPointF> GetPoints() const =0; virtual QVector<QPointF> GetPoints() const =0;
static QVector<QPointF> GetSegmentPoints(const QVector<QPointF> &points, const QPointF &begin, const QPointF &end, static QVector<QPointF> GetSegmentPoints(const QVector<QPointF> &points, const QPointF &begin, const QPointF &end,

View File

@ -116,6 +116,23 @@ VArc &VArc::operator =(const VArc &arc)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VArc &VArc::operator=(VArc &&arc) Q_DECL_NOTHROW
{
Swap(arc);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
inline void VArc::Swap(VArc &arc) Q_DECL_NOTHROW
{
VAbstractArc::Swap(arc);
std::swap(d, arc.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VArc VArc::Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix) const VArc VArc::Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix) const
{ {

View File

@ -66,11 +66,10 @@ public:
VArc& operator= (const VArc &arc); VArc& operator= (const VArc &arc);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VArc &operator=(VArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; } VArc &operator=(VArc &&arc) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VArc &arc) Q_DECL_NOTHROW void Swap(VArc &arc) Q_DECL_NOTHROW;
{ VAbstractArc::Swap(arc); std::swap(d, arc.d); }
QString GetFormulaRadius () const; QString GetFormulaRadius () const;
void SetFormulaRadius (const QString &formula, qreal value); void SetFormulaRadius (const QString &formula, qreal value);

View File

@ -64,6 +64,22 @@ VCubicBezier &VCubicBezier::operator=(const VCubicBezier &curve)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VCubicBezier &VCubicBezier::operator=(VCubicBezier &&curve) Q_DECL_NOTHROW
{
Swap(curve);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VCubicBezier::Swap(VCubicBezier &curve) Q_DECL_NOTHROW
{
VAbstractCubicBezier::Swap(curve);
std::swap(d, curve.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VCubicBezier VCubicBezier::Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix) const VCubicBezier VCubicBezier::Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix) const
{ {

View File

@ -57,11 +57,10 @@ public:
VCubicBezier &operator=(const VCubicBezier &curve); VCubicBezier &operator=(const VCubicBezier &curve);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VCubicBezier &operator=(VCubicBezier &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; } VCubicBezier &operator=(VCubicBezier &&curve) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VCubicBezier &curve) Q_DECL_NOTHROW void Swap(VCubicBezier &curve) Q_DECL_NOTHROW;
{ VAbstractCubicBezier::Swap(curve); std::swap(d, curve.d); }
virtual VPointF GetP1() const override; virtual VPointF GetP1() const override;
void SetP1(const VPointF &p); void SetP1(const VPointF &p);

View File

@ -78,6 +78,22 @@ VCubicBezierPath &VCubicBezierPath::operator=(const VCubicBezierPath &curve)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VCubicBezierPath &VCubicBezierPath::operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW
{
Swap(curve);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VCubicBezierPath::Swap(VCubicBezierPath &curve) Q_DECL_NOTHROW
{
VAbstractCubicBezierPath::Swap(curve);
std::swap(d, curve.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VCubicBezierPath VCubicBezierPath::Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix) const VCubicBezierPath VCubicBezierPath::Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix) const
{ {

View File

@ -58,11 +58,10 @@ public:
VCubicBezierPath &operator=(const VCubicBezierPath &curve); VCubicBezierPath &operator=(const VCubicBezierPath &curve);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VCubicBezierPath &operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; } VCubicBezierPath &operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VCubicBezierPath &curve) Q_DECL_NOTHROW void Swap(VCubicBezierPath &curve) Q_DECL_NOTHROW;
{ VAbstractCubicBezierPath::Swap(curve); std::swap(d, curve.d); }
VPointF &operator[](int indx); VPointF &operator[](int indx);

View File

@ -123,6 +123,22 @@ VEllipticalArc &VEllipticalArc::operator =(const VEllipticalArc &arc)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VEllipticalArc &VEllipticalArc::operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW
{
Swap(arc);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VEllipticalArc::Swap(VEllipticalArc &arc) Q_DECL_NOTHROW
{
VAbstractArc::Swap(arc);
std::swap(d, arc.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VEllipticalArc VEllipticalArc::Rotate(QPointF originPoint, qreal degrees, const QString &prefix) const VEllipticalArc VEllipticalArc::Rotate(QPointF originPoint, qreal degrees, const QString &prefix) const
{ {

View File

@ -69,11 +69,10 @@ public:
VEllipticalArc& operator= (const VEllipticalArc &arc); VEllipticalArc& operator= (const VEllipticalArc &arc);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VEllipticalArc &operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; } VEllipticalArc &operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VEllipticalArc &arc) Q_DECL_NOTHROW void Swap(VEllipticalArc &arc) Q_DECL_NOTHROW;
{ VAbstractArc::Swap(arc); std::swap(d, arc.d); }
QString GetFormulaRotationAngle () const; QString GetFormulaRotationAngle () const;
void SetFormulaRotationAngle (const QString &formula, qreal value); void SetFormulaRotationAngle (const QString &formula, qreal value);

View File

@ -127,6 +127,22 @@ VGObject &VGObject::operator=(const VGObject &obj)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VGObject &VGObject::operator=(VGObject &&obj) Q_DECL_NOTHROW
{
Swap(obj);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VGObject::Swap(VGObject &obj) Q_DECL_NOTHROW
{
std::swap(d, obj.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VGObject::~VGObject() VGObject::~VGObject()
{} {}

View File

@ -59,11 +59,10 @@ public:
VGObject& operator= (const VGObject &obj); VGObject& operator= (const VGObject &obj);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VGObject &operator=(VGObject &&obj) Q_DECL_NOTHROW { Swap(obj); return *this; } VGObject &operator=(VGObject &&obj) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VGObject &obj) Q_DECL_NOTHROW void Swap(VGObject &obj) Q_DECL_NOTHROW;
{ std::swap(d, obj.d); }
quint32 getIdObject() const; quint32 getIdObject() const;
void setIdObject(const quint32 &value); void setIdObject(const quint32 &value);

View File

@ -225,6 +225,22 @@ VPlaceLabelItem &VPlaceLabelItem::operator=(const VPlaceLabelItem &item)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPlaceLabelItem &VPlaceLabelItem::operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW
{
Swap(item);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPlaceLabelItem::Swap(VPlaceLabelItem &item) Q_DECL_NOTHROW
{
VPointF::Swap(item);
std::swap(d, item.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
PlaceLabelImg VPlaceLabelItem::LabelShape() const PlaceLabelImg VPlaceLabelItem::LabelShape() const
{ {

View File

@ -48,11 +48,10 @@ public:
VPlaceLabelItem &operator=(const VPlaceLabelItem &item); VPlaceLabelItem &operator=(const VPlaceLabelItem &item);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPlaceLabelItem &operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW { Swap(item); return *this; } VPlaceLabelItem &operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPlaceLabelItem &item) Q_DECL_NOTHROW void Swap(VPlaceLabelItem &item) Q_DECL_NOTHROW;
{ VPointF::Swap(item); std::swap(d, item.d); }
QString GetWidthFormula() const; QString GetWidthFormula() const;
QString& GetWidthFormula(); QString& GetWidthFormula();

View File

@ -102,6 +102,22 @@ VPointF &VPointF::operator =(const VPointF &point)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPointF &VPointF::operator=(VPointF &&point) Q_DECL_NOTHROW
{
Swap(point);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPointF::Swap(VPointF &point) Q_DECL_NOTHROW
{
VGObject::Swap(point);
std::swap(d, point.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPointF::operator QPointF() const VPointF::operator QPointF() const
{ {

View File

@ -62,11 +62,10 @@ public:
VPointF &operator=(const VPointF &point); VPointF &operator=(const VPointF &point);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW { Swap(point); return *this; } VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPointF &point) Q_DECL_NOTHROW void Swap(VPointF &point) Q_DECL_NOTHROW;
{ VGObject::Swap(point); std::swap(d, point.d); }
explicit operator QPointF() const; explicit operator QPointF() const;
VPointF Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix = QString()) const; VPointF Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix = QString()) const;

View File

@ -247,6 +247,22 @@ VSpline &VSpline::operator =(const VSpline &spline)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VSpline &VSpline::operator=(VSpline &&spline) Q_DECL_NOTHROW
{
Swap(spline);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VSpline::Swap(VSpline &spline) Q_DECL_NOTHROW
{
VAbstractCubicBezier::Swap(spline);
std::swap(d, spline.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief GetP1 return first spline point. * @brief GetP1 return first spline point.

View File

@ -67,11 +67,10 @@ public:
VSpline &operator=(const VSpline &spline); VSpline &operator=(const VSpline &spline);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VSpline &operator=(VSpline &&spline) Q_DECL_NOTHROW { Swap(spline); return *this; } VSpline &operator=(VSpline &&spline) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VSpline &spline) Q_DECL_NOTHROW void Swap(VSpline &spline) Q_DECL_NOTHROW;
{ VAbstractCubicBezier::Swap(spline); std::swap(d, spline.d); }
virtual VPointF GetP1 () const override; virtual VPointF GetP1 () const override;
void SetP1 (const VPointF &p); void SetP1 (const VPointF &p);

View File

@ -303,6 +303,22 @@ VSplinePath &VSplinePath::operator =(const VSplinePath &path)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VSplinePath &VSplinePath::operator=(VSplinePath &&path) Q_DECL_NOTHROW
{
Swap(path);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VSplinePath::Swap(VSplinePath &path) Q_DECL_NOTHROW
{
VAbstractCubicBezierPath::Swap(path);
std::swap(d, path.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief operator [] return spline point by index. * @brief operator [] return spline point by index.

View File

@ -67,11 +67,10 @@ public:
VSplinePoint &operator[](int indx); VSplinePoint &operator[](int indx);
VSplinePath &operator=(const VSplinePath &path); VSplinePath &operator=(const VSplinePath &path);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VSplinePath &operator=(VSplinePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; } VSplinePath &operator=(VSplinePath &&path) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VSplinePath &path) Q_DECL_NOTHROW void Swap(VSplinePath &path) Q_DECL_NOTHROW;
{ VAbstractCubicBezierPath::Swap(path); std::swap(d, path.d); }
void append(const VSplinePoint &point); void append(const VSplinePoint &point);

View File

@ -75,6 +75,20 @@ VFSplinePoint &VFSplinePoint::operator=(const VFSplinePoint &point)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VFSplinePoint &VFSplinePoint::operator=(VFSplinePoint &&point) Q_DECL_NOTHROW
{
Swap(point);
return *this;
}
#endif
void VFSplinePoint::Swap(VFSplinePoint &point) Q_DECL_NOTHROW
{
std::swap(d, point.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VFSplinePoint::~VFSplinePoint() VFSplinePoint::~VFSplinePoint()
{} {}
@ -220,6 +234,21 @@ VSplinePoint &VSplinePoint::operator=(const VSplinePoint &point)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VSplinePoint &VSplinePoint::operator=(VSplinePoint &&point) Q_DECL_NOTHROW
{
Swap(point);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VSplinePoint::Swap(VSplinePoint &point) Q_DECL_NOTHROW
{
std::swap(d, point.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VSplinePoint::~VSplinePoint() VSplinePoint::~VSplinePoint()
{ {

View File

@ -53,11 +53,10 @@ public:
VFSplinePoint &operator=(const VFSplinePoint &point); VFSplinePoint &operator=(const VFSplinePoint &point);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VFSplinePoint &operator=(VFSplinePoint &&point) Q_DECL_NOTHROW { Swap(point); return *this; } VFSplinePoint &operator=(VFSplinePoint &&point) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VFSplinePoint &point) Q_DECL_NOTHROW void Swap(VFSplinePoint &point) Q_DECL_NOTHROW;
{ std::swap(d, point.d); }
VPointF P() const; VPointF P() const;
void SetP(const VPointF &value); void SetP(const VPointF &value);
@ -93,11 +92,10 @@ public:
VSplinePoint &operator=(const VSplinePoint &point); VSplinePoint &operator=(const VSplinePoint &point);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VSplinePoint &operator=(VSplinePoint &&point) Q_DECL_NOTHROW { Swap(point); return *this; } VSplinePoint &operator=(VSplinePoint &&point) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VSplinePoint &point) Q_DECL_NOTHROW void Swap(VSplinePoint &point) Q_DECL_NOTHROW;
{ std::swap(d, point.d); }
VPointF P() const; VPointF P() const;
void SetP(const VPointF &value); void SetP(const VPointF &value);

View File

@ -918,6 +918,21 @@ VAbstractPiece &VAbstractPiece::operator=(const VAbstractPiece &piece)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractPiece &VAbstractPiece::operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW
{
Swap(piece);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VAbstractPiece::Swap(VAbstractPiece &piece) Q_DECL_NOTHROW
{
std::swap(d, piece.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VAbstractPiece::~VAbstractPiece() VAbstractPiece::~VAbstractPiece()
{} {}

View File

@ -57,11 +57,10 @@ public:
VAbstractPiece &operator=(const VAbstractPiece &piece); VAbstractPiece &operator=(const VAbstractPiece &piece);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VAbstractPiece &operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW { Swap(piece); return *this; } VAbstractPiece &operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VAbstractPiece &piece) Q_DECL_NOTHROW void Swap(VAbstractPiece &piece) Q_DECL_NOTHROW;
{ std::swap(d, piece.d); }
QString GetName() const; QString GetName() const;
void SetName(const QString &value); void SetName(const QString &value);

View File

@ -124,6 +124,21 @@ VContour &VContour::operator=(const VContour &contour)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VContour &VContour::operator=(VContour &&contour) Q_DECL_NOTHROW
{
Swap(contour);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VContour::Swap(VContour &contour) Q_DECL_NOTHROW
{
std::swap(d, contour.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VContour::~VContour() VContour::~VContour()
{} {}

View File

@ -55,11 +55,10 @@ public:
VContour &operator=(const VContour &contour); VContour &operator=(const VContour &contour);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VContour &operator=(VContour &&contour) Q_DECL_NOTHROW { Swap(contour); return *this; } VContour &operator=(VContour &&contour) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VContour &contour) Q_DECL_NOTHROW void Swap(VContour &contour) Q_DECL_NOTHROW;
{ std::swap(d, contour.d); }
void CeateEmptySheetContour(); void CeateEmptySheetContour();

View File

@ -76,6 +76,21 @@ VLayoutPaper &VLayoutPaper::operator=(const VLayoutPaper &paper)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLayoutPaper &VLayoutPaper::operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW
{
Swap(paper);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VLayoutPaper::Swap(VLayoutPaper &paper) Q_DECL_NOTHROW
{
std::swap(d, paper.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLayoutPaper::~VLayoutPaper() VLayoutPaper::~VLayoutPaper()
{} {}

View File

@ -58,11 +58,10 @@ public:
VLayoutPaper &operator=(const VLayoutPaper &paper); VLayoutPaper &operator=(const VLayoutPaper &paper);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VLayoutPaper &operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW { Swap(paper); return *this; } VLayoutPaper &operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VLayoutPaper &paper) Q_DECL_NOTHROW void Swap(VLayoutPaper &paper) Q_DECL_NOTHROW;
{ std::swap(d, paper.d); }
int GetHeight() const; int GetHeight() const;
void SetHeight(int height); void SetHeight(int height);

View File

@ -404,6 +404,22 @@ VLayoutPiece &VLayoutPiece::operator=(const VLayoutPiece &detail)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLayoutPiece &VLayoutPiece::operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW
{
Swap(detail);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VLayoutPiece::Swap(VLayoutPiece &detail) Q_DECL_NOTHROW
{
VAbstractPiece::Swap(detail);
std::swap(d, detail.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLayoutPiece::~VLayoutPiece() VLayoutPiece::~VLayoutPiece()
{} {}

View File

@ -67,11 +67,10 @@ public:
VLayoutPiece &operator=(const VLayoutPiece &detail); VLayoutPiece &operator=(const VLayoutPiece &detail);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW { Swap(detail); return *this; } VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW;
{ VAbstractPiece::Swap(detail); std::swap(d, detail.d); }
static VLayoutPiece Create(const VPiece &piece, vidtype id, const VContainer *pattern); static VLayoutPiece Create(const VPiece &piece, vidtype id, const VContainer *pattern);

View File

@ -79,6 +79,21 @@ VLayoutPiecePath &VLayoutPiecePath::operator=(const VLayoutPiecePath &path)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLayoutPiecePath &VLayoutPiecePath::operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW
{
Swap(path);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VLayoutPiecePath::Swap(VLayoutPiecePath &path) Q_DECL_NOTHROW
{
std::swap(d, path.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLayoutPiecePath::~VLayoutPiecePath() VLayoutPiecePath::~VLayoutPiecePath()
{ {

View File

@ -47,11 +47,10 @@ public:
VLayoutPiecePath &operator=(const VLayoutPiecePath &path); VLayoutPiecePath &operator=(const VLayoutPiecePath &path);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VLayoutPiecePath &operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; } VLayoutPiecePath &operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VLayoutPiecePath &path) Q_DECL_NOTHROW void Swap(VLayoutPiecePath &path) Q_DECL_NOTHROW;
{ std::swap(d, path.d); }
QPainterPath GetPainterPath() const; QPainterPath GetPainterPath() const;

View File

@ -50,6 +50,21 @@ VAbstractFloatItemData &VAbstractFloatItemData::operator=(const VAbstractFloatIt
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractFloatItemData &VAbstractFloatItemData::operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW
{
Swap(data);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VAbstractFloatItemData::Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW
{
std::swap(d, data.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VAbstractFloatItemData::~VAbstractFloatItemData() VAbstractFloatItemData::~VAbstractFloatItemData()
{} {}

View File

@ -44,11 +44,10 @@ public:
VAbstractFloatItemData &operator=(const VAbstractFloatItemData &data); VAbstractFloatItemData &operator=(const VAbstractFloatItemData &data);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VAbstractFloatItemData &operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VAbstractFloatItemData &operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW void Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW;
{ std::swap(d, data.d); }
// methods, which set and return values of different parameters // methods, which set and return values of different parameters
QPointF GetPos() const; QPointF GetPos() const;

View File

@ -55,6 +55,22 @@ VGrainlineData &VGrainlineData::operator=(const VGrainlineData &data)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VGrainlineData &VGrainlineData::operator=(VGrainlineData &&data) Q_DECL_NOTHROW
{
Swap(data);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VGrainlineData::Swap(VGrainlineData &data) Q_DECL_NOTHROW
{
VAbstractFloatItemData::Swap(data);
std::swap(d, data.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VGrainlineData::~VGrainlineData() VGrainlineData::~VGrainlineData()
{} {}

View File

@ -51,11 +51,10 @@ public:
VGrainlineData &operator=(const VGrainlineData &data); VGrainlineData &operator=(const VGrainlineData &data);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VGrainlineData &operator=(VGrainlineData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VGrainlineData &operator=(VGrainlineData &&data) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VGrainlineData &data) Q_DECL_NOTHROW void Swap(VGrainlineData &data) Q_DECL_NOTHROW;
{ VAbstractFloatItemData::Swap(data); std::swap(d, data.d); }
// methods, which set and return values of different parameters // methods, which set and return values of different parameters
QString GetLength() const; QString GetLength() const;

View File

@ -54,6 +54,22 @@ VPatternLabelData &VPatternLabelData::operator=(const VPatternLabelData &data)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPatternLabelData &VPatternLabelData::operator=(VPatternLabelData &&data) Q_DECL_NOTHROW
{
Swap(data);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPatternLabelData::Swap(VPatternLabelData &data) Q_DECL_NOTHROW
{
VAbstractFloatItemData::Swap(data);
std::swap(d, data.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPatternLabelData::~VPatternLabelData() VPatternLabelData::~VPatternLabelData()
{} {}

View File

@ -48,11 +48,10 @@ public:
VPatternLabelData &operator=(const VPatternLabelData &data); VPatternLabelData &operator=(const VPatternLabelData &data);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPatternLabelData &operator=(VPatternLabelData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VPatternLabelData &operator=(VPatternLabelData &&data) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPatternLabelData &data) Q_DECL_NOTHROW void Swap(VPatternLabelData &data) Q_DECL_NOTHROW;
{ VAbstractFloatItemData::Swap(data); std::swap(d, data.d); }
// methods, which set up label parameters // methods, which set up label parameters
QString GetLabelWidth() const; QString GetLabelWidth() const;

View File

@ -55,6 +55,22 @@ VPieceLabelData &VPieceLabelData::operator=(const VPieceLabelData &data)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPieceLabelData &VPieceLabelData::operator=(VPieceLabelData &&data) Q_DECL_NOTHROW
{
Swap(data);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPieceLabelData::Swap(VPieceLabelData &data) Q_DECL_NOTHROW
{
VPatternLabelData::Swap(data);
std::swap(d, data.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPieceLabelData::~VPieceLabelData() VPieceLabelData::~VPieceLabelData()
{} {}

View File

@ -51,11 +51,10 @@ public:
VPieceLabelData &operator=(const VPieceLabelData &data); VPieceLabelData &operator=(const VPieceLabelData &data);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPieceLabelData &operator=(VPieceLabelData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VPieceLabelData &operator=(VPieceLabelData &&data) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPieceLabelData &data) Q_DECL_NOTHROW void Swap(VPieceLabelData &data) Q_DECL_NOTHROW;
{ VPatternLabelData::Swap(data); std::swap(d, data.d); }
void Clear(); void Clear();

View File

@ -64,6 +64,22 @@ VCurveVariable &VCurveVariable::operator=(const VCurveVariable &var)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VCurveVariable &VCurveVariable::operator=(VCurveVariable &&var) Q_DECL_NOTHROW
{
Swap(var);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VCurveVariable::Swap(VCurveVariable &var) Q_DECL_NOTHROW
{
VInternalVariable::Swap(var);
std::swap(d, var.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VCurveVariable::~VCurveVariable() VCurveVariable::~VCurveVariable()
{} {}

View File

@ -49,11 +49,10 @@ public:
VCurveVariable &operator=(const VCurveVariable &var); VCurveVariable &operator=(const VCurveVariable &var);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VCurveVariable &operator=(VCurveVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VCurveVariable &operator=(VCurveVariable &&var) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VCurveVariable &var) Q_DECL_NOTHROW void Swap(VCurveVariable &var) Q_DECL_NOTHROW;
{ VInternalVariable::Swap(var); std::swap(d, var.d); }
virtual bool Filter(quint32 id) override; virtual bool Filter(quint32 id) override;

View File

@ -70,6 +70,22 @@ VIncrement &VIncrement::operator=(const VIncrement &incr)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VIncrement &VIncrement::operator=(VIncrement &&incr) Q_DECL_NOTHROW
{
Swap(incr);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VIncrement::Swap(VIncrement &incr) Q_DECL_NOTHROW
{
VVariable::Swap(incr);
std::swap(d, incr.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VIncrement::~VIncrement() VIncrement::~VIncrement()
{} {}

View File

@ -54,11 +54,10 @@ public:
VIncrement &operator=(const VIncrement &incr); VIncrement &operator=(const VIncrement &incr);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VIncrement &operator=(VIncrement &&incr) Q_DECL_NOTHROW { Swap(incr); return *this; } VIncrement &operator=(VIncrement &&incr) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VIncrement &incr) Q_DECL_NOTHROW void Swap(VIncrement &incr) Q_DECL_NOTHROW;
{ VVariable::Swap(incr); std::swap(d, incr.d); }
void SetFormula(qreal base, const QString &formula, bool ok); void SetFormula(qreal base, const QString &formula, bool ok);
QString GetFormula() const; QString GetFormula() const;

View File

@ -50,6 +50,21 @@ VInternalVariable &VInternalVariable::operator=(const VInternalVariable &var)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VInternalVariable &VInternalVariable::operator=(VInternalVariable &&var) Q_DECL_NOTHROW
{
Swap(var);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VInternalVariable::Swap(VInternalVariable &var) Q_DECL_NOTHROW
{
std::swap(d, var.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VInternalVariable::~VInternalVariable() VInternalVariable::~VInternalVariable()
{} {}

View File

@ -48,11 +48,10 @@ public:
VInternalVariable &operator=(const VInternalVariable &var); VInternalVariable &operator=(const VInternalVariable &var);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VInternalVariable &operator=(VInternalVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VInternalVariable &operator=(VInternalVariable &&var) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VInternalVariable &var) Q_DECL_NOTHROW void Swap(VInternalVariable &var) Q_DECL_NOTHROW;
{ std::swap(d, var.d); }
virtual qreal GetValue() const; virtual qreal GetValue() const;
virtual qreal* GetValue(); virtual qreal* GetValue();

View File

@ -77,6 +77,22 @@ VLineAngle &VLineAngle::operator=(const VLineAngle &var)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLineAngle &VLineAngle::operator=(VLineAngle &&var) Q_DECL_NOTHROW
{
Swap(var);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VLineAngle::Swap(VLineAngle &var) Q_DECL_NOTHROW
{
VInternalVariable::Swap(var);
std::swap(d, var.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLineAngle::~VLineAngle() VLineAngle::~VLineAngle()
{} {}

View File

@ -50,11 +50,10 @@ public:
VLineAngle &operator=(const VLineAngle &var); VLineAngle &operator=(const VLineAngle &var);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VLineAngle &operator=(VLineAngle &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VLineAngle &operator=(VLineAngle &&var) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VLineAngle &var) Q_DECL_NOTHROW void Swap(VLineAngle &var) Q_DECL_NOTHROW;
{ VInternalVariable::Swap(var); std::swap(d, var.d); }
virtual bool Filter(quint32 id) override; virtual bool Filter(quint32 id) override;
void SetValue(const VPointF *p1, const VPointF *p2); void SetValue(const VPointF *p1, const VPointF *p2);

View File

@ -75,6 +75,22 @@ VLengthLine &VLengthLine::operator=(const VLengthLine &var)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLengthLine &VLengthLine::operator=(VLengthLine &&var) Q_DECL_NOTHROW
{
Swap(var);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VLengthLine::Swap(VLengthLine &var) Q_DECL_NOTHROW
{
VInternalVariable::Swap(var);
std::swap(d, var.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VLengthLine::~VLengthLine() VLengthLine::~VLengthLine()
{} {}

View File

@ -52,11 +52,10 @@ public:
VLengthLine &operator=(const VLengthLine &var); VLengthLine &operator=(const VLengthLine &var);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VLengthLine &operator=(VLengthLine &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VLengthLine &operator=(VLengthLine &&var) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VLengthLine &var) Q_DECL_NOTHROW void Swap(VLengthLine &var) Q_DECL_NOTHROW;
{ VInternalVariable::Swap(var); std::swap(d, var.d); }
virtual bool Filter(quint32 id) override; virtual bool Filter(quint32 id) override;
void SetValue(const VPointF *p1, const VPointF *p2); void SetValue(const VPointF *p1, const VPointF *p2);

View File

@ -92,6 +92,22 @@ VMeasurement &VMeasurement::operator=(const VMeasurement &m)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VMeasurement &VMeasurement::operator=(VMeasurement &&m) Q_DECL_NOTHROW
{
Swap(m);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VMeasurement::Swap(VMeasurement &m) Q_DECL_NOTHROW
{
VVariable::Swap(m);
std::swap(d, m.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VMeasurement::~VMeasurement() VMeasurement::~VMeasurement()
{} {}

View File

@ -62,11 +62,10 @@ public:
VMeasurement &operator=(const VMeasurement &m); VMeasurement &operator=(const VMeasurement &m);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VMeasurement &operator=(VMeasurement &&m) Q_DECL_NOTHROW { Swap(m); return *this; } VMeasurement &operator=(VMeasurement &&m) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VMeasurement &m) Q_DECL_NOTHROW void Swap(VMeasurement &m) Q_DECL_NOTHROW;
{ VVariable::Swap(m); std::swap(d, m.d); }
QString GetGuiText() const; QString GetGuiText() const;

View File

@ -63,6 +63,22 @@ VVariable &VVariable::operator=(const VVariable &var)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VVariable &VVariable::operator=(VVariable &&var) Q_DECL_NOTHROW
{
Swap(var);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VVariable::Swap(VVariable &var) Q_DECL_NOTHROW
{
VInternalVariable::Swap(var);
std::swap(d, var.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VVariable::~VVariable() VVariable::~VVariable()
{} {}

View File

@ -52,11 +52,10 @@ public:
VVariable &operator=(const VVariable &var); VVariable &operator=(const VVariable &var);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VVariable &operator=(VVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VVariable &operator=(VVariable &&var) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VVariable &var) Q_DECL_NOTHROW void Swap(VVariable &var) Q_DECL_NOTHROW;
{ VInternalVariable::Swap(var); std::swap(d, var.d); }
QString GetDescription() const; QString GetDescription() const;
void SetDescription(const QString &desc); void SetDescription(const QString &desc);

View File

@ -130,6 +130,21 @@ VContainer &VContainer::operator =(const VContainer &data)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VContainer &VContainer::operator=(VContainer &&data) Q_DECL_NOTHROW
{
Swap(data);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VContainer::Swap(VContainer &data) Q_DECL_NOTHROW
{
std::swap(d, data.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief VContainer create container from another container * @brief VContainer create container from another container

View File

@ -131,11 +131,10 @@ public:
VContainer &operator=(const VContainer &data); VContainer &operator=(const VContainer &data);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VContainer &operator=(VContainer &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VContainer &operator=(VContainer &&data) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VContainer &data) Q_DECL_NOTHROW void Swap(VContainer &data) Q_DECL_NOTHROW;
{ std::swap(d, data.d); }
static QString UniqueNamespace(); static QString UniqueNamespace();

View File

@ -122,6 +122,21 @@ VNodeDetail &VNodeDetail::operator =(const VNodeDetail &node)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VNodeDetail &VNodeDetail::operator=(VNodeDetail &&node) Q_DECL_NOTHROW
{
Swap(node);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VNodeDetail::Swap(VNodeDetail &node) Q_DECL_NOTHROW
{
std::swap(d, node.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VNodeDetail::~VNodeDetail() VNodeDetail::~VNodeDetail()
{} {}

View File

@ -74,11 +74,10 @@ public:
*/ */
VNodeDetail &operator=(const VNodeDetail &node); VNodeDetail &operator=(const VNodeDetail &node);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VNodeDetail &operator=(VNodeDetail &&node) Q_DECL_NOTHROW { Swap(node); return *this; } VNodeDetail &operator=(VNodeDetail &&node) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VNodeDetail &node) Q_DECL_NOTHROW void Swap(VNodeDetail &node) Q_DECL_NOTHROW;
{ std::swap(d, node.d); }
/** /**
* @brief getId return object id. * @brief getId return object id.

View File

@ -131,6 +131,22 @@ VPiece &VPiece::operator=(const VPiece &piece)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPiece &VPiece::operator=(VPiece &&piece) Q_DECL_NOTHROW
{
Swap(piece);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPiece::Swap(VPiece &piece) Q_DECL_NOTHROW
{
VAbstractPiece::Swap(piece);
std::swap(d, piece.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPiece::~VPiece() VPiece::~VPiece()
{} {}

View File

@ -57,11 +57,10 @@ public:
VPiece &operator=(const VPiece &piece); VPiece &operator=(const VPiece &piece);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPiece &operator=(VPiece &&piece) Q_DECL_NOTHROW { Swap(piece); return *this; } VPiece &operator=(VPiece &&piece) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPiece &piece) Q_DECL_NOTHROW void Swap(VPiece &piece) Q_DECL_NOTHROW;
{ VAbstractPiece::Swap(piece); std::swap(d, piece.d); }
VPiecePath GetPath() const; VPiecePath GetPath() const;
VPiecePath &GetPath(); VPiecePath &GetPath();

View File

@ -65,6 +65,21 @@ VPieceNode &VPieceNode::operator=(const VPieceNode &node)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPieceNode &VPieceNode::operator=(VPieceNode &&node) Q_DECL_NOTHROW
{
Swap(node);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPieceNode::Swap(VPieceNode &node) Q_DECL_NOTHROW
{
std::swap(d, node.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPieceNode::~VPieceNode() VPieceNode::~VPieceNode()
{} {}

View File

@ -49,11 +49,10 @@ public:
VPieceNode &operator=(const VPieceNode &node); VPieceNode &operator=(const VPieceNode &node);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPieceNode &operator=(VPieceNode &&node) Q_DECL_NOTHROW { Swap(node); return *this; } VPieceNode &operator=(VPieceNode &&node) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPieceNode &node) Q_DECL_NOTHROW void Swap(VPieceNode &node) Q_DECL_NOTHROW;
{ std::swap(d, node.d); }
friend QDataStream& operator<<(QDataStream& out, const VPieceNode& p); friend QDataStream& operator<<(QDataStream& out, const VPieceNode& p);
friend QDataStream& operator>>(QDataStream& in, VPieceNode& p); friend QDataStream& operator>>(QDataStream& in, VPieceNode& p);

View File

@ -218,6 +218,21 @@ VPiecePath &VPiecePath::operator=(const VPiecePath &path)
return *this; return *this;
} }
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPiecePath &VPiecePath::operator=(VPiecePath &&path) Q_DECL_NOTHROW
{
Swap(path);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VPiecePath::Swap(VPiecePath &path) Q_DECL_NOTHROW
{
std::swap(d, path.d);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPiecePath::~VPiecePath() VPiecePath::~VPiecePath()
{} {}

View File

@ -54,11 +54,10 @@ public:
VPiecePath &operator=(const VPiecePath &path); VPiecePath &operator=(const VPiecePath &path);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
VPiecePath &operator=(VPiecePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; } VPiecePath &operator=(VPiecePath &&path) Q_DECL_NOTHROW;
#endif #endif
inline void Swap(VPiecePath &path) Q_DECL_NOTHROW void Swap(VPiecePath &path) Q_DECL_NOTHROW;
{ std::swap(d, path.d); }
void Append(const VPieceNode &node); void Append(const VPieceNode &node);
void Clear(); void Clear();