doxygen - Doxygen 不生成任何文档
问题描述
没有为我的 C 存储库的任何函数生成文档
我的配置:
# Difference with default Doxyfile 1.9.1
PROJECT_NAME = WLib
OUTPUT_DIRECTORY = doxy
OPTIMIZE_OUTPUT_FOR_C = YES
EXTRACT_ALL = YES
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = YES
INPUT = .
FILE_PATTERNS = *.c \
*.h
RECURSIVE = YES
编辑代码:
/** \fn Array Fill
* \param sa size of the array A in bytes
* \param a the array A
* \param sb size of the array B in bytes
* \param b the array B
* \brief Takes two arrays and their sizes. Fills the array A with as many
* instances of array B as the size of array A can handle.
* \return The array A
* Method:
* -# If /e a = NULL, then the array of size /e sa will be allocated
* -# If /e b = NULL and /e sb = 0, then array will be filled with zeros
* -# If /e sb = 0, the function does nothing and returns NULL
* -# Declares a variable /e i, this is be the pointer offset
* -# Assignes array /e b to array /e a offsetted by /e i, and incriments
* /e i by /e sb. This step is repeated until less than sb bytes are
* left untreated
* -# Assignes the remaining part of array /e a with whatever piece of
* array /e b fits
*/
VO* afl(register const U16 sa,
register VO* a,
register U8 sb,
register const VO* b ) {
...
}
解决方案
提供的代码在运行时直接给出答案,并给出警告:
warning: documented symbol 'Array Fill' was not declared or defined.
查看我们在这里看到的代码时:
\fn Array Fill
但从我们了解到的文档中:
\fn(函数声明)
指示注释块包含函数的文档(全局或作为类的成员)。仅当注释块未放置在函数声明或定义的前面(或后面)时才需要此命令。
如果您的注释块位于函数声明或定义之前,则可以(并且应该避免冗余)省略此命令。
包含参数的完整函数声明应在 \fn 命令后的一行中指定,因为参数在行尾结束!
此外,在文档中的给定示例中:
const char *member(char,int) throw(std::out_of_range);
和
/*! \fn const char *Fn_Test::member(char c,int n)
* \brief A member function.
* \param c a character.
* \param n an integer.
* \exception std::out_of_range parameter is out of range.
* \return a character pointer.
*/
换句话说,\fn
命令的语法在这种情况下应该是:
\fn VO* afl(register const U16 sa, register VO* a, register U8 sb, register const VO* b)
笔记:
- 该
\fn
命令通常用于函数文档不直接使用函数字体的情况。在问题的情况下,该\fn
命令不是必需的。 - 看起来
\fn
这里是在命令的上下文中使用的,\brief
而在\brief
命令的上下文中使用的\details
命令。
推荐阅读
- python - 将词向量从 Gensim 加载到 SpaCy Vectors 类
- swift - 在 SCNKit 场景中更改模糊距离
- python - LOSS 在非常简单的 KERAS 二元分类器中没有改变
- javascript - 是否可以使用打字稿映射类型来制作接口的一种非功能属性?
- python - 在尝试操作/过滤由 groupby 操作创建的数据框时使用 (>= & <=) 出现问题
- shell - 如何将文件从远程服务器的docker容器复制到本地机器
- python - 如何避免 PyTorch 中的“CUDA 内存不足”
- javascript - 如何从输入中只获取数字
- alpacajs - TypeError: $(...).getValue 不是函数
- web-services - 在不同平台上使用 Web 服务的分布式事务