add TypeId::SetUid/GetUid
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 17 Mar 2008 13:31:08 -0700
changeset 2644 b50c3f20ab88
parent 2643 2a3324f4dabe
child 2645 139b2dec56c0
add TypeId::SetUid/GetUid
src/core/type-id.cc
src/core/type-id.h
--- a/src/core/type-id.cc	Mon Mar 17 13:12:17 2008 -0700
+++ b/src/core/type-id.cc	Mon Mar 17 13:31:08 2008 -0700
@@ -664,6 +664,17 @@
   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 ();
--- a/src/core/type-id.h	Mon Mar 17 13:12:17 2008 -0700
+++ b/src/core/type-id.h	Mon Mar 17 13:31:08 2008 -0700
@@ -258,6 +258,8 @@
   bool LookupAttributeByName (std::string name, struct AttributeInfo *info) const;
   Ptr<const TraceSourceAccessor> LookupTraceSourceByName (std::string name) const;
 
+  uint16_t GetUid (void) const;
+  void SetUid (uint16_t tid);
 
   // construct an invalid TypeId.
   TypeId ();