C的氧气输出 [英] Doxygen output for C

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

问题描述

我使用Doxygen的C ++代码已经很多年了.我想将其与正在使用的某些C代码一起使用,但输出效果并不理想.顶部栏中的类"选项卡仅显示 struct 定义,而不显示文件中的功能.我必须单击文件"选项卡,然后单击头文件的名称以查看其包含的功能.

I have used Doxygen for years with C++ code. I'd like to use it with some C code that I'm working on, but the output is less than optimal. The "Classes" tab in the top bar shows only the struct definitions, not the functions in the file. I have to click on the "Files" tab and then the name of the header file to view the functions it contains.

有没有办法修改Doxygen的输出,使其更适合用C编写的代码?还是至少要删除类"选项卡并仅提供文件"视图?

Is there any way to modify the output of Doxygen so that it is more suitable to code written in C? Or at the very least, remove the "Classes" tab and provide only the "Files" view?

推荐答案

如果除了常规配置文件之外还创建了布局文件:

If you create a layout file in addition to the normal config file:

doxygen -l layout.xml

您可以对其进行编辑;这控制了界面的基本格式.如果要删除类别"标签,请找到:

You can edit that; this controls the basic format of the interface. If you want to remove the "Classes" tab, locate:

<tab type="classes" visible="yes" title="Types">
    [...]
</tab>

然后将其删除或将 visible 更改为否".

And remove it or change visible to "no".

C函数和数据类型通常以非随机的方式组合在文件中,因此仅文件"选项卡即可满足您的需求.如果没有,请使用组:

C functions and datatypes are usually grouped together in files in a non-random way, so the "Files" tab alone may be sufficient for you. If not, use groups:

\ingroup foobar

可以添加到结构和函数定义等中.然后,您需要一个

Can be added to struct and function definitions, etc. You then need a

\defgroup foobar Description of foobar.

某处.然后,将由

<tab type="modules" visible="yes" title="Modules" intro=""/>

layout.xml 中生成比文件"更直观的界面(例如,来自 .h 的结构文档和来自的功能文档.如果将c 放在同一个组中,则它们会组织在一起),类似于类"与C ++的工作方式.

From layout.xml, producing a possibly more intuitive interface than "Files" (e.g., struct documentation from a .h and function documentation from a .c are organized together if they are in the same group), akin to how "Classes" works with C++.

doxygen网站中有更多有关此内容的信息.

There's more about this stuff in the doxygen site.

这篇关于C的氧气输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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