[英]Documenting C++ aliases in Doxygen
With the appropriate comment in front of it, Doxygen generates entries for class
, struct
and namespace
declarations but not occurrences of typedef
or using
. 在Doxygen前面加上适当的注释后,它会为
class
, struct
和namespace
声明生成条目,但不会出现typedef
或using
。
In this example 在这个例子中
/// here is my typedef
typedef int MyTypedef;
/// here is my namespace
namespace MyNamespace
{
/// here is my other typedef
typedef int MyOtherTypedef;
}
I get an entry in the documentation for MyNamespace
and even MyOtherTypedef
but there is nothing for MyTypedef
. 我在
MyNamespace
甚至MyOtherTypedef
的文档中MyNamespace
一个条目,但是MyTypedef
没有任何MyTypedef
。 Why not? 为什么不?
The answer is the same as the answers to why entries for functions and preprocessor definitions are not automatically generated. 答案与为什么不自动生成函数和预处理程序定义条目的答案相同。
Doxygen considers aliases, variables, functions and macros (but not classes or namespaces) to be 'objects'. Doxygen将别名,变量,函数和宏(而不是类或名称空间)视为“对象”。 And all 'objects' are documented iff their containing file, class or namespace is also documented.
和所有的“对象”都记录IFF其包含的文件,类或命名空间也被记录在案。
For MyTypedef
to feature in your documentation, add: 为了使
MyTypedef
出现在您的文档中,请添加:
/// \file
/// here is my file
anywhere in the global scope of your file. 文件全局范围内的任何位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.