Sketcher: Constraint improvements

=================================

Copy constructor made private, as copies are handled via copy() and clone() methods which generate pointers, not objects.
Private copy constructor, used for copy(),  made default implementation.
Destructor made default.
Copy and Clone made non-virtual, as the class does not have children.
Added override to persistance inherited virtual functions.
move operators explicitly disallowed to note that they are not intended in the current implementation.

Perfectly ok to have only private copy constructor for internal use
This commit is contained in:
Abdullah Tahiri
2019-04-07 15:47:09 +02:00
committed by wmayer
parent 504a687ad6
commit 2fabda1605
2 changed files with 23 additions and 34 deletions

View File

@@ -74,30 +74,6 @@ Constraint::Constraint()
tag = gen();
}
Constraint::Constraint(const Constraint& from)
: Value(from.Value),
Type(from.Type),
AlignmentType(from.AlignmentType),
Name(from.Name),
First(from.First),
FirstPos(from.FirstPos),
Second(from.Second),
SecondPos(from.SecondPos),
Third(from.Third),
ThirdPos(from.ThirdPos),
LabelDistance(from.LabelDistance),
LabelPosition(from.LabelPosition),
isDriving(from.isDriving),
InternalAlignmentIndex(from.InternalAlignmentIndex),
isInVirtualSpace(from.isInVirtualSpace),
tag(from.tag)
{
}
Constraint::~Constraint()
{
}
Constraint *Constraint::clone(void) const
{
return new Constraint(*this);