c++ - 如何标记@ref 引用的结尾?

标签 c++ documentation doxygen

我正在使用 Doxygen 来记录 C++ 代码,并且正在为代码编写大量的 Doxygen 文档。在一个地方,我在代码中制作了一个组列表,并希望它显示如下:

我的文档源是这样的:

- @ref CM: the module that controls everything
- @ref SM: the module that is the slave of the @CM

但是,问题:Doxygen 似乎将引用名称读取为 CM:,而不是 CM,因此无法找到引用。所以,我需要以某种方式告诉 Doxygen 引用名称结束的位置。 (例如,如果我使用 Bash,并且想要回显一个以“s”作为后缀的变量字符串,我会使用 echo "${NOUN}s"。)

作为一种解决方法,我可以在名称和随后的冒号之间添加一个空格,但这会使生成的文档更难阅读,我想避免使用它。

Special Commands , Doxygen 手册包含以下听起来充满希望的信息:

Some commands have one or more arguments. Each argument has a certain range:

  • If <sharp> braces are used the argument is a single word.
  • If (round) braces are used the argument extends until the end of the line on which the command was found.
  • If {curly} braces are used the argument extends until the next paragraph. Paragraphs are delimited by a blank line or by a section indicator.

好的,这一切都很好,但文档没有说明,而且我无法弄清楚,这些大括号应该放在哪里。独自围绕争论?围绕整个命令和论点?两者都不起作用,而且我想不出一个可行的替代方案。

那么,如何指示 Doxygen 的引用名称的结尾?如果牙套是答案,它们去哪儿了?

最佳答案

这适用于 Doxygen 版本 1.8.11:

\ref name "":

显然,空字符串会触发回退以使用它之前的名称参数。

关于c++ - 如何标记@ref 引用的结尾?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36310223/

相关文章:

java - 记录线程安全(Java + 注释)

documentation - 有没有办法在 protobuf (proto2) 中创建类型别名?

objective-c - Typedef 枚举的内联文档注释 block

python - 如何使用 doxygen 为所有 python 文件创建文档(和调用图)

doxygen - 如何更改 graphviz 的默认字体大小?

c++ - Cygwin 下使用 CMake 编译库

c++ - 带菜单的输入验证 C++

c++ - 一个进程可以从它的虚拟内存中的任何地址读/写吗?

c++ - 使用 Doxygen 记录 C++ 静态模板函数

c++ - 测试和报告多个函数调用返回错误的技术