Wednesday, June 23, 2010

The fun of doxygen

I experimented with doxygen today. Doxygen is the documenting package for C++ and other languages. I had heard of it some time ago and was always doing something else, never getting to it.

I was pleasantly surprised with the package. It was already installed in our environment, although the installation seems to be nothing more than copying the executable to a suitable location. No special DLL files, no COM registration, no sub-package installs, no databases, no virtual machines, and no activation keys. Just a mere "load and go" set of steps.

I was also pleasantly surprised with the capabilities. Doxygen can extract special comments and create documentation, much like Javadoc and Perldoc, and it can also chew on plain source code (without special comments) and create some reasonable documents. I used the latter mode, and got some pretty good results.

Doxygen creates documents in multiple formats. The version we have (which is an old one) creates HTML, RTF, LATEX, and MAN pages by default. (There are ways of turning off specific formats.)

Doxygen works on more than C++. It can read C, C#, Java, FORTRAN, Python, PHP, and a few other languages that I don't remember right now. It's also configurable, and configurable in sensible ways. The folks who write doxygen use it for their own work.

I'm impressed with the package. I wrote a documentation package when I was at UPS; it worked on C++ and C# and created little hierarchy diagrams. The doxygen output is superior to my attempt at a package, and faster too. Since I wrote my own documenter, I know what's involved in parsing C++ and C# code. (And parsing C++ is not easy.)

I spent all of perhaps thirty minutes with doxygen today, and feel pretty good about it. A small part of that time was learning the configuration options; most of the time was experimenting with options and showing other folks the results.


No comments:

Post a Comment