Groups

Breathe has basic support for the grouping functionality that Doxygen provides.

Using the example from the Doxygen docs:

// Example from Doxygen documentation

/** A class. More details about the Test class */
class Test
{
  public:
    //@{
    /** Same documentation for both members. Details */
    void func1InGroup1();
    void func2InGroup1();
    //@}

    /** Function without group. Details. */
    void ungroupedFunction();
    void func1InCustomGroup();
  protected:
    void func2InCustomGroup();
};

void Test::func1InGroup1() {}
void Test::func2InGroup1() {}

/** @name Custom Group
 *  Description of custom group
 */
//@{
/** Function 2 in custom group. Details. */
void Test::func2InCustomGroup() {}
/** Function 1 in custom group. Details. */
void Test::func1InCustomGroup() {}
//@}

If we reference this with a directive, for example:

.. doxygenclass:: Test
   :project: userdefined
   :members:
   :protected-members:

It renders as:

class Test

A class.

More details about the Test class

Custom Group

Description of custom group

void func1InCustomGroup()

Function 1 in custom group.

Details.

void func2InCustomGroup()

Function 2 in custom group.

Details.

Public Functions

void func1InGroup1()

Same documentation for both members.

Details

void ungroupedFunction()

Function without group.

Details.

注解

Any groups which are not named in the original source code will appear as Unnamed Group in the final output. This is different to Doxygen which will number the groups and so name them as Group1, Group2, Group3, etc.