TransformationChain is for now not copyable since it works with unique pointers that prohibit that.
But the base problem is that we store pointers/references to unknown Transformation types (we only know they have the base type CE3D::Transformation::Transformation).
For now the copy constructor should be deactivated. But you should be able to copy your TransformationChain. So there is just one possibility to enable such a behaviour (or two depending how you want actually implement it):
Override each object/class/whatever from our CE3D::Object that contains Clone(). Clone() returns a copy of the object.
Maybe a bit better: Define an IClonable interface with one member function: also Clone(). Classes that need this feature can then just implement it (multiple inheritance is allowed).
I would favor variant 2, easy to handle and keeps performance where it needs to be.
This would address all components that store base classes.
Interestingly the tests work if you don't copy anything (so you invoke the old copy constructor with an empty TransformationChain). Nice testing flaw...
TransformationChain
is for now not copyable since it works with unique pointers that prohibit that. But the base problem is that we store pointers/references to unknownTransformation
types (we only know they have the base typeCE3D::Transformation::Transformation
).For now the copy constructor should be deactivated. But you should be able to copy your
TransformationChain
. So there is just one possibility to enable such a behaviour (or two depending how you want actually implement it):CE3D::Object
that containsClone()
.Clone()
returns a copy of the object.IClonable
interface with one member function: alsoClone()
. Classes that need this feature can then just implement it (multiple inheritance is allowed).I would favor variant 2, easy to handle and keeps performance where it needs to be.
This would address all components that store base classes.