Doxygen: Empty Detail Description

核能气质少年 提交于 2020-01-13 03:48:07

问题


Context - Doxygen tool on C codes to generated RTF documents.

In the documentation of Modules/Groups, we are getting the header "Detailed Description" even if no detail description is provided for some particular module/group.

In generated RTF document this looks ugly. Is it possible to get rid of this empty Detail Description sections?

I tried "ALWAYS_DETAILED_SEC = NO" but it is not working. I cannot do "HIDE_UNDOC_MEMBERS = YES" as the group/module contains members (struct, functions ...) which are documented.


回答1:


The reason as to why "Detailed Description" gets generated even if there is no Documentation in the Entities (Modules/Groups, etc..) is because the Doxyfile tag EXTRACT_ALL is set to YES.

By Setting,

  • EXTRACT_ALL = NO
  • ALWAYS_DETAILED_SEC = NO

Only the entities documented with Doxygen special comments will get Documented. And only those entities having @details -> Detailed description will be listed under the Detailed Description section.




回答2:


This may be a bit late, however others may be interested (I was).

You can remove the group detailed description completely using the layout file, though if you have a brief description a More... link will still be created (which links to nothing). My solution was the disable brief description for groups and move detailed description to the top of the page (essentially replacing it).

Create a layout file by running the following command dOxygen -l. The creates the default layout file. The section we are interested in is groups, near the bottom:

<!-- Layout definition for a group page -->
  <group>
    <briefdescription visible="yes"/>
    <groupgraph visible="$GROUP_GRAPHS"/>

Now set visible="yes" to visible="no" in the briefdescription field. Near the bottom of the file you will see a <detaileddescription title=""/> Move this to the top, above or below briefdescription. You should now have:

<!-- Layout definition for a group page -->
  <group>
    <briefdescription visible="no"/>
    <detaileddescription title="Description"/>
    <groupgraph visible="$GROUP_GRAPHS"/>

Note that I've changed the title to "Description" by filling in the title field. Save the file. Now in your Doxyfile, you need to specify a custom layoutfile. Add the following line (or search for it and fill it in): LAYOUT_FILE=DoxygenLayout.xml

Assuming your paths are correct etc, you should now have group pages with brief description replaced with the full description.




回答3:


Unfortunately it doesn't generate if the class has been documented like:

/// <summary>
/// This is..
/// </summary>
class ABC
{     
}

remove the 'summary' tags, i.e. it should be like

///
/// This is..
///
class ABC
{

}

search for detailed description(at the begining) in the link below http://www.star.bnl.gov/public/comp/sofi/doxygen/docblocks.html



来源:https://stackoverflow.com/questions/15226994/doxygen-empty-detail-description

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!