diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index 196ef3ca8..b9709d33d 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -618,12 +618,6 @@ TypeId::GetAttribute(uint32_t i) const return Singleton::Get ()->GetAttribute(m_tid, i); } 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 { struct TypeId::AttributeInformation info = GetAttribute(i); @@ -647,22 +641,6 @@ TypeId::GetTraceSource(uint32_t i) const return Singleton::Get ()->GetTraceSource(m_tid, i); } -std::string -TypeId::GetTraceSourceName (uint32_t i) const -{ - return Singleton::Get ()->GetTraceSourceName (m_tid, i); -} -std::string -TypeId::GetTraceSourceHelp (uint32_t i) const -{ - return Singleton::Get ()->GetTraceSourceHelp (m_tid, i); -} -Ptr -TypeId::GetTraceSourceAccessor (uint32_t i) const -{ - return Singleton::Get ()->GetTraceSourceAccessor (m_tid, i); -} - TypeId TypeId::AddTraceSource (std::string name, std::string help, @@ -689,10 +667,10 @@ TypeId::LookupTraceSourceByName (std::string name) const tid = nextTid; for (uint32_t i = 0; i < tid.GetTraceSourceN (); i++) { - std::string srcName = tid.GetTraceSourceName (i); - if (srcName == name) + struct TypeId::TraceSourceInformation info = tid.GetTraceSource (i); + if (info.name == name) { - return tid.GetTraceSourceAccessor (i); + return info.accessor; } } nextTid = tid.GetParent (); diff --git a/src/core/model/type-id.h b/src/core/model/type-id.h index a685988b3..94045fd85 100644 --- a/src/core/model/type-id.h +++ b/src/core/model/type-id.h @@ -22,6 +22,7 @@ #include "attribute.h" #include "attribute-accessor-helper.h" +#include "trace-source-accessor.h" #include "attribute-helper.h" #include "callback.h" #include @@ -30,7 +31,6 @@ namespace ns3 { class ObjectBase; -class TraceSourceAccessor; /** * \brief a unique identifier for an interface. @@ -151,12 +151,6 @@ public: * index is i. */ struct TypeId::AttributeInformation GetAttribute(uint32_t i) const; - /** - * \param i index into attribute array. - * \returns the help text associated to the attribute whose - * index is i. - */ - std::string GetAttributeHelp (uint32_t i) const; /** * \param i index into attribute array * \returns the full name associated to the attribute whose @@ -193,23 +187,6 @@ public: * \returns detailed information about the requested trace source. */ struct TypeId::TraceSourceInformation GetTraceSource(uint32_t i) const; - /** - * \param i index into trace source array. - * \returns the name of the requested trace source. - */ - std::string GetTraceSourceName (uint32_t i) const; - /** - * \param i index into trace source array. - * \returns the help text of the requested trace source. - */ - std::string GetTraceSourceHelp (uint32_t i) const; - /** - * \param i index into trace source array. - * \returns the accessor used to get access to the requested - * trace source. - */ - Ptr GetTraceSourceAccessor (uint32_t i) const; - /** * \param tid the TypeId of the base class. diff --git a/utils/print-introspected-doxygen.cc b/utils/print-introspected-doxygen.cc index ad7b93b99..5c80fe566 100644 --- a/utils/print-introspected-doxygen.cc +++ b/utils/print-introspected-doxygen.cc @@ -58,8 +58,9 @@ PrintTraceSources (TypeId tid, std::ostream &os) os << "
    "<" << tid.GetTraceSourceName (i) << ": " - << tid.GetTraceSourceHelp (i) + struct TypeId::TraceSourceInformation info = tid.GetTraceSource (i); + os << "
  • " << info.name << ": " + << info.help << std::endl; os << "
  • " << std::endl; } @@ -362,7 +363,8 @@ int main (int argc, char *argv[]) << "
      " << std::endl; for (uint32_t j = 0; j < tid.GetTraceSourceN (); ++j) { - std::cout << "
    • " << tid.GetTraceSourceName (j) << ": " << tid.GetTraceSourceHelp (j) << "
    • " << std::endl; + struct TypeId::TraceSourceInformation info = tid.GetTraceSource(j); + std::cout << "
    • " << info.name << ": " << info.help << "
    • " << std::endl; } std::cout << "
    " << std::endl; }