views:

1108

answers:

4

While doxygen seems to be good at indexing a large C++ project, I have some major gripes with it.

  1. The generated output is ugly and poorly organized. Just finding a function in doxygen websites is generally a pain.
  2. Slow turnaround on finding markup errors. i.e. I have to index my whole project to find I used the wrong syntax on some function.
  3. Markup is ugly... something with markdown, restructured text, or some humane markup language would be better.

Is there any tool like that with good C++ support? Doxygen's ability to index C++ is actually quite useful... it's just the way it presents information, and requires ugly markup in comments that is a pain to deal with.

A: 

If your interested in tracing big project, then I would suggest c++ version of Netbeans which can dynamically generate nice call graphs ( look for 'Show Call Graph' feature ).

RP
Doxygen can generate call graphs with the help of GraphViz. Trouble is, you usually need about a 640,000 x 480,000 display to view them comfortably. Since no-one *has* such a display...
Steve314
+6  A: 

You could try DOC++ but I believe it's even uglier. Your best choice could be to tweak the settings of Doxygen:

  • Enable GraphViz (nice call graphs, or UML graphs if you enable those switches)
  • Add header / footer to the pages
  • Use CSS to style the page
  • Generate CHM (Windows help file) which includes index and search

Some switches you may be interested in:

  • General
    • QT_AUTOBRIEF avoids typing @brief
    • OPTIMIZE_OUTPUT_FOR_C = NO
    • OPTIMIZE_OUTPUT_JAVA = NO
    • EXCLUDE to avoid some ugly files or third party to come in the way
  • Style the HTML
    • HTML_HEADER
    • HTML_FOOTER
    • HTML_STYLESHEET
  • CHM help file
    • CHM_FILE
  • GraphViz
    • HAVE_DOT
  • Graphs
    • CLASS_DIAGRAMS
    • CLASS_GRAPH
    • UML_LOOK
Wernight
Here is the flags I turn to YES: EXTRACT_ALL, REFERENCES_RELATIONREFERENCED_BY_RELATION, HAVE_DOT for easily jumping onto the related topics. The following for browsing through sources: SOURCE_BROWSER, INLINE_SOURCES, EXTRACT_PRIVATE, EXTRACT_STATIC, EXTRACT_LOCAL_CLASSES.
Amit Kumar
+1  A: 

for point #2: (Slow turnaround on finding markup errors. i.e. I have to index my whole project to find I used the wrong syntax on some function.).....

I just created a shell script to run Doxygen on one file at a time, which I can run from within my IDE, to solve exactly this problem, so I can continually run and re-run it while documenting a single file.

Assuming you have your "Doxyfile" in the current directory, the script to run it on just "adding_doc.cpp" would look like

cp Doxyfile tmp_doxy
echo INPUT = $1 >> tmp_doxy
doxygen tmp_doxy

called like

dofile adding_doc.cpp

how you integrate that with your IDE is up to you (resolving file name variables, etc).

Eric H.
A: 

My weapon of choice is NaturalDocs. It has its warts but the output is decent and the markup is effortless.

Pablo Pissanetzky
I tried out NaturalDocs years ago, and yes its output was pretty, and the markup was much less heavy. Unfortunately it's a C# app now (the author rewrote it from something else), which still seems like a poor choice for portability (yeah, yeah mono). Development seemed glacial at the time, and C++ was barely supported. Has it improved any?
ergosys