add TypeId::SetUid/GetUid

This commit is contained in:
Mathieu Lacage
2008-03-17 13:31:08 -07:00
parent 5d4ecfc62c
commit f6438556ef
2 changed files with 13 additions and 0 deletions

View File

@@ -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 ();

View File

@@ -258,6 +258,8 @@ public:
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 ();