Reputation: 121
I'm using Doxygen to document my code. Much of the code has anonymous namespaces in the cpp files where constants are defined. I have set:
EXTRACT_ANON_NSPACES = YES
in my Doxygen file and all anonymous namespaces are documented as desired.
My problem is that I want to reference a variable in an anonymous namespace. For example, suppose one of the namespaces is defined in my Doxygen document under MyClass::anonymous_namespace{MyFile.cpp}::kMyConstant
. I figured that another comment block (say, for a function) could link to that constant like:
@see MyClass::anonymous_namespace{MyFile.cpp}::kMyConstant
Unfortunately the only link I get is to MyFile.cpp, but not through the anonymous namespace to the constant variable. Obviously I want to do this so that if the value of the constant changes, the documentation will reference the new value when Doxygen is rerun. Putting the explicit value of the constant in the documentation would be dangerous if the constant ever changes.
Is my format above incorrect? I've searched for an answer for this extensively but to no avail.
Upvotes: 12
Views: 2331
Reputation: 14859
What you want hasn't been implemented yet, but I agree it is useful and the format you use is the right one and should work.
I'll implement this in the next release.
Upvotes: 9