3

I have a C++ class implementation file which has some constants. The constants appear before the class method implementations. I want to group the constants together. My groups and descriptions show up in the Modules tab, but the groups are all empty. The detailed description is present but none of the group members. The groups are like this:

//!
//! @defgroup MY_FOOBARS list of foobar constants
//!
//! This is a more detailed description of the role
//! played by the foobar constants
//!
//! @{

static const char* FOOBAR1  = "AA";                 //!< A short summary of FOOBAR1
static const char* FOOBAR2  = "BB";                 //!< A short summary of FOOBAR2

//! @}

I've also tried explicitly adding the group members with @addtogroup or @ingroup, but neither seem to work.

Any thoughts on why this doesn't work and what I need to do to make it work?

EDIT typo pointed out by Chris

SOLUTION

To make this work I needed to set EXTRACT_STATIC=YES in my doxygen config.

Simon Elliott
  • 2,087
  • 4
  • 30
  • 39

2 Answers2

1

It appears that you have the correct structure for you documentation (see, for example, the member groups in the doxygen manual). However, you seem to use //|< for your documentation of FOOBAR1 and FOOBAR2. This doesn't seem to be valid doxygen markup. Should this in fact be //!<?

albert
  • 8,285
  • 3
  • 19
  • 32
Chris
  • 44,602
  • 16
  • 137
  • 156
  • Well spotted! I've edited that above. It hasn't helped though. I did wonder if the "after the event" comment wasn't supported for group elements and had tried putting them in front of the elements but that didn't help either. – Simon Elliott Mar 27 '12 at 08:10
  • 2
    Fixed! To make this work I needed to set EXTRACT_STATIC=YES in my doxygen config. – Simon Elliott Mar 27 '12 at 09:56
  • 1
    Great. Pherhaps you should post this as an answer and accept it. – Chris Mar 27 '12 at 10:05
1

To make this work I needed to set EXTRACT_STATIC=YES in my doxygen config. If this isn't done, the static variables in my group would not be included in the documentation.

Simon Elliott
  • 2,087
  • 4
  • 30
  • 39