A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::IidManager Class Reference

TypeId information manager. More...

+ Inheritance diagram for ns3::IidManager:
+ Collaboration diagram for ns3::IidManager:

Classes

struct  IidInformation
 The information record about a single type id. More...
 

Public Member Functions

void AddAttribute (uint16_t uid, std::string name, std::string help, uint32_t flags, Ptr< const AttributeValue > initialValue, Ptr< const AttributeAccessor > accessor, Ptr< const AttributeChecker > checker, TypeId::SupportLevel supportLevel=TypeId::SUPPORTED, const std::string &supportMsg="")
 Record a new attribute in a type id.
 
void AddConstructor (uint16_t uid, Callback< ObjectBase * > callback)
 Add a constructor Callback to this type id.
 
void AddDeprecatedName (uint16_t uid, const std::string &name)
 Add a deprecated name for the type id.
 
void AddTraceSource (uint16_t uid, std::string name, std::string help, Ptr< const TraceSourceAccessor > accessor, std::string callback, TypeId::SupportLevel supportLevel=TypeId::SUPPORTED, const std::string &supportMsg="")
 Record a new TraceSource.
 
uint16_t AllocateUid (std::string name)
 Create a new unique type id.
 
TypeId::AttributeInformation GetAttribute (uint16_t uid, std::size_t i) const
 Get Attribute information by index.
 
std::size_t GetAttributeN (uint16_t uid) const
 Get the number of attributes.
 
Callback< ObjectBase * > GetConstructor (uint16_t uid) const
 Get the constructor Callback of a type id.
 
std::string GetDeprecatedName (uint16_t uid) const
 Get the deprecated name of a type id.
 
std::string GetGroupName (uint16_t uid) const
 Get the group name of a type id.
 
TypeId::hash_t GetHash (uint16_t uid) const
 Get the hash of a type id.
 
std::string GetName (uint16_t uid) const
 Get the name of a type id.
 
uint16_t GetParent (uint16_t uid) const
 Get the parent of a type id.
 
uint16_t GetRegistered (uint16_t i) const
 Get a type id by index.
 
uint16_t GetRegisteredN () const
 Get the total number of type ids.
 
std::size_t GetSize (uint16_t uid) const
 Get the size of a type id.
 
TypeId::TraceSourceInformation GetTraceSource (uint16_t uid, std::size_t i) const
 Get the trace source by index.
 
std::size_t GetTraceSourceN (uint16_t uid) const
 Get the number of Trace sources.
 
uint16_t GetUid (std::string name) const
 Get a type id by name.
 
uint16_t GetUid (TypeId::hash_t hash) const
 Get a type id by hash value.
 
bool HasConstructor (uint16_t uid) const
 Check if a type id has a constructor Callback.
 
void HideFromDocumentation (uint16_t uid)
 Mark this type id to be excluded from documentation.
 
bool MustHideFromDocumentation (uint16_t uid) const
 Check if this TypeId should not be listed in documentation.
 
void SetAttributeInitialValue (uint16_t uid, std::size_t i, Ptr< const AttributeValue > initialValue)
 Set the initial value of an Attribute.
 
void SetGroupName (uint16_t uid, std::string groupName)
 Set the group name of a type id.
 
void SetParent (uint16_t uid, uint16_t parent)
 Set the parent of a type id.
 
void SetSize (uint16_t uid, std::size_t size)
 Set the size of the object class referred to by this id.
 
- Public Member Functions inherited from ns3::Singleton< IidManager >
 Singleton (const Singleton< IidManager > &)=delete
 
Singletonoperator= (const Singleton< IidManager > &)=delete
 

Private Types

enum  { HashChainFlag = 0x80000000 }
 IidManager constants. More...
 
typedef std::map< TypeId::hash_t, uint16_t > hashmap_t
 Type of the by-hash index.
 
typedef std::vector< IidInformation >::const_iterator Iterator
 Iterator type.
 
typedef std::map< std::string, uint16_t > namemap_t
 Type of the by-name index.
 

Private Member Functions

bool HasAttribute (uint16_t uid, std::string name)
 Check if a type id has a given Attribute.
 
bool HasTraceSource (uint16_t uid, std::string name)
 Check if a type id has a given TraceSource.
 
IidManager::IidInformationLookupInformation (uint16_t uid) const
 Retrieve the information record for a type.
 

Static Private Member Functions

static TypeId::hash_t Hasher (const std::string name)
 Hashing function.
 

Private Attributes

hashmap_t m_hashmap
 The by-hash index.
 
std::vector< IidInformationm_information
 The container of all type id records.
 
namemap_t m_namemap
 The by-name index.
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::Singleton< IidManager >
static IidManagerGet ()
 Get a pointer to the singleton instance.
 
- Protected Member Functions inherited from ns3::Singleton< IidManager >
 Singleton ()
 Constructor.
 
virtual ~Singleton ()
 Destructor.
 

Detailed Description

TypeId information manager.

Information records are stored in a vector. Name and hash lookup are performed by maps to the vector index.

Internal:
Hash Chaining

We require all types to produce distinct hashes. What if we encounter two types that produce the same hash value? As we move to a federated distribution model (the App store), it becomes increasingly likely that the core ns3 team won't discover this in test builds. Therefore, we need to handle this case explicitly.

Note, we expect this to be extremely rare. As of this writing we have ~400 < 2^9 types, so the probability of getting a collision when we introduce a new type is ~2^9/2^31 = 2^-22, assuming we reserve 31 bits for the hash, and one bit for chaining. Even with double the number of types the probability of having a collision is only 2 x 10^-4. The probability for a three-fold collision is 1 x 10^-10.

Therefore, we'll handle one collision explicitly by reserving the high order bit of the hash value, and assert on higher level collisions. The three-fold collision probability should be an acceptablly small error rate.

Definition at line 67 of file type-id.cc.

Member Typedef Documentation

◆ hashmap_t

typedef std::map<TypeId::hash_t, uint16_t> ns3::IidManager::hashmap_t
private

Type of the by-hash index.

Definition at line 347 of file type-id.cc.

◆ Iterator

typedef std::vector<IidInformation>::const_iterator ns3::IidManager::Iterator
private

Iterator type.

Definition at line 329 of file type-id.cc.

◆ namemap_t

typedef std::map<std::string, uint16_t> ns3::IidManager::namemap_t
private

Type of the by-name index.

Definition at line 342 of file type-id.cc.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

IidManager constants.

Enumerator
HashChainFlag 

Hash chaining flag.

To handle the first collision, we reserve the high bit as a chain flag.

Definition at line 352 of file type-id.cc.

Member Function Documentation

◆ AddAttribute()

void ns3::IidManager::AddAttribute ( uint16_t uid,
std::string name,
std::string help,
uint32_t flags,
Ptr< const AttributeValue > initialValue,
Ptr< const AttributeAccessor > accessor,
Ptr< const AttributeChecker > checker,
TypeId::SupportLevel supportLevel = TypeId::SUPPORTED,
const std::string & supportMsg = "" )

Record a new attribute in a type id.

Parameters
[in]uidThe id.
[in]nameThe name of the new attribute
[in]helpSome help text which describes the purpose of this attribute.
[in]flagsFlags which describe how this attribute can be read and/or written.
[in]initialValueThe initial value for this attribute.
[in]accessorAn instance of the associated AttributeAccessor subclass.
[in]checkerAn instance of the associated AttributeChecker subclass.
[in]supportLevelThe support/deprecation status for this attribute.
[in]supportMsgUpgrade hint if this attribute is no longer supported.

Definition at line 681 of file type-id.cc.

References ns3::TypeId::AttributeInformation::accessor, ns3::IidManager::IidInformation::attributes, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::AttributeInformation::flags, HasAttribute(), ns3::TypeId::AttributeInformation::help, IID, IIDL, ns3::TypeId::AttributeInformation::initialValue, LookupInformation(), ns3::IidManager::IidInformation::name, ns3::TypeId::AttributeInformation::name, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::TypeId::AttributeInformation::originalInitialValue, ns3::TypeId::AttributeInformation::supportLevel, and ns3::TypeId::AttributeInformation::supportMsg.

Referenced by ns3::TypeId::AddAttribute(), and ns3::TypeId::AddAttribute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddConstructor()

void ns3::IidManager::AddConstructor ( uint16_t uid,
Callback< ObjectBase * > callback )

Add a constructor Callback to this type id.

Parameters
[in]uidThe id.
[in]callbackThe Callback for the constructor.

Definition at line 517 of file type-id.cc.

References ns3::IidManager::IidInformation::constructor, ns3::IidManager::IidInformation::hasConstructor, IID, LookupInformation(), ns3::IidManager::IidInformation::name, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::DoAddConstructor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddDeprecatedName()

void ns3::IidManager::AddDeprecatedName ( uint16_t uid,
const std::string & name )

Add a deprecated name for the type id.

Use of this name raises a runtime warning, and only one deprecated name is supported.

Parameters
[in]uidThe id.
[in]nameThe deprecated name.

Definition at line 471 of file type-id.cc.

References ns3::IidManager::IidInformation::deprecatedName, IID, LookupInformation(), m_namemap, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::AddDeprecatedName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddTraceSource()

void ns3::IidManager::AddTraceSource ( uint16_t uid,
std::string name,
std::string help,
Ptr< const TraceSourceAccessor > accessor,
std::string callback,
TypeId::SupportLevel supportLevel = TypeId::SUPPORTED,
const std::string & supportMsg = "" )

Record a new TraceSource.

Parameters
[in]uidThe id.
[in]nameThe name of the new trace source
[in]helpSome help text which describes the purpose of this trace source.
[in]accessorA pointer to a TraceSourceAccessor which can be used to connect/disconnect sinks to this trace source.
[in]callbackFully qualified typedef name for the callback signature. Generally this should begin with the "ns3::" namespace qualifier.
[in]supportLevelThe support/deprecation status for this attribute.
[in]supportMsgUpgrade hint if this attribute is no longer supported.

Definition at line 780 of file type-id.cc.

References ns3::TypeId::TraceSourceInformation::accessor, ns3::TypeId::TraceSourceInformation::callback, HasTraceSource(), ns3::TypeId::TraceSourceInformation::help, IID, IIDL, LookupInformation(), ns3::IidManager::IidInformation::name, ns3::TypeId::TraceSourceInformation::name, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::TypeId::TraceSourceInformation::supportLevel, ns3::TypeId::TraceSourceInformation::supportMsg, and ns3::IidManager::IidInformation::traceSources.

Referenced by ns3::TypeId::AddTraceSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AllocateUid()

uint16_t ns3::IidManager::AllocateUid ( std::string name)

Create a new unique type id.

Parameters
[in]nameThe name of this type id.
Returns
The id.

Definition at line 386 of file type-id.cc.

References GetUid(), ns3::IidManager::IidInformation::groupName, ns3::IidManager::IidInformation::hasConstructor, ns3::IidManager::IidInformation::hash, HashChainFlag, Hasher(), IID, IIDL, LookupInformation(), m_hashmap, m_information, m_namemap, ns3::IidManager::IidInformation::mustHideFromDocumentation, ns3::IidManager::IidInformation::name, NS_ABORT_MSG_UNLESS, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::IidManager::IidInformation::parent, ns3::IidManager::IidInformation::size, ns3::TypeId::SUPPORTED, and ns3::IidManager::IidInformation::supportLevel.

Referenced by ns3::TypeId::TypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAttribute()

TypeId::AttributeInformation ns3::IidManager::GetAttribute ( uint16_t uid,
std::size_t i ) const

Get Attribute information by index.

Parameters
[in]uidThe id.
[in]iIndex into attribute array
Returns
The information associated to attribute whose index is i .

Definition at line 741 of file type-id.cc.

References ns3::IidManager::IidInformation::attributes, IID, IIDL, LookupInformation(), ns3::IidManager::IidInformation::name, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::GetAttribute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAttributeN()

std::size_t ns3::IidManager::GetAttributeN ( uint16_t uid) const

Get the number of attributes.

Parameters
[in]uidThe id.
Returns
The number of attributes associated to this TypeId

Definition at line 731 of file type-id.cc.

References ns3::IidManager::IidInformation::attributes, IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::GetAttributeN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetConstructor()

Callback< ObjectBase * > ns3::IidManager::GetConstructor ( uint16_t uid) const

Get the constructor Callback of a type id.

Parameters
[in]uidThe id.
Returns
The constructor Callback of the type id.

Definition at line 615 of file type-id.cc.

References ns3::IidManager::IidInformation::constructor, ns3::IidManager::IidInformation::hasConstructor, IID, LookupInformation(), ns3::IidManager::IidInformation::name, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::GetConstructor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDeprecatedName()

std::string ns3::IidManager::GetDeprecatedName ( uint16_t uid) const

Get the deprecated name of a type id.

Parameters
[in]uidThe id.
Returns
The name of the type id.

Definition at line 567 of file type-id.cc.

References ns3::IidManager::IidInformation::deprecatedName, IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ GetGroupName()

std::string ns3::IidManager::GetGroupName ( uint16_t uid) const

Get the group name of a type id.

Parameters
[in]uidThe id.
Returns
The group name of the type id.

Definition at line 596 of file type-id.cc.

References ns3::IidManager::IidInformation::groupName, IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::GetGroupName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHash()

TypeId::hash_t ns3::IidManager::GetHash ( uint16_t uid) const

Get the hash of a type id.

Parameters
[in]uidThe id.
Returns
The hash of the type id.

Definition at line 576 of file type-id.cc.

References ns3::IidManager::IidInformation::hash, IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::GetHash().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetName()

std::string ns3::IidManager::GetName ( uint16_t uid) const

Get the name of a type id.

Parameters
[in]uidThe id.
Returns
The name of the type id.

Definition at line 558 of file type-id.cc.

References IID, IIDL, LookupInformation(), ns3::IidManager::IidInformation::name, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::GetName(), ns3::TypeId::LookupByName(), and ns3::TypeId::LookupByNameFailSafe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetParent()

uint16_t ns3::IidManager::GetParent ( uint16_t uid) const

Get the parent of a type id.

Parameters
[in]uidThe id.
Returns
The parent type id of the type id.

Definition at line 586 of file type-id.cc.

References IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::IidManager::IidInformation::parent.

Referenced by ns3::TypeId::GetParent(), and ns3::TypeId::HasParent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRegistered()

uint16_t ns3::IidManager::GetRegistered ( uint16_t i) const

Get a type id by index.

The type id value 0 indicates not registered, so there is an offset of 1 between the index and the type id value. This function converts from an index to the type id value.

Parameters
[in]iThe index.
Returns
The type id.

Definition at line 645 of file type-id.cc.

References IID, and NS_LOG_FUNCTION.

◆ GetRegisteredN()

uint16_t ns3::IidManager::GetRegisteredN ( ) const

Get the total number of type ids.

Returns
The total number.

Definition at line 638 of file type-id.cc.

References IID, m_information, and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::GetRegisteredN().

+ Here is the caller graph for this function:

◆ GetSize()

std::size_t ns3::IidManager::GetSize ( uint16_t uid) const

Get the size of a type id.

Parameters
[in]uidThe id.
Returns
The size of the type id.

Definition at line 605 of file type-id.cc.

References IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::IidManager::IidInformation::size.

Referenced by ns3::TypeId::GetSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTraceSource()

TypeId::TraceSourceInformation ns3::IidManager::GetTraceSource ( uint16_t uid,
std::size_t i ) const

Get the trace source by index.

Parameters
[in]uidThe id.
[in]iIndex into trace source array.
Returns
Detailed information about the requested trace source.

Definition at line 818 of file type-id.cc.

References IID, IIDL, LookupInformation(), ns3::IidManager::IidInformation::name, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::IidManager::IidInformation::traceSources.

Referenced by ns3::TypeId::GetTraceSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTraceSourceN()

std::size_t ns3::IidManager::GetTraceSourceN ( uint16_t uid) const

Get the number of Trace sources.

Parameters
[in]uidThe id.
Returns
The number of trace sources defined in this TypeId.

Definition at line 808 of file type-id.cc.

References IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::IidManager::IidInformation::traceSources.

Referenced by ns3::TypeId::GetTraceSourceN().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUid() [1/2]

uint16_t ns3::IidManager::GetUid ( std::string name) const

Get a type id by name.

Parameters
[in]nameThe type id to find.
Returns
The type id. A type id of 0 means name wasn't found.

Definition at line 530 of file type-id.cc.

References IID, IIDL, m_namemap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by AllocateUid(), ns3::TypeId::LookupByHash(), ns3::TypeId::LookupByHashFailSafe(), ns3::TypeId::LookupByName(), and ns3::TypeId::LookupByNameFailSafe().

+ Here is the caller graph for this function:

◆ GetUid() [2/2]

uint16_t ns3::IidManager::GetUid ( TypeId::hash_t hash) const

Get a type id by hash value.

Parameters
[in]hashThe type id to find.
Returns
The type id. A type id of 0 means hash wasn't found.

Definition at line 544 of file type-id.cc.

References IID, IIDL, m_hashmap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

◆ HasAttribute()

bool ns3::IidManager::HasAttribute ( uint16_t uid,
std::string name )
private

Check if a type id has a given Attribute.

Parameters
[in]uidThe id.
[in]nameThe Attribute name.
Returns
true if uid has the Attribute name .

Definition at line 652 of file type-id.cc.

References ns3::IidManager::IidInformation::attributes, IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::IidManager::IidInformation::parent.

Referenced by AddAttribute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasConstructor()

bool ns3::IidManager::HasConstructor ( uint16_t uid) const

Check if a type id has a constructor Callback.

Parameters
[in]uidThe id.
Returns
true if the type id has a constructor Callback.

Definition at line 628 of file type-id.cc.

References ns3::IidManager::IidInformation::hasConstructor, IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::HasConstructor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Hasher()

TypeId::hash_t ns3::IidManager::Hasher ( const std::string name)
staticprivate

Hashing function.

Parameters
[in]nameThe type id name.
Returns
The hashed value of name .

Definition at line 366 of file type-id.cc.

References ns3::Hasher::clear(), ns3::Create(), and ns3::Hasher::GetHash32().

Referenced by AllocateUid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasTraceSource()

bool ns3::IidManager::HasTraceSource ( uint16_t uid,
std::string name )
private

Check if a type id has a given TraceSource.

Parameters
[in]uidThe id.
[in]nameThe TraceSource name.
Returns
true if uid has the TraceSource name .

Definition at line 751 of file type-id.cc.

References IID, IIDL, LookupInformation(), NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::IidManager::IidInformation::parent, and ns3::IidManager::IidInformation::traceSources.

Referenced by AddTraceSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HideFromDocumentation()

void ns3::IidManager::HideFromDocumentation ( uint16_t uid)

Mark this type id to be excluded from documentation.

Parameters
[in]uidThe id.

Definition at line 509 of file type-id.cc.

References IID, LookupInformation(), ns3::IidManager::IidInformation::mustHideFromDocumentation, and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::HideFromDocumentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LookupInformation()

IidManager::IidInformation * ns3::IidManager::LookupInformation ( uint16_t uid) const
private

Retrieve the information record for a type.

Parameters
[in]uidThe id.
Returns
The information record.

Definition at line 461 of file type-id.cc.

References IID, IIDL, m_information, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by AddAttribute(), AddConstructor(), AddDeprecatedName(), AddTraceSource(), AllocateUid(), GetAttribute(), GetAttributeN(), GetConstructor(), GetDeprecatedName(), GetGroupName(), GetHash(), GetName(), GetParent(), GetSize(), GetTraceSource(), GetTraceSourceN(), HasAttribute(), HasConstructor(), HasTraceSource(), HideFromDocumentation(), MustHideFromDocumentation(), SetAttributeInitialValue(), SetGroupName(), SetParent(), and SetSize().

+ Here is the caller graph for this function:

◆ MustHideFromDocumentation()

bool ns3::IidManager::MustHideFromDocumentation ( uint16_t uid) const

Check if this TypeId should not be listed in documentation.

Parameters
[in]uidThe id.
Returns
true if this TypeId should be hidden from the user.

Definition at line 828 of file type-id.cc.

References IID, IIDL, LookupInformation(), ns3::IidManager::IidInformation::mustHideFromDocumentation, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::TypeId::MustHideFromDocumentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAttributeInitialValue()

void ns3::IidManager::SetAttributeInitialValue ( uint16_t uid,
std::size_t i,
Ptr< const AttributeValue > initialValue )

Set the initial value of an Attribute.

Parameters
[in]uidThe id.
[in]iThe attribute to manipulate
[in]initialValueThe new initial value to use for this attribute.

Definition at line 720 of file type-id.cc.

References ns3::IidManager::IidInformation::attributes, IID, LookupInformation(), NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::SetAttributeInitialValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGroupName()

void ns3::IidManager::SetGroupName ( uint16_t uid,
std::string groupName )

Set the group name of a type id.

Parameters
[in]uidThe id.
[in]groupNameThe group name.

Definition at line 493 of file type-id.cc.

References ns3::IidManager::IidInformation::groupName, IID, LookupInformation(), and NS_LOG_FUNCTION.

Referenced by ns3::TypeId::SetGroupName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetParent()

void ns3::IidManager::SetParent ( uint16_t uid,
uint16_t parent )

Set the parent of a type id.

Parameters
[in]uidThe id.
[in]parentThe id of the parent.

Definition at line 484 of file type-id.cc.

References IID, LookupInformation(), m_information, NS_ASSERT, NS_LOG_FUNCTION, and ns3::IidManager::IidInformation::parent.

Referenced by ns3::TypeId::SetParent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSize()

void ns3::IidManager::SetSize ( uint16_t uid,
std::size_t size )

Set the size of the object class referred to by this id.

Parameters
[in]uidThe id.
[in]sizeThe object size.

Definition at line 501 of file type-id.cc.

References IID, LookupInformation(), NS_LOG_FUNCTION, and ns3::IidManager::IidInformation::size.

Referenced by ns3::TypeId::SetSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_hashmap

hashmap_t ns3::IidManager::m_hashmap
private

The by-hash index.

Definition at line 349 of file type-id.cc.

Referenced by AllocateUid(), and GetUid().

◆ m_information

std::vector<IidInformation> ns3::IidManager::m_information
private

The container of all type id records.

Definition at line 339 of file type-id.cc.

Referenced by AllocateUid(), GetRegisteredN(), LookupInformation(), and SetParent().

◆ m_namemap

namemap_t ns3::IidManager::m_namemap
private

The by-name index.

Definition at line 344 of file type-id.cc.

Referenced by AddDeprecatedName(), AllocateUid(), and GetUid().


The documentation for this class was generated from the following file: