src/core/object-base.h
changeset 2633 a0639de8cd8b
parent 2370 5f7ad186b798
child 2634 44a92f1d3728
equal deleted inserted replaced
2632:e7989e4c674a 2633:a0639de8cd8b
     1 #ifndef OBJECT_BASE_H
     1 #ifndef OBJECT_BASE_H
     2 #define OBJECT_BASE_H
     2 #define OBJECT_BASE_H
       
     3 
       
     4 #include "type-id.h"
       
     5 
       
     6 /**
       
     7  * This macro should be invoked once for every class which
       
     8  * defines a new GetTypeId method.
       
     9  */
       
    10 #define NS_OBJECT_ENSURE_REGISTERED(type)       \
       
    11   static struct X##type##RegistrationClass      \
       
    12   {                                             \
       
    13     X##type##RegistrationClass () {             \
       
    14       ns3::TypeId tid = type::GetTypeId ();     \
       
    15       tid.GetParent ();                         \
       
    16     }                                           \
       
    17 } x_##type##RegistrationVariable
     3 
    18 
     4 namespace ns3 {
    19 namespace ns3 {
     5 
    20 
     6 /**
    21 /**
     7  * This base class is really used only to make sure that 
    22  * This base class is really used only to make sure that