Pau*_*aul 28 c++ doxygen non-member-functions
我有一个项目,我正在使用Doxygen来生成文档.这些类的文档很好,但我也有一些函数,我在main()中使用它来创建对象等.我也想将这些函数放入我的文档中,但我还没有想到如何做到这一点.有什么建议?
Okt*_*ist 25
作为类成员的实体仅在其类记录时才会记录.在命名空间范围内声明的实体仅在记录其命名空间时才会记录.在文件范围内声明的实体仅在其文件记录时才会记录.
因此,要在全局命名空间中记录一个自由函数,您还需要在头文件中的某个位置声明它:
/** @file */
Run Code Online (Sandbox Code Playgroud)
或者像这样:
/*! \file */
Run Code Online (Sandbox Code Playgroud)
Pie*_*ter 10
使用\fn您\class在\\*! *\块中使用的位置
http://www.doxygen.nl/manual/docblocks.html 寻找"其他地方的文档"
http://www.doxygen.nl/manual/commands.html#cmdfn
它与记录成员函数类似
这种模式对我们很有用.
/*! Convert counts to kg for the reservoir.
\param counts The A/D counts to convert.`
\return The calculated kg based on the parameter.
*/
float RES_ConvertCountsToValue(uint_16 counts);
Run Code Online (Sandbox Code Playgroud)