gpt4 book ai didi

grouping - Doxygen:如何在多个组中包含一个元素

转载 作者:行者123 更新时间:2023-12-04 03:52:30 24 4
gpt4 key购买 nike

Doxygen 文档说\ingroup 可用于将实体添加到多个组:

\ingroup (<groupname> [<groupname> <groupname>])

问题是我试过了,Doxygen 将实体添加到组列表中的最后一个组。就像是
/** \ingroup A B
* ...
*/

将元素添加到模块 A,但不添加到 B。有谁知道为什么,以及如何解决它?

我尝试使用 Doxygen 版本 1.7.6.1 和 1.8.1.2。

谢谢你的帮助。

编辑:我意识到 doxygen 输出警告说:
Member X found in multiple @ingroup groups! The member will be put in group B, and not in group A

在我看来,这与文档相矛盾。

答:我自己回答。我试图将函数添加到多个组,但文档说“请注意,复合实体(如类、文件和命名空间)可以放入多个组中,但成员(如变量、函数、typedef 和枚举)只能是一个团体的成员”。

最佳答案

您通常(对于允许的项目,比如说一个文件)只需要编写一个带有多个组的内组。为了完整起见,让我展示一个我使用的模板:

/**
* \file
* \ingroup GrpTest GrpLicense
* \brief Here your brief explanation
* \details And you put here a more detailed explanation to the
* contents of the file.
* \version 1.0
* \date 2014-09-27
* \author Dr Beco
* \par Webpage
* <<http://www.program.pg/>>
* \copyright (c) 2014 GNU GPL v3
* \note This program is free software: you can redistribute it
* and/or modify it under the terms of the
* GNU General Public License as published by
* the Free Software Foundation version 3 of the License.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program.
* If not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA. 02111-1307, USA.
* Or read it online at <<http://www.gnu.org/licenses/>>.
*
*/

现在,来自 Doxygen Documentation ,特别是此处链接的页面,您阅读:
Note that compound entities (like classes, files and namespaces) 
can be put into multiple groups,
but members (like variable, functions, typedefs and enums)
can only be a member of one group

该文档还解释了原因:
(this restriction is in place to avoid ambiguous linking
targets in case a member is not documented in the context
of its class, namespace or file, but only visible as part of a group).

因此,简而言之,不幸的是,您无法将函数(或您未指定的所有类型的实体)添加到多个组中。

我希望此链接可以帮助您解决更多问题。

关于grouping - Doxygen:如何在多个组中包含一个元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16817596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com