【发布时间】:2016-08-08 19:43:53
【问题描述】:
我看到大多数 Doxygen 文档对 c++ 函数的评论看起来类似于
/// a description of the function or method followed with comments, like so
/// @return true=success, false=error
/// @param[in] bar blah blah
/// @param[out] baz blah blah
/// @param[out] quux blah blah
/// @param[out] quuux blah blah
/// @param[out] quuuux blah blah
static bool foo_one( int *bar, int *baz, int *quux, int *quuux, int *quuuux );
或 xml 等效项(大致)
/// a description of the function or method, followed by
/// <returns>true=success, false=error</returns>
/// <param name=bar>blah blah</param>
/// <param name=baz>blah blah</param>
/// <param name=quux>blah blah</param>
/// <param name=quuux>blah blah</param>
/// <param name=quuuux>blah blah</param>
static bool foo_two( int *bar, int *baz, int *quux, int *quuux, int *quuuux );
但我主要是在内联评论我的参数,就像这样
/// a description of the function or method, followed by
/// @return true=success, false=error
static bool foo_three(
int *bar, ///< [in] blah blah
int *baz, ///< [out] blah blah
int *quux, ///< [out] blah blah
int *quuux, ///< [out] blah blah
int *quuuux ///< [out] blah blah
);
所有这三个都在 html 文件中给出相同的输出(除了中间一个,它没有指定输入/输出)。
我的问题:Doxygen、Visual Studio 或任何其他环境中是否有我无法通过内联方法使用的功能?我知道在编写和阅读代码本身的 cmets 时存在个人偏好,并且不想讨论这些。我只想知道是否有 Doxygen 或其他环境功能或我会错过的格式。
【问题讨论】:
-
你是什么意思(罚分)?文档实际上渲染得好吗?如果是这样,你在烦恼什么?
-
您可能想询问Doxygen Forums 之一。
-
@πάντα ῥεῖ,无意冒犯,但正如我所问,是否有 Doxygen、Visual Studio 或任何其他环境的功能无法用于我的内联方法?我对输出的外观很满意,但我的公司希望评论大量遗留代码,如果 XML 或其他技术具有我不知道的特性,我不想将它们引导到我的技术中方法无法利用。
-
@buttonsrtoys 我仍然不明白你现在想要什么。你使用 doxygen 还是其他什么东西?