Doxygen:C ++项目中的多个\mainpage块 [英] Doxygen: multiple \mainpage blocks in a C++ project

查看:1172
本文介绍了Doxygen:C ++项目中的多个\mainpage块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在两种情况下,我无法确定doxygen的行为是关于 \mainpage 部分:

I wasn't able to determine what the behavior of doxygen is regarding the \mainpage section, in two cases:


  1. 如果您不指定 \mainpage 部分,是否使用任何其他页面,如果是这样, / li>
  2. 如果两个文件都指定了 \mainpage 部分,该怎么办?

  1. If you specify no \mainpage section, does it use any other page instead and if so how is this picked?
  2. What if two files both specify a \mainpage section?


推荐答案

\mainpage 命令指定用于自定义索引页的内容,

The \mainpage command specifies content used to customise the index page, so if you lack one it's just a blank page with the normal Doxygen header and footer.

我认为有关多个 \mainpage 命令是它是未定义在经典意义上产生不可预测的结果,取决于版本和平台。类似地,当我不小心创建了多个具有相同页面名称的 \ page 命令时,我遇到了奇怪的结果。

I think the safest thing to say about having multiple \mainpage commands is that it is undefined in the classic sense of yielding unpredictable results depending on version and platform. Similarly, I've had weird results when I accidentally created more than one \page command with the same page name.

进一步思考

,记住你可以得到Doxygen服从预处理器指令,所以你可以有#if条件保护多个mainpage指令,并运行不同的配置

Prompted by answering another Doxygen question, remember you can get Doxygen to obey the preprocessor directives so you can have #if conditionals protect the multiple mainpage directives and run different config files over the same code base, where the config files define one of several flag values.

我使用这个从不同的角度生成文档发布 Macintosh 面向Windows的版本的相同引用。

I have used this generate the docs from different perspectives approach to publish Macintosh and Windows-oriented versions of the same reference.

这篇关于Doxygen:C ++项目中的多个\mainpage块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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