18 #ifndef GZ_PHYSICS_CLONEABLE_HH_
19 #define GZ_PHYSICS_CLONEABLE_HH_
33 public: Cloneable() =
default;
36 public:
virtual ~Cloneable() =
default;
40 public: Cloneable(
const Cloneable &_doNotCopy) =
delete;
44 public: Cloneable& operator=(
const Cloneable &_doNotCopy) =
delete;
56 public:
virtual void Copy(
const Cloneable &_other) = 0;
62 public:
virtual void Copy(Cloneable &&_other) = 0;
75 class MakeCloneable final :
public T,
public Cloneable
80 public:
template <
typename... Args>
83 MakeCloneable(Args&&... _args);
88 public: MakeCloneable(
const MakeCloneable &_other);
94 public: MakeCloneable(MakeCloneable &&_other);
100 public: MakeCloneable &operator=(
const MakeCloneable &_other);
107 public: MakeCloneable& operator=(MakeCloneable &&_other);
113 public:
void Copy(const Cloneable &_other) final;
116 public:
void Copy(Cloneable &&_other) final;
121 #include "gz/physics/detail/Cloneable.hh"