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;
}
#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.

View File

@ -86,11 +86,10 @@ public:
QmuParserCallback &operator=(const QmuParserCallback &a_Fun);
#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
inline void Swap(QmuParserCallback &a_Fun) Q_DECL_NOTHROW
{ std::swap(d, a_Fun.d); }
void Swap(QmuParserCallback &a_Fun) Q_DECL_NOTHROW;
Q_REQUIRED_RESULT QmuParserCallback* Clone() const;

View File

@ -78,6 +78,22 @@ VAbstractArc &VAbstractArc::operator=(const VAbstractArc &arc)
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()
{}

View File

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

View File

@ -59,6 +59,22 @@ VAbstractCurve &VAbstractCurve::operator=(const VAbstractCurve &curve)
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()
{}

View File

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

View File

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

View File

@ -64,6 +64,22 @@ VCubicBezier &VCubicBezier::operator=(const VCubicBezier &curve)
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
{

View File

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

View File

@ -78,6 +78,22 @@ VCubicBezierPath &VCubicBezierPath::operator=(const VCubicBezierPath &curve)
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
{

View File

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

View File

@ -123,6 +123,22 @@ VEllipticalArc &VEllipticalArc::operator =(const VEllipticalArc &arc)
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
{

View File

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

View File

@ -127,6 +127,22 @@ VGObject &VGObject::operator=(const VGObject &obj)
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()
{}

View File

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

View File

@ -225,6 +225,22 @@ VPlaceLabelItem &VPlaceLabelItem::operator=(const VPlaceLabelItem &item)
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
{

View File

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

View File

@ -102,6 +102,22 @@ VPointF &VPointF::operator =(const VPointF &point)
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
{

View File

@ -62,11 +62,10 @@ public:
VPointF &operator=(const VPointF &point);
#ifdef Q_COMPILER_RVALUE_REFS
VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW { Swap(point); return *this; }
VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW;
#endif
inline void Swap(VPointF &point) Q_DECL_NOTHROW
{ VGObject::Swap(point); std::swap(d, point.d); }
void Swap(VPointF &point) Q_DECL_NOTHROW;
explicit operator QPointF() 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;
}
#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.

View File

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

View File

@ -303,6 +303,22 @@ VSplinePath &VSplinePath::operator =(const VSplinePath &path)
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.

View File

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

View File

@ -75,6 +75,20 @@ VFSplinePoint &VFSplinePoint::operator=(const VFSplinePoint &point)
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()
{}
@ -220,6 +234,21 @@ VSplinePoint &VSplinePoint::operator=(const VSplinePoint &point)
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()
{

View File

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

View File

@ -918,6 +918,21 @@ VAbstractPiece &VAbstractPiece::operator=(const VAbstractPiece &piece)
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()
{}

View File

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

View File

@ -124,6 +124,21 @@ VContour &VContour::operator=(const VContour &contour)
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()
{}

View File

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

View File

@ -76,6 +76,21 @@ VLayoutPaper &VLayoutPaper::operator=(const VLayoutPaper &paper)
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()
{}

View File

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

View File

@ -404,6 +404,22 @@ VLayoutPiece &VLayoutPiece::operator=(const VLayoutPiece &detail)
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()
{}

View File

@ -67,11 +67,10 @@ public:
VLayoutPiece &operator=(const VLayoutPiece &detail);
#ifdef Q_COMPILER_RVALUE_REFS
VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW { Swap(detail); return *this; }
VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW;
#endif
inline void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW
{ VAbstractPiece::Swap(detail); std::swap(d, detail.d); }
void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW;
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;
}
#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()
{

View File

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

View File

@ -50,6 +50,21 @@ VAbstractFloatItemData &VAbstractFloatItemData::operator=(const VAbstractFloatIt
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()
{}

View File

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

View File

@ -55,6 +55,22 @@ VGrainlineData &VGrainlineData::operator=(const VGrainlineData &data)
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()
{}

View File

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

View File

@ -54,6 +54,22 @@ VPatternLabelData &VPatternLabelData::operator=(const VPatternLabelData &data)
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()
{}

View File

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

View File

@ -55,6 +55,22 @@ VPieceLabelData &VPieceLabelData::operator=(const VPieceLabelData &data)
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()
{}

View File

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

View File

@ -64,6 +64,22 @@ VCurveVariable &VCurveVariable::operator=(const VCurveVariable &var)
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()
{}

View File

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

View File

@ -70,6 +70,22 @@ VIncrement &VIncrement::operator=(const VIncrement &incr)
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()
{}

View File

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

View File

@ -50,6 +50,21 @@ VInternalVariable &VInternalVariable::operator=(const VInternalVariable &var)
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()
{}

View File

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

View File

@ -77,6 +77,22 @@ VLineAngle &VLineAngle::operator=(const VLineAngle &var)
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()
{}

View File

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

View File

@ -75,6 +75,22 @@ VLengthLine &VLengthLine::operator=(const VLengthLine &var)
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()
{}

View File

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

View File

@ -92,6 +92,22 @@ VMeasurement &VMeasurement::operator=(const VMeasurement &m)
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()
{}

View File

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

View File

@ -63,6 +63,22 @@ VVariable &VVariable::operator=(const VVariable &var)
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()
{}

View File

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

View File

@ -130,6 +130,21 @@ VContainer &VContainer::operator =(const VContainer &data)
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

View File

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

View File

@ -122,6 +122,21 @@ VNodeDetail &VNodeDetail::operator =(const VNodeDetail &node)
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()
{}

View File

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

View File

@ -131,6 +131,22 @@ VPiece &VPiece::operator=(const VPiece &piece)
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()
{}

View File

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

View File

@ -65,6 +65,21 @@ VPieceNode &VPieceNode::operator=(const VPieceNode &node)
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()
{}

View File

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

View File

@ -218,6 +218,21 @@ VPiecePath &VPiecePath::operator=(const VPiecePath &path)
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()
{}

View File

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