From f6438556ef4913205bed304445b3bd919fc5f2b3 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 17 Mar 2008 13:31:08 -0700 Subject: [PATCH] add TypeId::SetUid/GetUid --- src/core/type-id.cc | 11 +++++++++++ src/core/type-id.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/core/type-id.cc b/src/core/type-id.cc index 562cd7513..b2a59fe0b 100644 --- a/src/core/type-id.cc +++ b/src/core/type-id.cc @@ -664,6 +664,17 @@ TypeId::LookupTraceSourceByName (std::string name) const return 0; } +uint16_t +TypeId::GetUid (void) const +{ + return m_tid; +} +void +TypeId::SetUid (uint16_t tid) +{ + m_tid = tid; +} + std::ostream & operator << (std::ostream &os, TypeId tid) { os << tid.GetName (); diff --git a/src/core/type-id.h b/src/core/type-id.h index ab649e36c..3207ff1c0 100644 --- a/src/core/type-id.h +++ b/src/core/type-id.h @@ -258,6 +258,8 @@ public: bool LookupAttributeByName (std::string name, struct AttributeInfo *info) const; Ptr LookupTraceSourceByName (std::string name) const; + uint16_t GetUid (void) const; + void SetUid (uint16_t tid); // construct an invalid TypeId. TypeId ();