Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I display only the class name in doxygen class diagrams?

Using doxygen and graphviz with my C# project, I can generate class diagrams in the documentation pages. These diagrams have the full class names and namespaces in them, e.g.

Acme.MyProduct.MyClasses.MyClass

Is it possible to configure doxygen to cut this down a bit to just the class name?

MyClass

The fully qualified paths make even simple diagrams rather wide and unwieldy. I'd like to minimize the need for horizontal scrolling.

like image 207
izb Avatar asked Apr 07 '10 13:04

izb


People also ask

How do you create a class diagram in Doxygen?

If you use the Doxygen GUI frontend tool you will find the relevant options in Step2: -> Wizard tab -> Diagrams . The DOT relation options are under the Expert Tab. You will be able to navigate the whole hierarchy, the limits are on what is displayed on a diagram.

Have DOT doxygen?

If you have the "dot" tool in the path, you can set HAVE_DOT to YES in the configuration file to let doxygen use it. Doxygen uses the "dot" tool to generate the following graphs: A graphical representation of the class hierarchy will be drawn, along with the textual one.

What is Doxygen DOT?

Doxygen tag @dot allows for embedding the DOT graph definition directly into your documentation. The nodes of the graph can be made hyperlinks as it is demonstrated in the sample project. Doxygen itself uses DOT graphs to generate the class inheritance and call graph diagrams.


1 Answers

I suspect that you've already solved this as it is a year old, but an answer might be useful for anyone else searching for this (as I just did). You can use the "HIDE_SCOPE_NAMES" option. Setting it to YES (or checking it in the doxywizard GUI) will hide namespaces. From my doxygen file:

# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
# will show members with their full class and namespace scopes in the 
# documentation. If set to YES the scope will be hidden.

HIDE_SCOPE_NAMES       = YES
like image 161
Gibsnag Avatar answered Oct 04 '22 01:10

Gibsnag