是否可以在 doxygen 注释块中包含将被 doxygen 忽略的内容?换句话说,我们可以在 doxygen 评论块中发表评论吗?
背景:
我们正在将 Fortran 项目的代码内注释转换为 doxygen 可解析的格式,但是该项目要求代码内注释中的内容由水平线。例如:
!> @brief Lorem ipsum dolor sit amet
!! ---------------------------------------------------------------------
!!
!! @param[in] p1 Description of p1
!! @param[in] p2 Description of p2
!! ---------------------------------------------------------------------
!!
!! More content here ....
!! ---------------------------------------------------------------------
!!
!! More content for another section
!! ---------------------------------------------------------------------
subroutine do_something(p1, p2)
! .... the code ...
end subroutine do_something
是否有一个命令/语法可以为这些行添加前缀,以便 doxygen 会忽略它们?希望这是一种不引人注目且不会影响评论可读性的评论。
我知道INPUT_FILTER http://www.doxygen.nl/manual/config.html#cfg_input_filter可用于链接预处理脚本的设置,但理想的解决方案是不依赖于其他脚本/工具的解决方案。
附:我很清楚很多人会认为这些水平线是不必要的和/或分散注意力。然而,这是出纳员规定的要求,我不能随意改变。
Doxygen 支持一些HTML 命令 http://www.star.bnl.gov/public/comp/sofi/doxygen/htmlcmds.html包括 HTML 注释。该解决方案的优点是不需要对 Doxyfile 进行任何修改,并且比@I{ ---- }
.
!> @brief Lorem ipsum dolor sit amet
!! <!----------------------------------------------------------------->
!!
!! @param[in] p1 Description of p1
!! @param[in] p2 Description of p2
!! <!----------------------------------------------------------------->
!!
!! More content here ....
!! <!----------------------------------------------------------------->
!!
!! More content for another section
!! <!----------------------------------------------------------------->
subroutine do_something(p1, p2)
! .... the code ...
end subroutine do_something
For the record, this is the solution which I eventually settled on. However, I've accepted DRH's answer https://stackoverflow.com/questions/12320377/ignoring-lines-within-a-doxygen-comment-block/12328287#12328287 as it provides a more generic solution to "enabling comments within a doxygen block".
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)