未使用 Doxygen 记录变量

标签 variables attributes doxygen

我正在使用 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/

相关文章:

c++ - 如何在不在 C++ 中创建数组的情况下创建变量名?

javascript - 获取变量函数表达式的名称?

jquery - 将 $.get 的响应存储在变量中以供稍后使用

python - 通过共享节点属性定位 networkx 节点

c++ - 从 Doxygen 隐藏模板实现细节

c++ - 我如何记录以便文档适用于类成员而不是匿名类型?

javascript - 在 Node.js 中导出变量的推荐方法

c# - 从没有反射的c#源代码中提取属性

javascript - 删除禁用属性,jquery 在 Chrome 中不起作用

Doxygen 的 CMake