在doxygen中将"内部"与"外部"文档分开

tim*_*mos 14 doxygen

我想用doxygen记录一个库.文档将由两类人员阅读:用户,他们只对外部API和想要查看所有功能/结构文档的开发人员感兴趣.

我想用来分隔doxyfiles来创建文档.是否有一些"标记"我可以放在注释块中将注释标记为内部/外部?

Mik*_*wan 18

设置INTERNAL_DOCS:

# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.

INTERNAL_DOCS          = NO
Run Code Online (Sandbox Code Playgroud)

在文档中,您可以使用\internal@internal以任何您想要的粒度(文件,函数等).


Tho*_*ell 12

使用\ cond命令:

\internal(@internal)仅具有当前注释块的粒度.它不允许您以任何方式隐藏C中的结构定义.

这是最简单的方法

\ cond INTERNAL

在内部头文件的顶部和

\ ENDCOND

在底部.然后,在配置文件中添加

ENABLED_SECTIONS =内部

允许内部项目包含在文档中.

Doxygen用户也推荐这种方式,例如此处