在 JAVADOC_AUTOBRIEF 中禁止结束简短描述的句点

Suppress periods from ending brief description in JAVADOC_AUTOBRIEF

JAVADOC_AUTOBRIEF 设置似乎非常方便,所以不用写:

/// \brief Brief description.
///        Brief description continued.
///
/// Detailed description starts here.

你可以这样写:

/// Brief description; brief description continued.
///
/// Detailed description starts here.

然而,我在这里使用 ; 将内容合并为一个句子,我希望有 选项 以某种方式阻止句号结束简要说明。

当我稍微浏览一下源代码时,我 found a suggestion 你可以通过转义句点来解决这个精确的问题。但是:/// Brief description\. Brief description continued. 对我不起作用。

根据该建议,似乎 起作用的是 "escaping the space" 和 /// Brief description.\ Brief description continued。我不相信那是真正的 "feature" doxygen,我只是把它搞糊涂了,它忽略了一个错误状态。

我相信如果将 MULTILINE_CPP_IS_BRIEF 设置为 YES,然后将 JAVADOC_AUTOBRIEFQT_AUTOBRIEF 都设置回 [=15,您会得到想要的行为=].

我必须为我的所有项目设置这个,因为我太冗长了。它允许我在 "brief" 描述中写多个句子——甚至跨越多行——而不会被 doxygen 打断。

缺点是您必须在多行简要说明和始终多行详细说明的开头之间跳过一行。显然,这就是它知道何时开始和何时结束的方式。

无论如何,你现在可以写这样的东西了:

/// Returns the alpha channel value of this color, represented as a percentage.
/// A value of 0% means completely transparent, while 100% means fully opaque.
/// 
/// According to [Wikipedia](https://en.wikipedia.org/wiki/Alpha_compositing),
/// the concept of an alpha channel was first introduced by Alvy Ray Smith in
/// the late 1970s, and fully developed in a 1984 paper by Thomas Porter and
/// Tom Duff. In a 2D image element, which stores a color for each pixel, the
/// additional transparency data is stored in the alpha channel...
/// @return  Returns a percentage from 0 (completely transparent) to 100 (fully opaque)
///              that indicates the color's alpha channel transparency.
/// @see SetAlpha() to set a new alpha channel value
int GetAlpha() const;

并得到这样的输出:

Returns the alpha channel value of this color, represented as a percentage. A value of 0% means completely transparent, while 100% means fully opaque.

According to Wikipedia, the concept of an alpha channel was first introduced by Alvy Ray Smith in the late 1970s, and fully developed in a 1984 paper by Thomas Porter and Tom Duff. In a 2D image element, which stores a color for each pixel, the additional transparency data is stored in the alpha channel...

无需转义!您可以在函数、类、名称空间或其他任何地方使用它。整个多行简短描述甚至显示在大表中(例如,就像您在列出项目中所有名称空间的页面上看到的那样)。

Based on that suggestion, what appeared to work instead was "escaping the space" as /// Brief description.\ Brief description continued. I'm not convinced that's an actual "feature" of Doxygen

这是 manual 中记录的官方功能:

If you enable this option and want to put a dot in the middle of a sentence without ending it, you should put a backslash and a space after it. Here is an example:

/** Brief description (e.g.\ using only a few words). Details follow. */

我已经为关于 \. 的文档提交了错误报告 (Bugzilla #782373)。