Doxygen组警告:组内文件结束

时间:2015-02-12 14:06:27

标签: c module grouping doxygen

我正在尝试在C头文件中使用doxygen(v1.8.9.1)@defgroup注释,该文件以@{结束,如下所示:

/** @file foo.h
 * @brief This is a foo file
 */

#ifndef FOO_H_
#define FOO_H_

#include somebar.h

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 * @{
 */

#ifdef __cpluplus
    extern "C" {
#endif

/* foo declarations here with standard doxygen documentation */

#ifdef __cpluplus
    }
#endif

/** @} */

#endif

这与doxygen-Grouping-Modules的示例用法相匹配,但是,当我构建它时,这会在文件warning: end of file while inside a group的末尾出现错误。

但是,如果开头@{位于单独的doxygen评论中,则一切正常:

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 */
/** @{ */

这是一个错误还是我做错了什么?

1 个答案:

答案 0 :(得分:1)

在我尝试打开一个小组的两种不同风格的地方时,我在一篇非文档评论中留下了旧组合开启者,doxygen显然仍然像文档评论一样对待。这意味着doxygen认为我打开了两个组,只关闭了其中一个组合!

E.G。

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 * @{
 */

/* @{ */ // Note, only a single leading star so should not be treated as doxygen comment, yet it is.

/* Some code and documentation that is in a group here. */

/**@} */ // Close one group here but the second, unasked-for, group is not closed yet.
/* EOF */