diff --git a/src/core/type-id.cc b/src/core/type-id.cc index bd1bbd211..0474bc1c4 100644 --- a/src/core/type-id.cc +++ b/src/core/type-id.cc @@ -365,10 +365,6 @@ namespace ns3 { * The TypeId class *********************************************************************/ -TypeId::TypeId () - : m_tid (0) -{} - TypeId::TypeId (const char *name) { uint16_t uid = Singleton::Get ()->AllocateUid (name); @@ -380,8 +376,6 @@ TypeId::TypeId (const char *name) TypeId::TypeId (uint16_t tid) : m_tid (tid) {} -TypeId::~TypeId () -{} TypeId TypeId::LookupByName (std::string name) { diff --git a/src/core/type-id.h b/src/core/type-id.h index 423983be4..d03e568e9 100644 --- a/src/core/type-id.h +++ b/src/core/type-id.h @@ -351,8 +351,10 @@ public: void SetUid (uint16_t tid); // construct an invalid TypeId. - TypeId (); - ~TypeId (); + inline TypeId (); + inline TypeId (const TypeId &o); + inline TypeId &operator = (const TypeId &o); + inline ~TypeId (); private: friend class AttributeList; @@ -393,6 +395,19 @@ ATTRIBUTE_HELPER_HEADER (TypeId); namespace ns3 { +TypeId::TypeId () + : m_tid (0) {} +TypeId::TypeId (const TypeId &o) + : m_tid (o.m_tid) {} +TypeId &TypeId::operator = (const TypeId &o) +{ + m_tid = o.m_tid; + return *this; +} +TypeId::~TypeId () +{} + + /************************************************************************* * The TypeId implementation which depends on templates *************************************************************************/