6

I have updated our c++ class comments to doxygen format and they look nice... but the namespaces list/tab is not at all useful. We have a parent namespace e.g john and then sub-namespaces for each library or functional area e.g john::graphics, john::sound, etc. Doxygen is only listing a single namespace: john. Do I have to simply change some setting, or is it mandatory to document my namespaces for doxygen to pick them up?

1

3 Answers 3

6

In general, you have to document anything for Doxygen to decide that it's important. Namespaces in included. But you don't have to document them particularly well; just a brief notation of what they're for is sufficient for Doxygen to document them.

Sign up to request clarification or add additional context in comments.

2 Comments

but the namespaces include documented classes... seems weird this wouldn't work because listing by namespace is an obvious way to navigate the code. Oh well...
@John: As I said, that's how Doxygen works: it skips anything that isn't documented, as well as anything that is contained by something that isn't documented. If you have global functions for example, it will not see them unless the file that defines them is documented, or unless they are part of a module.
6

I had a similar problem where Doxygen wasn't seeing that the namespace was nested. I fixed it by specifying the scope:

Before:

/**
* @namespace outer
* @brief the outer namespace
*/
namespace outer
{
  /**
  * @namespace inner
  * @brief the inner namespace
  */
  namespace inner
  {
  }
}

After:

/**
* @namespace outer
* @brief the outer namespace
*/
namespace outer
{
  /**
  * @namespace outer::inner
  * @brief the inner namespace
  */
  namespace inner
  {
  }
}

Comments

6

If you set the EXTRACT_ALL Build flag (see http://www.doxygen.nl/manual/config.html#cfg_extract_all) this will extract information from nested namespace information without you needing to specifically document them.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.