diff --git a/src/core/object.cc b/src/core/object.cc index 9e138e9c7..b1f73b3eb 100644 --- a/src/core/object.cc +++ b/src/core/object.cc @@ -63,6 +63,7 @@ public: ns3::Ptr checker); uint32_t GetAttributeListN (uint16_t uid) const; std::string GetAttributeName (uint16_t uid, uint32_t i) const; + std::string GetAttributeHelp (uint16_t uid, uint32_t i) const; uint32_t GetAttributeFlags (uint16_t uid, uint32_t i) const; ns3::Attribute GetAttributeInitialValue (uint16_t uid, uint32_t i) const; ns3::Ptr GetAttributeAccessor (uint16_t uid, uint32_t i) const; @@ -300,6 +301,13 @@ IidManager::GetAttributeName (uint16_t uid, uint32_t i) const NS_ASSERT (i < information->attributes.size ()); return information->attributes[i].name; } +std::string +IidManager::GetAttributeHelp (uint16_t uid, uint32_t i) const +{ + struct IidInformation *information = LookupInformation (uid); + NS_ASSERT (i < information->attributes.size ()); + return information->attributes[i].help; +} uint32_t IidManager::GetAttributeFlags (uint16_t uid, uint32_t i) const { @@ -608,6 +616,12 @@ TypeId::GetAttributeName (uint32_t i) const return name; } std::string +TypeId::GetAttributeHelp (uint32_t i) const +{ + std::string help = Singleton::Get ()->GetAttributeHelp (m_tid, i); + return help; +} +std::string TypeId::GetAttributeFullName (uint32_t i) const { return GetName () + "::" + GetAttributeName (i); diff --git a/src/core/object.h b/src/core/object.h index 583009f00..a0e4c40ea 100644 --- a/src/core/object.h +++ b/src/core/object.h @@ -142,6 +142,7 @@ public: * index is \i i. */ std::string GetAttributeName (uint32_t i) const; + std::string GetAttributeHelp (uint32_t i) const; /** * \param i index into attribute array * \returns the full name associated to the attribute whose @@ -150,6 +151,9 @@ public: std::string GetAttributeFullName (uint32_t i) const; Attribute GetAttributeInitialValue (uint32_t i) const; + uint32_t GetAttributeFlags (uint32_t i) const; + Ptr GetAttributeChecker (uint32_t i) const; + uint32_t GetTraceSourceN (void) const; std::string GetTraceSourceName (uint32_t i) const; @@ -291,8 +295,6 @@ private: void DoAddConstructor (CallbackBase callback, uint32_t nArguments); CallbackBase LookupConstructor (uint32_t nArguments) const; Ptr GetAttributeAccessor (uint32_t i) const; - uint32_t GetAttributeFlags (uint32_t i) const; - Ptr GetAttributeChecker (uint32_t i) const; uint16_t m_tid; };