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?
Asked
Active
Viewed 5,273 times
6

Mr. Boy
- 60,845
- 93
- 320
- 589
-
See my post: http://stackoverflow.com/questions/2275601/documenting-namespaces-with-doxygen Possible duplicate. – Thomas Matthews Sep 12 '11 at 15:15
3 Answers
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.
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
{
}
}

wrapperapps
- 937
- 2
- 18
- 30

Carl
- 993
- 8
- 14
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.

Nicol Bolas
- 449,505
- 63
- 781
- 982
-
1but 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... – Mr. Boy Sep 12 '11 at 10:32
-
2@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. – Nicol Bolas Sep 12 '11 at 10:38