Refactoring. Added move constructor.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-12-30 17:13:18 +02:00
parent 54cb9fe0fb
commit 84001dac61
70 changed files with 277 additions and 345 deletions

View File

@ -209,20 +209,19 @@ QmuParserCallback &QmuParserCallback::operator=(const QmuParserCallback &a_Fun)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
QmuParserCallback::QmuParserCallback(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW
: d (a_Fun.d)
{}
//---------------------------------------------------------------------------------------------------------------------
QmuParserCallback &QmuParserCallback::operator=(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW
{
Swap(a_Fun);
std::swap(d, a_Fun.d);
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(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW;
QmuParserCallback &operator=(QmuParserCallback &&a_Fun) Q_DECL_NOTHROW;
#endif
void Swap(QmuParserCallback &a_Fun) Q_DECL_NOTHROW;
Q_REQUIRED_RESULT QmuParserCallback* Clone() const;
bool IsOptimizable() const;

View File

@ -79,21 +79,20 @@ VAbstractArc &VAbstractArc::operator=(const VAbstractArc &arc)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractArc::VAbstractArc(VAbstractArc &&arc) Q_DECL_NOTHROW
: VAbstractCurve(arc), d (arc.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VAbstractArc &VAbstractArc::operator=(VAbstractArc &&arc) Q_DECL_NOTHROW
{
Swap(arc);
VAbstractCurve::operator=(arc);
std::swap(d, arc.d);
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(VAbstractArc &&arc) Q_DECL_NOTHROW;
VAbstractArc &operator=(VAbstractArc &&arc) Q_DECL_NOTHROW;
#endif
void Swap(VAbstractArc &arc) Q_DECL_NOTHROW;
QString GetFormulaF1 () const;
void SetFormulaF1 (const QString &formula, qreal value);
virtual qreal GetStartAngle () const override;

View File

@ -60,21 +60,20 @@ VAbstractCurve &VAbstractCurve::operator=(const VAbstractCurve &curve)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractCurve::VAbstractCurve(VAbstractCurve &&curve) Q_DECL_NOTHROW
:VGObject(curve), d (curve.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VAbstractCurve &VAbstractCurve::operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW
{
Swap(curve);
VGObject::operator=(curve);
std::swap(d, curve.d);
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(VAbstractCurve &&curve) Q_DECL_NOTHROW;
VAbstractCurve &operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW;
#endif
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,
bool reverse = false);

View File

@ -117,22 +117,20 @@ VArc &VArc::operator =(const VArc &arc)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VArc::VArc(VArc &&arc) Q_DECL_NOTHROW
: VAbstractArc(arc), d (arc.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VArc &VArc::operator=(VArc &&arc) Q_DECL_NOTHROW
{
Swap(arc);
VAbstractArc::operator=(arc);
std::swap(d, arc.d);
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(VArc &&arc) Q_DECL_NOTHROW;
VArc &operator=(VArc &&arc) Q_DECL_NOTHROW;
#endif
void Swap(VArc &arc) Q_DECL_NOTHROW;
QString GetFormulaRadius () const;
void SetFormulaRadius (const QString &formula, qreal value);
qreal GetRadius () const;

View File

@ -65,21 +65,20 @@ VCubicBezier &VCubicBezier::operator=(const VCubicBezier &curve)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VCubicBezier::VCubicBezier(const VCubicBezier &&curve) Q_DECL_NOTHROW
: VAbstractCubicBezier(curve), d(curve.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VCubicBezier &VCubicBezier::operator=(VCubicBezier &&curve) Q_DECL_NOTHROW
{
Swap(curve);
VAbstractCubicBezier::operator=(curve);
std::swap(d, curve.d);
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(const VCubicBezier &&curve) Q_DECL_NOTHROW;
VCubicBezier &operator=(VCubicBezier &&curve) Q_DECL_NOTHROW;
#endif
void Swap(VCubicBezier &curve) Q_DECL_NOTHROW;
virtual VPointF GetP1() const override;
void SetP1(const VPointF &p);

View File

@ -79,21 +79,21 @@ VCubicBezierPath &VCubicBezierPath::operator=(const VCubicBezierPath &curve)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VCubicBezierPath::VCubicBezierPath(const VCubicBezierPath &&curve) Q_DECL_NOTHROW
: VAbstractCubicBezierPath(curve),
d(curve.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VCubicBezierPath &VCubicBezierPath::operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW
{
Swap(curve);
VAbstractCubicBezierPath::operator=(curve);
std::swap(d, curve.d);
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(const VCubicBezierPath &&curve) Q_DECL_NOTHROW;
VCubicBezierPath &operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW;
#endif
void Swap(VCubicBezierPath &curve) Q_DECL_NOTHROW;
VPointF &operator[](int indx);
const VPointF &at(int indx) const;

View File

@ -124,21 +124,20 @@ VEllipticalArc &VEllipticalArc::operator =(const VEllipticalArc &arc)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VEllipticalArc::VEllipticalArc(const VEllipticalArc &&arc) Q_DECL_NOTHROW
: VAbstractArc(arc), d (arc.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VEllipticalArc &VEllipticalArc::operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW
{
Swap(arc);
VAbstractArc::operator=(arc);
std::swap(d, arc.d);
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(const VEllipticalArc &&arc) Q_DECL_NOTHROW;
VEllipticalArc &operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW;
#endif
void Swap(VEllipticalArc &arc) Q_DECL_NOTHROW;
QString GetFormulaRotationAngle () const;
void SetFormulaRotationAngle (const QString &formula, qreal value);
qreal GetRotationAngle() const;

View File

@ -128,21 +128,19 @@ VGObject &VGObject::operator=(const VGObject &obj)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VGObject::VGObject(const VGObject &&obj) Q_DECL_NOTHROW
:d (obj.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VGObject &VGObject::operator=(VGObject &&obj) Q_DECL_NOTHROW
{
Swap(obj);
std::swap(d, obj.d);
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(const VGObject &&obj) Q_DECL_NOTHROW;
VGObject &operator=(VGObject &&obj) Q_DECL_NOTHROW;
#endif
void Swap(VGObject &obj) Q_DECL_NOTHROW;
quint32 getIdObject() const;
void setIdObject(const quint32 &value);

View File

@ -226,21 +226,20 @@ VPlaceLabelItem &VPlaceLabelItem::operator=(const VPlaceLabelItem &item)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPlaceLabelItem::VPlaceLabelItem(const VPlaceLabelItem &&item) Q_DECL_NOTHROW
: VPointF(item), d(item.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPlaceLabelItem &VPlaceLabelItem::operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW
{
Swap(item);
VPointF::operator=(item);
std::swap(d, item.d);
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(const VPlaceLabelItem &&item) Q_DECL_NOTHROW;
VPlaceLabelItem &operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW;
#endif
void Swap(VPlaceLabelItem &item) Q_DECL_NOTHROW;
QString GetWidthFormula() const;
QString& GetWidthFormula();
qreal GetWidth() const;

View File

@ -103,21 +103,20 @@ VPointF &VPointF::operator =(const VPointF &point)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPointF::VPointF(const VPointF &&point) Q_DECL_NOTHROW
:VGObject(point), d(point.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPointF &VPointF::operator=(VPointF &&point) Q_DECL_NOTHROW
{
Swap(point);
VGObject::operator=(point);
std::swap(d, point.d);
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(const VPointF &&point) Q_DECL_NOTHROW;
VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW;
#endif
void Swap(VPointF &point) Q_DECL_NOTHROW;
explicit operator QPointF() const;
VPointF Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix = QString()) const;
VPointF Flip(const QLineF &axis, const QString &prefix = QString()) const;

View File

@ -248,21 +248,20 @@ VSpline &VSpline::operator =(const VSpline &spline)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VSpline::VSpline(const VSpline &&spline) Q_DECL_NOTHROW
:VAbstractCubicBezier(spline), d(spline.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VSpline &VSpline::operator=(VSpline &&spline) Q_DECL_NOTHROW
{
Swap(spline);
VAbstractCubicBezier::operator=(spline);
std::swap(d, spline.d);
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(const VSpline &&spline) Q_DECL_NOTHROW;
VSpline &operator=(VSpline &&spline) Q_DECL_NOTHROW;
#endif
void Swap(VSpline &spline) Q_DECL_NOTHROW;
virtual VPointF GetP1 () const override;
void SetP1 (const VPointF &p);

View File

@ -304,21 +304,21 @@ VSplinePath &VSplinePath::operator =(const VSplinePath &path)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VSplinePath::VSplinePath(const VSplinePath &&splPath) Q_DECL_NOTHROW
: VAbstractCubicBezierPath(splPath),
d(splPath.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VSplinePath &VSplinePath::operator=(VSplinePath &&path) Q_DECL_NOTHROW
{
Swap(path);
VAbstractCubicBezierPath::operator=(path);
std::swap(d, path.d);
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(const VSplinePath&& splPath) Q_DECL_NOTHROW;
VSplinePath &operator=(VSplinePath &&path) Q_DECL_NOTHROW;
#endif
void Swap(VSplinePath &path) Q_DECL_NOTHROW;
void append(const VSplinePoint &point);
virtual qint32 CountSubSpl() const override;

View File

@ -76,19 +76,19 @@ VFSplinePoint &VFSplinePoint::operator=(const VFSplinePoint &point)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VFSplinePoint::VFSplinePoint(const VFSplinePoint &&point) Q_DECL_NOTHROW
:d(point.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VFSplinePoint &VFSplinePoint::operator=(VFSplinePoint &&point) Q_DECL_NOTHROW
{
Swap(point);
std::swap(d, point.d);
return *this;
}
#endif
void VFSplinePoint::Swap(VFSplinePoint &point) Q_DECL_NOTHROW
{
std::swap(d, point.d);
}
//---------------------------------------------------------------------------------------------------------------------
VFSplinePoint::~VFSplinePoint()
{}
@ -235,20 +235,19 @@ VSplinePoint &VSplinePoint::operator=(const VSplinePoint &point)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VSplinePoint::VSplinePoint(const VSplinePoint &&point) Q_DECL_NOTHROW
: d(point.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VSplinePoint &VSplinePoint::operator=(VSplinePoint &&point) Q_DECL_NOTHROW
{
Swap(point);
std::swap(d, point.d);
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(const VFSplinePoint &&point) Q_DECL_NOTHROW;
VFSplinePoint &operator=(VFSplinePoint &&point) Q_DECL_NOTHROW;
#endif
void Swap(VFSplinePoint &point) Q_DECL_NOTHROW;
VPointF P() const;
void SetP(const VPointF &value);
qreal Angle1() const;
@ -92,11 +91,10 @@ public:
VSplinePoint &operator=(const VSplinePoint &point);
#ifdef Q_COMPILER_RVALUE_REFS
VSplinePoint(const VSplinePoint &&point) Q_DECL_NOTHROW;
VSplinePoint &operator=(VSplinePoint &&point) Q_DECL_NOTHROW;
#endif
void Swap(VSplinePoint &point) Q_DECL_NOTHROW;
VPointF P() const;
void SetP(const VPointF &value);

View File

@ -919,20 +919,19 @@ VAbstractPiece &VAbstractPiece::operator=(const VAbstractPiece &piece)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractPiece::VAbstractPiece(const VAbstractPiece &&piece) Q_DECL_NOTHROW
:d (piece.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VAbstractPiece &VAbstractPiece::operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW
{
Swap(piece);
std::swap(d, piece.d);
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(const VAbstractPiece &&piece) Q_DECL_NOTHROW;
VAbstractPiece &operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW;
#endif
void Swap(VAbstractPiece &piece) Q_DECL_NOTHROW;
QString GetName() const;
void SetName(const QString &value);

View File

@ -72,20 +72,19 @@ VBestSquare &VBestSquare::operator=(const VBestSquare &res)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VBestSquare::VBestSquare(const VBestSquare &&res) Q_DECL_NOTHROW
: d(res.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VBestSquare &VBestSquare::operator=(VBestSquare &&res) Q_DECL_NOTHROW
{
Swap(res);
std::swap(d, res.d);
return *this;
}
#endif
//---------------------------------------------------------------------------------------------------------------------
void VBestSquare::Swap(VBestSquare &res) Q_DECL_NOTHROW
{
std::swap(d, res.d);
}
//---------------------------------------------------------------------------------------------------------------------
void VBestSquare::NewResult(const VBestSquareResData &data)
{

View File

@ -49,11 +49,10 @@ public:
VBestSquare &operator=(const VBestSquare &res);
#ifdef Q_COMPILER_RVALUE_REFS
VBestSquare(const VBestSquare &&res) Q_DECL_NOTHROW;
VBestSquare &operator=(VBestSquare &&res) Q_DECL_NOTHROW;
#endif
void Swap(VBestSquare &res) Q_DECL_NOTHROW;
void NewResult(const VBestSquareResData &data);
void NewResult(const VBestSquare &best);

View File

@ -125,20 +125,19 @@ VContour &VContour::operator=(const VContour &contour)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VContour::VContour(const VContour &&contour) Q_DECL_NOTHROW
:d (contour.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VContour &VContour::operator=(VContour &&contour) Q_DECL_NOTHROW
{
Swap(contour);
std::swap(d, contour.d);
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(const VContour &&contour) Q_DECL_NOTHROW;
VContour &operator=(VContour &&contour) Q_DECL_NOTHROW;
#endif
void Swap(VContour &contour) Q_DECL_NOTHROW;
void CeateEmptySheetContour();
void SetContour(const QVector<QPointF> &contour);

View File

@ -77,20 +77,19 @@ VLayoutPaper &VLayoutPaper::operator=(const VLayoutPaper &paper)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLayoutPaper::VLayoutPaper(const VLayoutPaper &&paper) Q_DECL_NOTHROW
:d (paper.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VLayoutPaper &VLayoutPaper::operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW
{
Swap(paper);
std::swap(d, paper.d);
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(const VLayoutPaper &&paper) Q_DECL_NOTHROW;
VLayoutPaper &operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW;
#endif
void Swap(VLayoutPaper &paper) Q_DECL_NOTHROW;
int GetHeight() const;
void SetHeight(int height);

View File

@ -405,21 +405,20 @@ VLayoutPiece &VLayoutPiece::operator=(const VLayoutPiece &detail)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLayoutPiece::VLayoutPiece(const VLayoutPiece &&detail) Q_DECL_NOTHROW
:VAbstractPiece(detail), d(detail.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VLayoutPiece &VLayoutPiece::operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW
{
Swap(detail);
VAbstractPiece::operator=(detail);
std::swap(d, detail.d);
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(const VLayoutPiece &&detail) Q_DECL_NOTHROW;
VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW;
#endif
void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW;
static VLayoutPiece Create(const VPiece &piece, vidtype id, const VContainer *pattern);
QVector<QPointF> GetMappedContourPoints() const;

View File

@ -80,20 +80,19 @@ VLayoutPiecePath &VLayoutPiecePath::operator=(const VLayoutPiecePath &path)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLayoutPiecePath::VLayoutPiecePath(const VLayoutPiecePath &&path) Q_DECL_NOTHROW
: d(path.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VLayoutPiecePath &VLayoutPiecePath::operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW
{
Swap(path);
std::swap(d, path.d);
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(const VLayoutPiecePath &&path) Q_DECL_NOTHROW;
VLayoutPiecePath &operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW;
#endif
void Swap(VLayoutPiecePath &path) Q_DECL_NOTHROW;
QPainterPath GetPainterPath() const;
QVector<QPointF> Points() const;

View File

@ -51,20 +51,19 @@ VAbstractFloatItemData &VAbstractFloatItemData::operator=(const VAbstractFloatIt
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VAbstractFloatItemData::VAbstractFloatItemData(const VAbstractFloatItemData &&data) Q_DECL_NOTHROW
: d (data.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VAbstractFloatItemData &VAbstractFloatItemData::operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW
{
Swap(data);
std::swap(d, data.d);
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(const VAbstractFloatItemData &&data) Q_DECL_NOTHROW;
VAbstractFloatItemData &operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW;
#endif
void Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW;
// methods, which set and return values of different parameters
QPointF GetPos() const;
void SetPos(const QPointF& ptPos);

View File

@ -56,21 +56,21 @@ VGrainlineData &VGrainlineData::operator=(const VGrainlineData &data)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VGrainlineData::VGrainlineData(const VGrainlineData &&data) Q_DECL_NOTHROW
: VAbstractFloatItemData(data),
d (data.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VGrainlineData &VGrainlineData::operator=(VGrainlineData &&data) Q_DECL_NOTHROW
{
Swap(data);
VAbstractFloatItemData::operator=(data);
std::swap(d, data.d);
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(const VGrainlineData &&data) Q_DECL_NOTHROW;
VGrainlineData &operator=(VGrainlineData &&data) Q_DECL_NOTHROW;
#endif
void Swap(VGrainlineData &data) Q_DECL_NOTHROW;
// methods, which set and return values of different parameters
QString GetLength() const;
void SetLength(const QString& qsLen);

View File

@ -55,21 +55,21 @@ VPatternLabelData &VPatternLabelData::operator=(const VPatternLabelData &data)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPatternLabelData::VPatternLabelData(const VPatternLabelData &&data) Q_DECL_NOTHROW
: VAbstractFloatItemData(data),
d (data.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPatternLabelData &VPatternLabelData::operator=(VPatternLabelData &&data) Q_DECL_NOTHROW
{
Swap(data);
VAbstractFloatItemData::operator=(data);
std::swap(d, data.d);
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(const VPatternLabelData &&data) Q_DECL_NOTHROW;
VPatternLabelData &operator=(VPatternLabelData &&data) Q_DECL_NOTHROW;
#endif
void Swap(VPatternLabelData &data) Q_DECL_NOTHROW;
// methods, which set up label parameters
QString GetLabelWidth() const;
void SetLabelWidth(const QString &dLabelW);

View File

@ -56,21 +56,21 @@ VPieceLabelData &VPieceLabelData::operator=(const VPieceLabelData &data)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPieceLabelData::VPieceLabelData(const VPieceLabelData &&data) Q_DECL_NOTHROW
: VPatternLabelData(data),
d (data.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPieceLabelData &VPieceLabelData::operator=(VPieceLabelData &&data) Q_DECL_NOTHROW
{
Swap(data);
VPatternLabelData::operator=(data);
std::swap(d, data.d);
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(const VPieceLabelData &&data) Q_DECL_NOTHROW;
VPieceLabelData &operator=(VPieceLabelData &&data) Q_DECL_NOTHROW;
#endif
void Swap(VPieceLabelData &data) Q_DECL_NOTHROW;
void Clear();
// methods, which operate on other members

View File

@ -65,21 +65,20 @@ VCurveVariable &VCurveVariable::operator=(const VCurveVariable &var)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VCurveVariable::VCurveVariable(const VCurveVariable &&var) Q_DECL_NOTHROW
:VInternalVariable(var), d(var.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VCurveVariable &VCurveVariable::operator=(VCurveVariable &&var) Q_DECL_NOTHROW
{
Swap(var);
VInternalVariable::operator=(var);
std::swap(d, var.d);
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(const VCurveVariable &&var) Q_DECL_NOTHROW;
VCurveVariable &operator=(VCurveVariable &&var) Q_DECL_NOTHROW;
#endif
void Swap(VCurveVariable &var) Q_DECL_NOTHROW;
virtual bool Filter(quint32 id) override;
quint32 GetId() const;

View File

@ -71,21 +71,20 @@ VIncrement &VIncrement::operator=(const VIncrement &incr)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VIncrement::VIncrement(const VIncrement &&incr) Q_DECL_NOTHROW
:VVariable(incr), d(incr.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VIncrement &VIncrement::operator=(VIncrement &&incr) Q_DECL_NOTHROW
{
Swap(incr);
VVariable::operator=(incr);
std::swap(d, incr.d);
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(const VIncrement &&incr) Q_DECL_NOTHROW;
VIncrement &operator=(VIncrement &&incr) Q_DECL_NOTHROW;
#endif
void Swap(VIncrement &incr) Q_DECL_NOTHROW;
void SetFormula(qreal base, const QString &formula, bool ok);
QString GetFormula() const;
bool IsFormulaOk() const;

View File

@ -50,21 +50,20 @@ VInternalVariable &VInternalVariable::operator=(const VInternalVariable &var)
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
VInternalVariable::VInternalVariable(const VInternalVariable &&var) Q_DECL_NOTHROW
:d(var.d)
{}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VInternalVariable &VInternalVariable::operator=(VInternalVariable &&var) Q_DECL_NOTHROW
{
Swap(var);
std::swap(d, var.d);
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(const VInternalVariable &&var) Q_DECL_NOTHROW;
VInternalVariable &operator=(VInternalVariable &&var) Q_DECL_NOTHROW;
#endif
void Swap(VInternalVariable &var) Q_DECL_NOTHROW;
virtual qreal GetValue() const;
virtual qreal* GetValue();

View File

@ -77,22 +77,21 @@ VLineAngle &VLineAngle::operator=(const VLineAngle &var)
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
VLineAngle::VLineAngle(const VLineAngle &&var) Q_DECL_NOTHROW
:VInternalVariable(var), d(var.d)
{}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLineAngle &VLineAngle::operator=(VLineAngle &&var) Q_DECL_NOTHROW
{
Swap(var);
VInternalVariable::operator=(var);
std::swap(d, var.d);
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(const VLineAngle &&var) Q_DECL_NOTHROW;
VLineAngle &operator=(VLineAngle &&var) Q_DECL_NOTHROW;
#endif
void Swap(VLineAngle &var) Q_DECL_NOTHROW;
virtual bool Filter(quint32 id) override;
void SetValue(const VPointF *p1, const VPointF *p2);
quint32 GetP1Id() const;

View File

@ -75,22 +75,21 @@ VLengthLine &VLengthLine::operator=(const VLengthLine &var)
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
VLengthLine::VLengthLine(const VLengthLine &&var) Q_DECL_NOTHROW
:VInternalVariable(var), d(var.d)
{}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VLengthLine &VLengthLine::operator=(VLengthLine &&var) Q_DECL_NOTHROW
{
Swap(var);
VInternalVariable::operator=(var);
std::swap(d, var.d);
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(const VLengthLine &&var) Q_DECL_NOTHROW;
VLengthLine &operator=(VLengthLine &&var) Q_DECL_NOTHROW;
#endif
void Swap(VLengthLine &var) Q_DECL_NOTHROW;
virtual bool Filter(quint32 id) override;
void SetValue(const VPointF *p1, const VPointF *p2);
quint32 GetP1Id() const;

View File

@ -93,21 +93,20 @@ VMeasurement &VMeasurement::operator=(const VMeasurement &m)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VMeasurement::VMeasurement(const VMeasurement &&m) Q_DECL_NOTHROW
:VVariable(m), d(m.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VMeasurement &VMeasurement::operator=(VMeasurement &&m) Q_DECL_NOTHROW
{
Swap(m);
VVariable::operator=(m);
std::swap(d, m.d);
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(const VMeasurement &&m) Q_DECL_NOTHROW;
VMeasurement &operator=(VMeasurement &&m) Q_DECL_NOTHROW;
#endif
void Swap(VMeasurement &m) Q_DECL_NOTHROW;
QString GetGuiText() const;
QString TagName() const;

View File

@ -64,21 +64,20 @@ VVariable &VVariable::operator=(const VVariable &var)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VVariable::VVariable(const VVariable &&var) Q_DECL_NOTHROW
:VInternalVariable(var), d(var.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VVariable &VVariable::operator=(VVariable &&var) Q_DECL_NOTHROW
{
Swap(var);
VInternalVariable::operator=(var);
std::swap(d, var.d);
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(const VVariable &&var) Q_DECL_NOTHROW;
VVariable &operator=(VVariable &&var) Q_DECL_NOTHROW;
#endif
void Swap(VVariable &var) Q_DECL_NOTHROW;
QString GetDescription() const;
void SetDescription(const QString &desc);

View File

@ -131,20 +131,19 @@ VContainer &VContainer::operator =(const VContainer &data)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VContainer::VContainer(const VContainer &&data) Q_DECL_NOTHROW
:d(data.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VContainer &VContainer::operator=(VContainer &&data) Q_DECL_NOTHROW
{
Swap(data);
std::swap(d, data.d);
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(const VContainer &&data) Q_DECL_NOTHROW;
VContainer &operator=(VContainer &&data) Q_DECL_NOTHROW;
#endif
void Swap(VContainer &data) Q_DECL_NOTHROW;
static QString UniqueNamespace();
template <typename T>

View File

@ -123,20 +123,19 @@ VNodeDetail &VNodeDetail::operator =(const VNodeDetail &node)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VNodeDetail::VNodeDetail(const VNodeDetail &&node) Q_DECL_NOTHROW
:d (node.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VNodeDetail &VNodeDetail::operator=(VNodeDetail &&node) Q_DECL_NOTHROW
{
Swap(node);
std::swap(d, node.d);
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(const VNodeDetail &&node) Q_DECL_NOTHROW;
VNodeDetail &operator=(VNodeDetail &&node) Q_DECL_NOTHROW;
#endif
void Swap(VNodeDetail &node) Q_DECL_NOTHROW;
/**
* @brief getId return object id.
* @return id.

View File

@ -132,21 +132,20 @@ VPiece &VPiece::operator=(const VPiece &piece)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPiece::VPiece(const VPiece &&piece) Q_DECL_NOTHROW
: VAbstractPiece(piece), d (piece.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPiece &VPiece::operator=(VPiece &&piece) Q_DECL_NOTHROW
{
Swap(piece);
VAbstractPiece::operator=(piece);
std::swap(d, piece.d);
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(const VPiece &&piece) Q_DECL_NOTHROW;
VPiece &operator=(VPiece &&piece) Q_DECL_NOTHROW;
#endif
void Swap(VPiece &piece) Q_DECL_NOTHROW;
VPiecePath GetPath() const;
VPiecePath &GetPath();
void SetPath(const VPiecePath &path);

View File

@ -66,20 +66,19 @@ VPieceNode &VPieceNode::operator=(const VPieceNode &node)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPieceNode::VPieceNode(const VPieceNode &&node) Q_DECL_NOTHROW
: d (node.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPieceNode &VPieceNode::operator=(VPieceNode &&node) Q_DECL_NOTHROW
{
Swap(node);
std::swap(d, node.d);
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(const VPieceNode &&node) Q_DECL_NOTHROW;
VPieceNode &operator=(VPieceNode &&node) Q_DECL_NOTHROW;
#endif
void Swap(VPieceNode &node) Q_DECL_NOTHROW;
friend QDataStream& operator<<(QDataStream& out, const VPieceNode& p);
friend QDataStream& operator>>(QDataStream& in, VPieceNode& p);

View File

@ -219,20 +219,19 @@ VPiecePath &VPiecePath::operator=(const VPiecePath &path)
}
#ifdef Q_COMPILER_RVALUE_REFS
//---------------------------------------------------------------------------------------------------------------------
VPiecePath::VPiecePath(const VPiecePath &&path) Q_DECL_NOTHROW
: d (path.d)
{}
//---------------------------------------------------------------------------------------------------------------------
VPiecePath &VPiecePath::operator=(VPiecePath &&path) Q_DECL_NOTHROW
{
Swap(path);
std::swap(d, path.d);
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(const VPiecePath &&path) Q_DECL_NOTHROW;
VPiecePath &operator=(VPiecePath &&path) Q_DECL_NOTHROW;
#endif
void Swap(VPiecePath &path) Q_DECL_NOTHROW;
void Append(const VPieceNode &node);
void Clear();
qint32 CountNodes() const;