说明
本文档由作者翻译自Doxygen官网和整理相关材料而得。
使用要点
使用Doxygen处理fortran代码,应在设置页将OPTIMIZE_FOR_FORTRAN选为YES。
Doxygen解析器将自动判断Fortran语言的格式(固定格式/自由格式)。如解析器有误,则需要人为设置 EXTENSION_MAPPING,如设置为EXTENSION_MAPPING = f=FortranFixed f90=FortranFree,则解析器能够自动将f文件识别为固定格式代码,f90文件识别为自由格式代码。
如何注释
使用“!>”或者“!<”开始注释,使用“!!”或者“!>”可将单行注释转化为多行注释。示例如下:
!> Build the restriction matrix for the aggregation
!! method.
!! @param aggr information about the aggregates
!! @todo Handle special case
subroutine intrestbuild(A,aggr,Restrict,A_ghost)
implicit none
Type(SpMtx), intent(in) :: A !< our fine level matrix
Type(Aggrs), intent(in) :: aggr
Type(SpMtx), intent(out) :: Restrict !< Our restriction matrix
!...
end subroutine
常用注释方法
!>
!! @brief 简要说明
!! @author 作者
!! @version 版本
提示
Doxygen支持markdown语法,所以还可以探索很多内容。