From 485c2673b80df2eb3c788fde5cf7ebd547ba9887 Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Tue, 29 Aug 2017 07:56:38 -0700 Subject: [PATCH] [doxy] Add doxygen file header to introspected-doxygen.h --- doc/doxygen.conf | 4 +-- utils/print-introspected-doxygen.cc | 43 +++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/doc/doxygen.conf b/doc/doxygen.conf index ce07d8b88..81bab09ba 100644 --- a/doc/doxygen.conf +++ b/doc/doxygen.conf @@ -434,7 +434,7 @@ LOOKUP_CACHE_SIZE = 1 # normally produced when WARNINGS is set to YES. # The default value is: NO. -EXTRACT_ALL = YES +EXTRACT_ALL = no # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. @@ -732,7 +732,7 @@ QUIET = NO # Tip: Turn warnings on while writing the documentation. # The default value is: YES. -WARNINGS = YES +WARNINGS = no # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag diff --git a/utils/print-introspected-doxygen.cc b/utils/print-introspected-doxygen.cc index 29a75a1a9..5f61389e6 100644 --- a/utils/print-introspected-doxygen.cc +++ b/utils/print-introspected-doxygen.cc @@ -39,6 +39,7 @@ #include "ns3/string.h" #include "ns3/node-container.h" #include "ns3/simple-channel.h" +#include "ns3/system-path.h" using namespace ns3; @@ -60,6 +61,7 @@ namespace std::string commentStart; ///< start of code comment std::string commentStop; ///< end of code comment std::string copyDoc; ///< copy (or refer) to docs elsewhere + std::string file; ///< file std::string flagSpanStart; ///< start of Attribute flag value std::string flagSpanStop; ///< end of Attribute flag value std::string functionStart; ///< start of a method/function @@ -71,15 +73,16 @@ namespace std::string listLineStop; ///< end unordered list item std::string listStart; ///< start unordered list std::string listStop; ///< end unordered list + std::string note; ///< start a note section std::string page; ///< start a separate page std::string reference; ///< reference tag std::string returns; ///< the return value std::string sectionStart; ///< start of a section or group std::string seeAlso; ///< Reference to other docs std::string subSectionStart; ///< start a new subsection - std::string templateArgument; ///< template argument - std::string templArgExplicit; ///< template argument required std::string templArgDeduced; ///< template argument deduced from function + std::string templArgExplicit; ///< template argument required + std::string templateArgument; ///< template argument std::string variable; ///< variable or class member } // anonymous namespace @@ -110,6 +113,7 @@ SetMarkup (bool outputText) commentStart = "===============================================================\n"; commentStop = ""; copyDoc = " See: "; + file = "File: "; flagSpanStart = ""; flagSpanStop = ""; functionStart = ""; @@ -117,19 +121,20 @@ SetMarkup (bool outputText) headingStart = ""; headingStop = ""; indentHtmlOnly = ""; - page = "Page "; - listStart = ""; - listStop = ""; listLineStart = " * "; listLineStop = ""; + listStart = ""; + listStop = ""; + note = "Note: "; + page = "Page "; reference = " "; returns = " Returns: "; sectionStart = "Section "; seeAlso = " See: "; subSectionStart = "Subsection "; - templateArgument = "Template Arg: "; templArgDeduced = "[deduced] "; templArgExplicit = "[explicit] "; + templateArgument = "Template Arg: "; variable = "Variable: "; } else @@ -148,6 +153,7 @@ SetMarkup (bool outputText) commentStart = "/*!\n"; commentStop = "*/\n"; copyDoc = "\\copydoc "; + file = "\\file "; flagSpanStart = ""; flagSpanStop = ""; functionStart = "\\fn "; @@ -155,19 +161,20 @@ SetMarkup (bool outputText) headingStart = "

"; headingStop = "

"; indentHtmlOnly = " "; - page = "\\page "; - listStart = ""; listLineStart = "
  • "; listLineStop = "
  • "; + listStart = ""; + note = "\\note "; + page = "\\page "; reference = " \\ref "; returns = "\\returns "; sectionStart = "\\ingroup "; seeAlso = "\\see "; subSectionStart = "\\addtogroup "; - templateArgument = "\\tparam "; templArgDeduced = "\\deduced "; templArgExplicit = "\\explicit "; + templateArgument = "\\tparam "; variable = "\\var "; } } // SetMarkup () @@ -1436,8 +1443,22 @@ int main (int argc, char *argv[]) std::cout << "/* -*- Mode:C++; c-file-style:\"gnu\"; " "indent-tabs-mode:nil; -*- */\n" << std::endl; + std::cout << "#include \"ns3/log.h\"" + << std::endl; } - + + // Doxygen file header + std::cout << std::endl; + std::cout << commentStart + << file << "\n" + << sectionStart << "utils\n" + << "Doxygen docs generated from the TypeId database.\n" + << note << "This file is automatically generated by " + << codeWord << "print-introspected-doxygen.cc. Do not edit this file! " + << "Edit that file instead.\n" + << commentStop + << std::endl; + // Get typical aggregation relationships. StaticInformation info = GetTypicalAggregations ();