【发布时间】:2019-03-26 09:51:12
【问题描述】:
我正在为一些 C++ 代码编写 doxygen cmets。我有两个功能:
/** Some existing doxygen comment */
int foo(int x);
/** Another existing doxygen comment */
int foo(
this_signature y1,
is_really_long y2,
and_to_be_honest y3,
i_would y4,
really_rather y5,
avoid_repeating_it y6);
/** This is what I'm writing now */
int foo(double z);
在第二个函数的 doxygen 注释中,我想引用 @ref 来表示第二个函数,或者更确切地说是该函数的第二个变体。我该怎么做呢?
注意:我特别(不仅仅是机器人)对一个不会非常冗长的解决方案感兴趣(考虑到第二个函数的长签名)。
【问题讨论】:
-
我找到了SO: Doxygen: How to reference a function, but with arguments values。根据接受的答案,看起来可以引用带有签名的函数。我必须承认我从未尝试过,也不知道这是否有效。
-
@Scheff:但这可能是一个非常长的字符串。
-
我也在 Doxygen 文档中找到了。 Automatic link generation Links to functions.
-
但这可能是一个非常长的字符串。我不知道你想要捷径之类的东西。可能是,值得在问题中提及。
-
可能正在使用
\anchor?
标签: c++ comments documentation doxygen cross-reference