如何将库的doxygen \ mainpage翻译成\ page?

问题描述 投票:1回答:1

我有一个库,使用doxygen记录,在较大的项目中使用。我的库有一个很好的\ mainpage,当我在较大的项目上运行doxygen时,我希望将其降级为\ page。有没有一种简单的方法可以在不依赖Doxygen安装的工具的情况下完成这项工作?为了说明,当在库上运行doxygen时,doxygen应该看到:

/**    
\mainpage

\section main_introduction Introduction

The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/

当我在较大的项目中运行doxygen时,它应该看到:

/**    
\page gen_MC_mainpage Gen-MC

\section main_introduction Introduction

The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/

我假设我可以使用INPUT_FILTER和perl脚本来执行此操作,但是我需要安装人员来生成文档的工具越多,他们使用它的可能性就越小。

doxygen
1个回答
2
投票

这可以使用条件来实现

/**    
\if USEMAINPAGE
\mainpage
\else
\page gen_MC_mainpage Gen-MC
\endif

\section main_introduction Introduction

The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/

在较小的项目的Doxyfile中,将USEMAINPAGE添加为已启用的部分:

ENABLED_SECTIONS       = USEMAINPAGE

if command了解更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.