diff --git a/src/core/object.h b/src/core/object.h index 0c7bee02a..56654fe67 100644 --- a/src/core/object.h +++ b/src/core/object.h @@ -28,6 +28,16 @@ #include "callback.h" #include "empty.h" +#define NS_OBJECT_ENSURE_REGISTERED(type) \ + static struct X##type##RegistrationClass \ + { \ + X##type##RegistrationClass () { \ + ns3::InterfaceId iid = type::iid (); \ + iid.GetParent (); \ + } \ +} x_##type##RegistrationVariable + + namespace ns3 { class TraceContext;