From 2a4dcce444e729e8a66bf18ddaa165c60ad4adf3 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 3 Jan 2008 11:30:02 +0100 Subject: [PATCH] add NS_OBJECT_ENSURE_REGISTERED --- src/core/object.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;