views:

518

answers:

2

I have a set of 250 header files and cpp files of my project. I wanted to format the old code and generate API documentation. Is there any tool that can help me do this?

I am thinking of using DOxygen, but I believe that needs the information in a some format.

+7  A: 

Do use Doxygen for building documentation. It can infer a lot from the source as-is with the right settings. It gets better with suitable comments for each documented object. However, Doxygen won't help you regularize your code's format and layout.

For that task, you want a code beautifier. The classic tool was indent. However, a much more versatile tool is Uncrustify, which is one of several beautifiers included in the clearly named Universal Indent GUI. The latter tool supports a wide array of languages, and provides a nice GUI interface to help you tune the settings to your preferred style.

All of the above are free and open source, incidentally.

Once you get into using Doxygen, you will want to also install the Graphviz tools so that it can draw you call graphs and other diagrams.

RBerteig
These are big links :)
toto
There, that's a lot better.
RBerteig
+4  A: 

I've had a good experience with astyle (Artistic Style); it's easy to use and configure.

Paolo Tedesco
Astyle: Just drag'n'drop the source file to the icon and you get your pretty source ready.
siddhant3s