75 void SetParent (uint16_t uid, uint16_t parent);
79 uint16_t
GetUid (std::string name)
const;
81 std::string
GetName (uint16_t uid)
const;
125 typedef std::vector<struct IidInformation>::const_iterator
Iterator;
152 static ns3::Hasher hasher ( Create<Hash::Function::Murmur3> () );
162 "Trying to allocate twice the same uid: " << name);
166 NS_LOG_ERROR (
"Hash chaining TypeId for '" << name <<
"'. "
167 <<
"This is not a bug, but is extremely unlikely. "
168 <<
"Please contact the ns3 developers.");
182 "Triplicate hash detected while chaining TypeId for '"
184 <<
"'. Please contact the ns3 developers for assistance.");
193 if (name > hinfo->
name)
195 NS_LOG_LOGIC (
"New TypeId '" << name <<
"' getting chained.");
210 information.
name = name;
211 information.
hash = hash;
221 m_namemap.insert (std::make_pair (name, uid));
222 m_hashmap.insert (std::make_pair (hash, uid));
240 information->
parent = parent;
274 namemap_t::const_iterator it =
m_namemap.find (name);
287 hashmap_t::const_iterator it =
m_hashmap.find (hash);
302 return information->
name;
309 return information->
hash;
316 return information->
parent;
333 NS_FATAL_ERROR (
"Requested constructor for "<<information->
name<<
" but it does not have one.");
367 for (std::vector<struct TypeId::AttributeInformation>::const_iterator i = information->
attributes.begin ();
376 if (parent == information)
382 information = parent;
396 NS_LOG_FUNCTION (
this << uid << name << help << flags << initialValue << accessor << checker);
400 NS_FATAL_ERROR (
"Attribute \"" << name <<
"\" already registered on tid=\"" <<
401 information->
name <<
"\"");
420 NS_ASSERT (i < information->attributes.size ());
421 information->
attributes[i].initialValue = initialValue;
438 NS_ASSERT (i < information->attributes.size ());
439 return information->attributes[i];
450 for (std::vector<struct TypeId::TraceSourceInformation>::const_iterator i = information->
traceSources.begin ();
459 if (parent == information)
465 information = parent;
480 NS_FATAL_ERROR (
"Trace source \"" << name <<
"\" already registered on tid=\"" <<
481 information->
name <<
"\"");
501 NS_ASSERT (i < information->traceSources.size ());
502 return information->traceSources[i];
539 NS_ASSERT_MSG (uid != 0,
"Assert in TypeId::LookupByName: " << name <<
" not found");
558 NS_ASSERT_MSG (uid != 0,
"Assert in TypeId::LookupByHash: 0x"
559 << std::hex << hash << std::dec <<
" not found");
598 if (tmp.
name == name)
605 }
while (nextTid != tid);
635 return parent !=
m_tid;
642 while (tmp != other && tmp != tmp.
GetParent ())
646 return tmp == other && *
this != other;
676 return hasConstructor;
693 NS_LOG_FUNCTION (
this << name << help << &initialValue << accessor << checker);
706 NS_LOG_FUNCTION (
this << name << help << flags << &initialValue << accessor << checker);
801 if (info.
name == name)
807 }
while (nextTid != tid);
831 std::string tidString;
836 is.setstate (std::ios_base::badbit);