Grouping Doxygen:如何在多个组中包含一个元素
Doxygen文档说明\ingroup可用于将实体添加到多个组:Grouping Doxygen:如何在多个组中包含一个元素,grouping,doxygen,Grouping,Doxygen,Doxygen文档说明\ingroup可用于将实体添加到多个组: \ingroup (<groupname> [<groupname> <groupname>]) 将元素添加到模块A,但不添加到模块B。有人知道为什么以及如何解决它吗 我用Doxygen版本1.7.6.1和1.8.1.2进行了尝试 谢谢你的帮助 编辑:我意识到doxygen会输出一条警告,上面写着: Member X found in multiple @ingroup groups! The
\ingroup (<groupname> [<groupname> <groupname>])
将元素添加到模块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和枚举)只能是一个组的成员”。您通常(对于允许的项,让我们说一个文件)只需要用multiples group编写一个ingroup。为了完整起见,让我展示一下我使用的模板:
/**
* \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/>>.
*
*/
文件还解释了原因:
(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).
因此,简而言之,不幸的是,您无法向多个组中添加函数(或所有类型的实体,因为您没有指定)
我希望此链接能帮助您解答更多问题。使用
/** \ingroup A B
* ...
*/
仅当在其他地方定义了组A
和B
时,才会将项目添加到组中。如果未定义组,则不会仅因为在\ingroup
命令中使用而定义该组
您应该能够通过使用获取组B
中的项目
/** \defgroup B
* @{
* @}
*/
/** \ingroup A B
* ...
*/
/** \ingroup A B
* ...
*/
/** \defgroup B
* @{
* @}
*/
/** \ingroup A B
* ...
*/