10

I have found how to give a group of class members a name:

/**\{
\name Foo
*/
 members
/**
\}*/

, but how do I reference to Foo from other class members?

user877329
  • 6,717
  • 8
  • 46
  • 88

2 Answers2

11
/** \{
\anchor Foo
\name   Foo
*/
members
/** \} */

The anchor allows you to refer to the group from elsewhere using

/// \ref Foo
Eric Miller
  • 1,944
  • 16
  • 12
  • 2
    This works but anchor is created after the Group name and brief description. so it appears in middle of the group content! Wish there is proper support for this – balki Jun 06 '14 at 16:34
0

No sure if naming a group is the same as defining one using \defgroup id name but with the latter you can \ref the id and it will link to the group's documentation.

stefanct
  • 2,503
  • 1
  • 28
  • 32
  • It is not the same. `\defgroup` defines a [module](https://www.doxygen.nl/manual/grouping.html#modules) whereas [member groups](https://www.doxygen.nl/manual/grouping.html#memgroup) are started with `\name`. – user5534993 Jun 08 '21 at 09:53