22 REGISTER_REFLECTION(
object)
41 return sbk::reflection::cast<T*, object*>(
this);
51 return sbk::reflection::cast<const T*, const object*>(
this);
56 rttr::type getType()
const
60 return rttr::type::get<void>();
63 if (!m_type.has_value())
68 assert(m_type.has_value());
69 assert(m_type.value().is_valid());
71 return m_type.value();
76 [[nodiscard]] MulticastDelegate<object*>& get_on_destroy() {
return m_onDestroyEvent; }
79 friend class object_owner;
81 void set_owner(object_owner* newOwner)
83 assert(m_owner ==
nullptr);
87 object_owner* m_owner =
nullptr;
93 mutable std::optional<rttr::type> m_type = std::nullopt;
95 MulticastDelegate<object*> m_onDestroyEvent;