doxygen 如何在引用实体时包含描述
doxygen how to include description when referencing an entity
在某些文件中有一个函数
///some description of the function foo.
void foo();
在文档的一个页面中
\ref foo()
我得到一个 link 到 foo() 但有没有办法包含描述
"///some description of the function foo."
连同 link。
\ref
命令的第二个参数可以显示文本,但该文本必须在引号之间,并且将显示为 link 文本。这意味着您必须再次键入文本。
当我们假设请求的文本是函数的简要描述时,我们可以这样做:
/// \ref foo() \copybrief foo()
完整示例:
/// \file
///
/// \ref foo()
///
/// \ref foo() \copybrief foo()
///
/// \ref bar()
///
/// \ref bar() "some description of the function bar."
///
/// \ref bar() \copybrief bar()
/// some description of the function foo.
void foo();
/// \brief some description of the function bar.
void bar();
导致:
当请求的文本不是简短描述时,用户可能会使用 \copydetails
/ \copydoc
或 \snippet{doc}
.
等命令完成某些操作
在某些文件中有一个函数
///some description of the function foo.
void foo();
在文档的一个页面中
\ref foo()
我得到一个 link 到 foo() 但有没有办法包含描述
"///some description of the function foo."
连同 link。
\ref
命令的第二个参数可以显示文本,但该文本必须在引号之间,并且将显示为 link 文本。这意味着您必须再次键入文本。
当我们假设请求的文本是函数的简要描述时,我们可以这样做:
/// \ref foo() \copybrief foo()
完整示例:
/// \file
///
/// \ref foo()
///
/// \ref foo() \copybrief foo()
///
/// \ref bar()
///
/// \ref bar() "some description of the function bar."
///
/// \ref bar() \copybrief bar()
/// some description of the function foo.
void foo();
/// \brief some description of the function bar.
void bar();
导致:
当请求的文本不是简短描述时,用户可能会使用 \copydetails
/ \copydoc
或 \snippet{doc}
.