如何在 Doxygen 生成的文档中显示默认构造函数?
How to show the default constructor in Doxygen generated documentation?
有个class答:
class A {
public:
/// @brief constructor taking no param
A() {}
/// @brief constructor taking 1 param
/// @param[in] x x
A(int x) {}
/// @brief constructor taking 2 params
/// @param[in] x x
/// @param[in] y y
A(int x, int y) {}
};
使用 Doxygen 生成文档后,"Constructor & Destructor Documentation" 部分将包含构造函数 A(int x)
和 A(int x, int y)
的文档。但是不适用于 A()
.
我可以设置任何标志来强制 Doxygen 在 class 文档的相关部分中包含 A()
的构造函数吗?
编辑: 我必须编辑我的原始代码,因为它似乎取决于 @param
代码是否记录在 "Constructor & Destructor Documentation" 部分默认情况下。
Doxygen 版本 1.8.16 的输出:
在没有详细文档(或参数文档等)的情况下,'Constructor & Destructor Documentation'等详细部分默认不显示方法等。通过设置:
ALWAYS_DETAILED_SEC=YES
您还将获得 "missing" 构造函数。
注意也看看例如REPEAT_BRIEF
.
记录的构造函数具有非非简要文档内容。因此,该构造函数没有自己的文档块。它会出现在简短列表中,但不会出现在完整列表中。
所以你应该给构造函数一些非简短的内容。
ALWAYS_DETAILED_SEC
If the ALWAYS_DETAILED_SEC
and REPEAT_BRIEF
tags are both set to YES
then doxygen will generate a detailed section even if there is only a brief description.
The default value is: NO
.
因此,您应该找到列在顶部的构造函数;默认情况下,它只是没有自己的 "detailed" 描述,因为没有要提供的详细信息。
有个class答:
class A {
public:
/// @brief constructor taking no param
A() {}
/// @brief constructor taking 1 param
/// @param[in] x x
A(int x) {}
/// @brief constructor taking 2 params
/// @param[in] x x
/// @param[in] y y
A(int x, int y) {}
};
使用 Doxygen 生成文档后,"Constructor & Destructor Documentation" 部分将包含构造函数 A(int x)
和 A(int x, int y)
的文档。但是不适用于 A()
.
我可以设置任何标志来强制 Doxygen 在 class 文档的相关部分中包含 A()
的构造函数吗?
编辑: 我必须编辑我的原始代码,因为它似乎取决于 @param
代码是否记录在 "Constructor & Destructor Documentation" 部分默认情况下。
Doxygen 版本 1.8.16 的输出:
在没有详细文档(或参数文档等)的情况下,'Constructor & Destructor Documentation'等详细部分默认不显示方法等。通过设置:
ALWAYS_DETAILED_SEC=YES
您还将获得 "missing" 构造函数。
注意也看看例如REPEAT_BRIEF
.
记录的构造函数具有非非简要文档内容。因此,该构造函数没有自己的文档块。它会出现在简短列表中,但不会出现在完整列表中。
所以你应该给构造函数一些非简短的内容。
ALWAYS_DETAILED_SEC
If the
ALWAYS_DETAILED_SEC
andREPEAT_BRIEF
tags are both set toYES
then doxygen will generate a detailed section even if there is only a brief description.The default value is:
NO
.
因此,您应该找到列在顶部的构造函数;默认情况下,它只是没有自己的 "detailed" 描述,因为没有要提供的详细信息。