27 TestObject (QObject * parent =
nullptr)
31 TestObject (Uuid
id, std::string name, QObject * parent =
nullptr)
33 name_ (std::move (name))
36 ~TestObject ()
override =
default;
38 [[nodiscard]] std::string name ()
const {
return name_; }
43 obj.name_ = other.name_;
46 NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE (
48 UuidIdentifiableObject,
54 BOOST_DESCRIBE_CLASS (TestObject, (UuidIdentifiableObject), (), (), (name_))
104class ContainerTestObject
109 ContainerTestObject (QObject * parent =
nullptr)
113 ContainerTestObject (Uuid
id, std::string name, QObject * parent =
nullptr)
115 name_ (std::move (name))
120 void set_contained_ref (UuidRef ref) { contained_ref_ = std::move (ref); }
121 [[nodiscard]] std::string name ()
const {
return name_; }
123 friend void init_from (
124 ContainerTestObject &obj,
125 const ContainerTestObject &other,
128 obj.name_ = other.name_;
131 NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE (
138 std::optional<TypedUuidReference<ContainerTestObject>> contained_ref_;
140 BOOST_DESCRIBE_CLASS (