使用 doxygen 在结构定义之外记录 ac 结构的成员
我正在使用 doxygen 来注释我的 C 代码。我正在使用一个外国 API(即不是我自己的),该 API 的文档很少,因此我打算在我自己的源文件中记录一些该 API。我确实有外部 API 的头文件,但向该文件添加我自己的注释是不切实际的。
外部标头
struct foreignstruct
{
int a;
int b;
};
我的标头
/** My structure comments... */
struct mystruct
{
/** Describe field here... */
int field;
};
/** @struct foreignstruct
* @brief This structure blah blah blah...
* @??? a Member 'a' contains...
* @??? b Member 'b' contains...
*/
我应该使用什么标签来代替 @???
才能获得正确的 doxygen 输出(其中“正确”表示生成mystruct
和 foreignstruct
的输出是相同的)?
I am using doxygen to comment my C code. I am making use of a foreign API (i.e. not my own) for which documentation is scarce so I intend to document some of that API within my own source files. I do have the header file for the foreign API but it is not practical to add my own comments to that file.
Foreign Header
struct foreignstruct
{
int a;
int b;
};
My Header
/** My structure comments... */
struct mystruct
{
/** Describe field here... */
int field;
};
/** @struct foreignstruct
* @brief This structure blah blah blah...
* @??? a Member 'a' contains...
* @??? b Member 'b' contains...
*/
What tag do I use in place of @???
to get the correct doxygen output (where 'correct' means generated output for mystruct
and foreignstruct
are the same)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许有一天 doxygen 会为此有一个特殊的 @field 标签,在那之前,可以使用以下内容:
这是一个简写符号
Maybe one day doxygen will have a special @field tag for this, until that time, the following can be used:
Which is a short-hand notation for