cjh*_*cjh 14 c c++ variables comments doxygen
如果我有以下内容:
/**
* @brief (x,y,z) points for block
*/
int x, y, z;
Run Code Online (Sandbox Code Playgroud)
它只会生成x的文档,是否可以在doxygen中使用一条注释对所有x,y和z进行注释?
编辑按照envu的建议,我现在有以下内容(基于http://www.doxygen.nl/manual/grouping.html#memgroup)
//@{
/** some documentation here */
int x, y, z;
//@}
Run Code Online (Sandbox Code Playgroud)
要么
//@{
/**
* @brief some documentation here
*/
int x, y, z;
//@}
Run Code Online (Sandbox Code Playgroud)
然而,这两个仍然只记录x.尝试使用不同的表单我还没有得到相同的文档字符串来跨越多个变量
evn*_*vnu 13
我会使用成员组 http://www.doxygen.nl/manual/grouping.html#memgroup这样做.语法和输出与你想要实现的有点不同,但我认为不应该受到伤害.
我意识到这是一个老问题,但我遇到了类似的问题,并找到了一种解决方法,但并未完全解决问题,但在某些情况下可能是可接受的替代品.
通过在成员组块上方添加注释并在\name
装饰器前面添加注释,您将获得一个描述,该描述显示在Doxygen页面的属性列表中成员组中的所有变量之上.我相信这只是一个简短的描述,但如果你愿意,你可以在这里添加任意长的描述.
这不会在成员组中的每个变量的详细信息字段中添加相同的注释(详细信息字段将为空,或者如果您在成员组块中放置注释,它仍将仅适用于第一个变量),但它确实具有将相关的变量组记录在一起的效果,这看起来像问题的原始意图.
例:
/*! \name This will be the description for the following group of variables
It can be arbitrarily long, but the first line will show up in bold,
and any subsequent lines will show up like a description under it
*/
//@{
int relatedVariable1;
int relatedVariable2;
char* relatedVariable3;
//@}
Run Code Online (Sandbox Code Playgroud)