从依赖关系图中排除特定的标头 [英] Excluding specific headers from dependency graphs

查看:64
本文介绍了从依赖关系图中排除特定的标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是一个 doxygen 还是一个 dot 问题,但是可以了。

I am not sure whether this is to be a doxygen or a dot question, but here goes.

在我的项目中,我有很多文件需要包含常见的标头,例如 stdlib.h stdint.h ,依此类推。当我要求 doxygen 为我的每个文件生成依赖关系图时,这会导致很多混乱和杂乱无章,因为绘图工具总是重用现有节点,并且从不重复它们。

In my project I have many files that need to include common headers such stdlib.h, stdint.h, and so on. When I ask doxygen to generate the dependency graphs for each of my files, this leads to a lot of clutter and noise as the drawing tool always reuses existing nodes and never duplicates them.

我能以某种方式告诉 doxygen 从生成的图形中排除一组标题,只是完全忽略它们吗?我不希望在构建文档时不要使用可怕的预处理器技巧来删除#include。

Can I somehow tell doxygen to exclude a set of headers from the generated graph, simply ignore them completely? I'd prefer not to resort to horrible preprocessor tricks to delete the #include's when building the documentation.

我发现有几个邮件列表线程询问某人是否有相同问题,但是他们没有得到答复,也没有关于使用依赖关系图的最大深度的建议,这根本行不通,因为标头可以包含在任何深度(因此这样做最终会使我自己的本地标头陷入困境)。

I found a couple mailing list threads of someone asking the same thing, but they either got no reply or a suggestion about playing with the dependency graph's maximum depth, which simply does not work, as the headers can be included at any depth (so doing that ends up munching my own local headers).

推荐答案

这个有点远,因为我的脱氧剂有点生锈,但是您是否尝试过

Bit of a long shot this because my doxygen is a bit rusty, but have you tried

\cond \endcond

标头部分。 (有条件包含,但空白= false)

around the header section. (Conditional inclusion, but blank = false)

例如,标准C或C ++标头通常会使相关性图混乱很多,因此您可能要从中删除它们图(因为它们的用法可以视为语言的一部分)。
您可以在这样的文件基础上进行此操作(经过1.8.7测试):

For example, the standard C or C++ headers usually clutter the dependency graph pretty much, so you might want to remove them from that graph (as their usage can be considered as part of the language). You can do that on a file basis like this (tested with 1.8.7):

/// \cond
#include <iostream>
#include <string>   // whatever...
/// \endcond

在其他情况下,这不包括标记之间的代码从可见到doxygen,但我不确定它是否适用于此实例。

In other instances this excludes the code between the markers from being visible to doxygen, but I'm unsure it will work for this instance.

这篇关于从依赖关系图中排除特定的标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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