The Doxygen documentation says that \ingroup can be used to add an entity to multiple groups:
\ingroup (<groupname> [<groupname> <groupname>])
The problem is that I tried it and Doxygen adds the entitiy to just the last group in the group list. Something like
/** \ingroup A B
* ...
*/
adds the element to module A, but not to B. Does anyone know why, and how to solve it?
I tried it with Doxygen versions 1.7.6.1 and 1.8.1.2.
Thanks for your help.
EDIT: I realized that doxygen outputs a warning that says:
Member X found in multiple @ingroup groups! The member will be put in group B, and not in group A
It seems to me that this is contradictory with the documentation.
ANSWER: I answer myself. I was trying to add functions to multiple groups, but the documentation says "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".
You usually (for allowed items, lets say a file) just need to write a ingroup with multiples group. Let me show, for completeness, a template I use:
/**
* \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/>>.
*
*/
Now, from the Doxygen Documentation, specially the page linked here, you read:
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
The documentation also explains why:
(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).
So, for short, unfortunately you cannot add a function (or all kinds of entities, as you didn't specify, for that matter) to multiples groups.
I hope this link helps you with more questions you may have.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With