Doxygen的在C:定义分组 [英] doxygen in c: grouping of defines

查看:131
本文介绍了Doxygen的在C:定义分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我记录C code。与doxygen的。为了使文件更具可读性我想在各个.c / .h文件中对至少增加code使用@defgroup和@ingroup一组。这些团体我想组里面的一些定义一起使用@name块。

I'm documenting C code with doxygen. To make the documentation more readable I want to at least add code in every .c/.h file pair to one group using @defgroup and @ingroup. Inside these groups I want to group some defines together using @name blocks.

在文件页面结果密切看起来我的预期:这是记录在文件中列出的有或多或少很好分组一切。
在另一方面,模块页面只有函数和变量列和第一@name块之前的定义是根据变量中。所有其他的定义和枚举失踪。
卸下@name块列在变量的所有定义/的typedef /枚举。没有自己的部分宏或枚举和在这些网页上没有进一步的分组。

The result in the "file" pages looks closely to what I expected: Everything that's documented in the file is listed there and more or less nicely grouped. In the "module" pages on the other hand only functions and variables are listed and the defines before the first @name block are listed under "variables". All other defines and enums are missing. Removing the @name blocks lists all defines/typedefs/enums under "variables". No own sections for macros or enums and no further grouping on these pages.

我如何得到所有定义和枚举像那里的定义/功能等被记录的文件页面的模块/组页面上列出的一组?

How do I get all defines and enums in a group listed on the module/group page like on the file pages where the defines/functions etc. are documented?

我使用的doxygen 1.8.9.1窗口binarires。

I use doxygen 1.8.9.1 windows binarires.

我的code类似于此:
.h文件中:

My code looks similar to this: .h file:

/** @file
*   blabla
*   @author bla
*/
/// @ingroup MY_GRP
/// @{
#define SOMEDEF1 1
/// @name Special defs
/// @{
#define SOMEDEF2 2
/// @}
enum someenum {
foo,
bar
};

extern int some_variables;

extern void some_proc(int baz);

/// @}

.c文件看起来是这样的:

.c file looks like this:

/** @file
 *  blabla
 *  @author bla
 */
/** @defgroup MY_GRP A test group.
  * Description
  */
/// @{
#include "my.h"

/// Important variable.
int some_variable;

/** Important proc
 *  Description
 *  @param baz need this
 */
void some_proc(int baz) {
// code
}

/// @}

我让doxygen的威泽德产生的Doxyfile并且也产生了DoxygenLayout.xml文件。
当与布局文件播放角落找寻我发现,规定对本集团的网页标签是空的(他们显然什么都不做),而在变量部分的定义是由membergroups标签生成......不要明白这是怎么了这一点。

I let doxygen wizzard generate a doxyfile and also generated a DoxygenLayout.xml file. When playing arround with the layout file I found that the "defines" tags on the group pages are empty (they apparently do nothing) while the "defines" in the variables section are generated by a "membergroups" tag... Don't know what to make of this.

任何帮助很多AP preciated。如果您需要的Doxyfile或其他任何东西让我知道。

Any help is much appreciated. If you need the doxyfile or anything else let me know.

推荐答案

添加文件中的所有成员到组可以使用@addtogroup标签来完成。

同样的问题是已经在这里回答说:
<一href=\"http://stackoverflow.com/questions/22414328/doxygen-can-file-members-inherit-a-module-grouping-if-they-are-in-a-file-that-i/22461669#22461669\">Doxygen:可以归档成员继承模块分组,如果他们在被分组的文件?

The same question is already answered here: Doxygen: Can file members inherit a module grouping if they are in a file that is grouped?

这篇关于Doxygen的在C:定义分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆