Doxygen:如何使整个文件“内部"? [英] Doxygen: how to make an entire file "Internal"?

查看:89
本文介绍了Doxygen:如何使整个文件“内部"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作我的文档"Internal"的整个页面,以便仅在INTERNAL_DOCS = YES时生成.我将markdown格式用于此文档的大写文本,因此所有这些文件都具有 .md 扩展名,但这不应该有所作为.

I want to make an entire page of my documentation 'Internal' so that it is only generated when INTERNAL_DOCS = YES. I'm using markdown format for the bulk text of this document, so all these files are .md extension, not that that should make a difference.

如果我将其应用于源文本文件的@page part 中,则将按预期方式工作,因为页面的所有证据都将从输出中消失:

If I apply this within an @page part of a source text file the following works as expected, in that all evidence of the page disappears from the output:

@internal
@page hidden_page Blah Blah
Text is here.    
@endinternal

但是,我的某些页面很长,因此将它们分解到一个单独的文件中.

However, some of my pages are quite long and I've factored them out to a separate file.

# Page Title

Extensive text here.

第一行降价标题使用页面标题的文件名停止Doxygen.

The first-line markdown title stops Doxygen using the filename for the title of the page.

问题是,如果我这样做了……

The problem is, if I do this...

@internal
# Page Title

Extensive text here.
@endinternal

文本 body 被适当隐藏,但是输出中仍然存在(空白)页面,并显示文件名作为页面标题.

The text body is duly hidden, but the (blank) page still exists in the output, showing the filename as the page title.

颠倒顶行的顺序并没有真正的区别-只是意味着空白页的标题不同.

Reversing the order of the top lines makes no real difference - it just means the blank page is titled differently.

我在Doxygen手册的相关部分中找不到任何内容.我正在使用1.8.5.

I can't find anything in the relevant parts of the Doxygen manual. I'm using 1.8.5.

一个不受欢迎的解决方案是将分离的页面分解"为始终可见的页面,并使用上面介绍的技术.但是,有很多这样的页面.

One, undesirable, solution is to 'unfactor' the separated page(s) back into a page that is always visible and use the technique described at the top. However, there are quite a number of such pages.

有人知道如何将整个文件完全制作成内部文件,或者是否有其他可行的方法?

Does anyone know how whole files can be made completely internal, or have any other approaches that may work for this?

推荐答案

在涉及页面的地方使用@internal并没有取得很大的成功,因此我成功的方法是将@if和ENABLED_SECTIONS一起使用,参见 Doxygen if命令.我已经用python文件测试了以下内容,尽管这确实会产生一些警告,但它确实满足了我的需要.

I've not had a lot of success with using @internal where pages are concerned so the method I have had success with is using @if along with ENABLED_SECTIONS, see Doxygen if command. I've tested the following out with python files and although this does generate a couple of warnings it does what I think you need.

## @if COND1
# @file cond_file.py Conditional File
#
# Conditional documentation.
#
# @page conditional_page Conditional Page
#
# This page will only exist if COND1 is set.
#
# @endif

如果您希望文档中包含此部分,只需将以下内容添加到doxygen配置文件中即可:

The if you want the section included in your documentation simply add the following to the doxygen config file:

ENABLED_SECTIONS = COND1

这篇关于Doxygen:如何使整个文件“内部"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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