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.
When declared outside of a namespace, the Doxygen Modulestab will show the namespace, as shown in Example 1 above. When the \addtogroupcommand is placed inside a namespace, the Doxygen Modulestab will not display the namespaces as shown in Example 2 above.
Links to web pages and mail addresses Doxygen will automatically replace any URLs and mail addresses found in the documentation by links (in HTML). Links to classes. All words in the documentation that correspond to a documented class will automatically be replaced by a link to the page containing the documentation of the class.
If a compound (e.g. a class or file) has many members, it is often desired to group them together. Doxygen already automatically groups things together on type and protection level, but maybe you feel that this is not enough or that that default grouping is wrong.
The Doxygen structural command to use is “@mainpage” as shown in the example above. This tag on one of our markdown files will tell the Doxygen parser that a given markdown file is the main page for the project. This is the page shown when you click index.html from the HTML folder generated by Doxygen.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With