0

I have created group exp in doxygen comments in code below and added function add details. Group was created in documentation in Modules, but it also includes function showInt() without detailing. Why it includes it? How to omit functions that are not in group?

/**
 * \defgroup exp Exported utils library functions
 * \name utils API
 * \brief API provides math functions
 */

#include <iostream>

 /**
  * \ingroup exp
  * \brief Adds two numbers.
  *
  * This function takes two numbers, adds them, and then returns the result.
  *
  * \param x The first number to add.
  * \param y The second number to add.
  * \return The sum of the two numbers.
  */
int add(int x, int y) {
    return x + y;
}


void showInt(int value)
{
    std::cout << "value=" << value;
}

Doxygen version 1.8.17

doxygen -x Doxyfile

# Difference with default Doxyfile 1.8.17
PROJECT_NAME           = "Kyle's Doxygen Test"
PROJECT_NUMBER         = "This is just a test of Doxygen"
GENERATE_LATEX         = NO
INCLUDE_GRAPH          = NO
INCLUDED_BY_GRAPH      = NO

enter image description here

albert
  • 8,285
  • 3
  • 19
  • 32
vico
  • 17,051
  • 45
  • 159
  • 315
  • Does this answer your question? [How can I hide a particular function (in c++) in doxygen?](https://stackoverflow.com/questions/22990449/how-can-i-hide-a-particular-function-in-c-in-doxygen) – Öö Tiib Apr 21 '23 at 08:44
  • Please always mention the doxygen version you used! Isn't this because the `EXTRACT_ALL=YES` that you used (so also include the output of `doxygen -x Doxyfile` in the question), see https://stackoverflow.com/q/76065544/1657886. – albert Apr 21 '23 at 08:55
  • Does this answer your question? [Skip functions without doxygen comments from documentation](https://stackoverflow.com/questions/76065544/skip-functions-without-doxygen-comments-from-documentation) – albert Apr 21 '23 at 08:55
  • I can't understand idea of hiding functions from module. According to my understanding if I put function into group it should be visible there, if no then - not visible. – vico Apr 21 '23 at 09:28
  • Probably you should define which functions are in a group and which are not by means of the commands `\{` and `\}` and also use `HIDE_UNDOC_MEMBERS=YES`. – albert Apr 21 '23 at 09:54
  • The [documentation of doxygen 1.9.7](https://www.doxygen.nl/manual/grouping.html) explicitly states that it "silently resolves the conflict for IntegerVariable by putting it into group IntVariables, because the second instance of IntegerVariable is undocumented". May be the same for 1.8.17. Can you try and add any doc comment and see if it goes away? – Friedrich Apr 21 '23 at 10:04
  • It might be that there is a small bug in doxygen regarding the documented group versus non documented function, I've just pushed a proposed patch, pull request https://github.com/doxygen/doxygen/pull/9994 – albert Apr 21 '23 at 10:58
  • The pull request https://github.com/doxygen/doxygen/pull/9994 has been integarted in the master version of doxygen (1.9.7 (663c3ccdd64d4ef5e02cf6e67779c41b5b97b5fa)) – albert Apr 22 '23 at 07:51

0 Answers0