我正在使用 Doxygen
来记录我的 C++ 代码。所有内容都以 HTML 格式很好地输出,除了像下面这样的属性/变量不是(根本不是)。
/**
* Flag to check whether the variable is once initialized or not
*/
bool initialized_;
知道会出什么问题吗?
编辑
initialized_
是一个类成员变量。
最佳答案
我不确定这是否能解决您的问题,因为您提供的有关变量 initialized_
的信息非常少(它是全局变量吗?它是类的一部分等)但是doxygen documentation (参见标题其他地方的文档)指出
To document a member of a C++ class, you must also document the class itself. The same holds for namespaces. To document a global C function, typedef, enum or preprocessor definition you must first document the file that contains it (usually this will be a header file, because that file contains the information that is exported to other source files).
Let's repeat that, because it is often overlooked: to document global objects (functions, typedefs, enum, macros, etc), you must document the file in which they are defined. In other words, there must at least be a
/*! \file */
or a
/** @file */
line in this file.
关于未使用 Doxygen 记录变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9351409/