我正在使用 doxygen (1.8.10) 记录一些包含类型绑定(bind)过程(成员函数)的 Fortran 类。该过程的文档与包含该定义的模块相关联。我希望文档与它绑定(bind)的类型相关联,对此我无法取得良好的结果。
我定义新类型/类的典型方法是定义一个模块 type_newtype
仅包含新数据类型 newtype_t
的定义以及类型绑定(bind)的过程。此处显示,包括新数据类型的类型绑定(bind)过程。
module type_newtype
implicit none
!> Class documentation
type, public :: newtype_t
integer(ik) :: val
contains
procedure :: set_val
end type newtype_t
contains
!> set val
!!
!! @param[in] self
!! @param[in] i
subroutine set_val(self,i)
class(newtype_t), intent(in) :: self
integer(ik), intent(in) :: i
self%val = i
end subroutine set_val
end module type_newtype
当 doxygen 处理文件时,类型绑定(bind)过程的条目显示在模块
type_newtype
下。 ,但不在实际数据类型下newtype_t
.我尝试将 EXTRACT_ALL 设置为 ON。这会为
set_val
添加一个条目newtype_t
下的类型绑定(bind)程序以及,但不包括任何文档。没有简介,界面中没有变量。我的目标是让程序文档存在于其关联类型中。不是模块。实际上,两者都可以,但是该条目仅在模块下完整显示。我欢迎任何关于使用和风格的经验和建议,因为我是一个相对较新的 doxygen。
最佳答案
您可以尝试设置 @copydoc
在类型绑定(bind)过程中,如 here 所述:
contains
procedure :: set_val !< @copydoc type_newtype::set_val
然后应该复制文档。但是在我的情况下缺少呼号,这似乎仍然是 doxygen 中的一个错误。见 here .
关于fortran - Fortran 类型绑定(bind)过程的 doxygen 处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34325366/