在doxygen文档中如何创建指向文件特定行的链接 [英] In doxygen documentation how to create a link to a specific line of a file

查看:80
本文介绍了在doxygen文档中如何创建指向文件特定行的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几种doxygen命令,其目的是在文档中创建链接( @link @ref ).
我目前正在使用 @ref 命令创建指向自定义文件的链接,以doxygen(xml)不支持的语言编写.
我想更改此链接,使其指向文件中的精确行.
有一个doxygen命令可以这样做吗?

There are several doxygen commands whose purpose is to create links in the documentation (@link, @ref).
I am currently using the @ref command to create a link to a custom file, written in a language not supported by doxygen (xml).
I would like to alter this link so that it points to a precise line in the file.
Is there a doxygen command that allows to do that ?

推荐答案

我不确定 \ ref \ link 是否可以做到这一点.但是,如果可以的话,采用此方法的一个问题是,如果在不更改链接的情况下更改了要链接的文件的内容,则链接将变得无效.这是分离源代码和文档的问题之一.

I'm not sure that \ref or \link can do this. However, if they could, one problem of adopting this approach is that the links will become invalid if you change the contents of the file you are linking to without changing the link. This is one of the problems of separating source code and documentation.

为什么不链接到另一个文件中的特定行,为什么不包括您对文档感兴趣的文件的特定部分呢?您可以:

Rather than linking to a particular line in another file why don't you include the particular part of the file you are interested in in the documentation? You could either:

编辑:或者,您可以使用 \ dontinclude 命令,该命令与 \ line \ skip \ skipline \ until 命令允许您包括特定文件的特定行/块.请参阅 \ dontinclude 文档中的示例.

Edit: Alternatively, you could use the \dontinclude command which, together with the \line, \skip, \skipline, and \until commands allows you to include specific lines/blocks of a particular file. See the example in the \dontinclude documentation.

这篇关于在doxygen文档中如何创建指向文件特定行的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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