Doxygen 没有为函数添加文档

wro*_*ame 3 c++ doxygen

Doxygen 没有在此类中添加我的任何成员函数的文档:

#ifndef SET_H_
#define SET_H_

/** @file */

/**
 * A mathematical set
 */
class Set
{
    virtual ~Set();

    /**
     * The countability of this set
     * @returns Whether this set is a countable one or not.
     */
    virtual bool isCountable();

    ...
}

#endif /* SET_H_ */
Run Code Online (Sandbox Code Playgroud)

它可以很好地生成类文档,但即使我设置EXTRACT_ALL为 YES,也不会生成函数文档。你知道为什么会这样吗?

usr*_*567 5

该函数是私有的,除非另外声明为public或protected。

默认情况下,doxygen 排除私有函数,即使设置EXTRACT_ALL为 true 时也是如此。您可以通过添加到 Doxyfile 来包含它们EXTRACT_PRIVATE = YES。

引用Doxygen 的常见问题解答:

你的类/文件/命名空间有记录吗?如果不是,则不会从源中提取它,除非在配置文件中将 EXTRACT_ALL 设置为 YES。

会员是私人的吗?如果是这样,您必须将 EXTRACT_PRIVATE 设置为 YES 以使它们出现在文档中。