From 741fd9feee845e2fa1e10884f5359f85db0fe641 Mon Sep 17 00:00:00 2001 From: Parth Pandya Date: Mon, 3 Feb 2020 15:49:55 -0800 Subject: [PATCH] doc: Add to doxygen a list of all TypeIds --- AUTHORS | 1 + RELEASE_NOTES | 1 + utils/print-introspected-doxygen.cc | 47 +++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/AUTHORS b/AUTHORS index 70b546b88..b180f6795 100644 --- a/AUTHORS +++ b/AUTHORS @@ -164,6 +164,7 @@ Alfonso Oliveira (af.oliveira.16@gmail.com) Luis Pacheco (luisbelem@gmail.com) Jendaipou Palmei (jendaipoupalmei@gmail.com) LluĂ­s Parcerisa (parcerisa@gmail.com) +Parth Pandya (parthpandyappp@gmail.com) Mingyu Park (darkpmg@naver.com) Jendaipou Palmei (jendaipoupalmei@gmail.com) Natale Patriciello (natale.patriciello@gmail.com) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 83da0fbda..9f280782e 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -31,6 +31,7 @@ Bugs fixed - Issue #84 - Wi-Fi removing wrong header due to copy-paste error - wifi: a zero value for the backoff timer might be discarded and a new value might be generated by an erroneous call to NotifyCollision(). +- Bug 2636 - Add to doxygen a list of all registered TypeIds Known issues ------------ diff --git a/utils/print-introspected-doxygen.cc b/utils/print-introspected-doxygen.cc index bbb9191b8..004074d87 100644 --- a/utils/print-introspected-doxygen.cc +++ b/utils/print-introspected-doxygen.cc @@ -976,6 +976,52 @@ PrintTypeIdBlocks (std::ostream & os) * Lists of All things ***************************************************************/ +/** + * Print the list of all TypeIds + * + * \param [in,out] os The output stream. + */ +void +PrintAllTypeIds (std::ostream & os) +{ + NS_LOG_FUNCTION_NOARGS (); + os << commentStart << page << "TypeIdList All TypeIds\n" + << std::endl; + os << "This is a list of all" << reference << "TypeIds.\n" + << "For more information see the" << reference << "TypeId " + << "section of this API documentation and the TypeId section " + << "in the Configuration and Attributes chapter of the Manual.\n" + << std::endl; + + os << listStart << std::endl; + + NameMap nameMap = GetNameMap (); + // Iterate over the map, which will print the class names in + // alphabetical order. + for (auto item : nameMap) + { + // Handle only real TypeIds + if (item.second < 0) + { + continue ; + } + // Get the class's index out of the map; + TypeId tid = TypeId::GetRegistered (item.second); + + os << indentHtmlOnly + << listLineStart + << boldStart + << tid.GetName () + << boldStop + << listLineStop + << std::endl; + + } + os << commentStop << std::endl; + +} // PrintAllTypeIds () + + /** * Print the list of all Attributes. * @@ -1569,6 +1615,7 @@ int main (int argc, char *argv[]) PrintTypeIdBlocks (std::cout); + PrintAllTypeIds (std::cout); PrintAllAttributes (std::cout); PrintAllGlobals (std::cout); PrintAllLogComponents (std::cout);