SourceDoc
Updated: 9.8.06

SourceDoc is a utility program I wrote to document C++ code via the generating complementary documentation webpages. It initially started as a subproject within Aftermath, but proved to be useful outside my game engine so I ended up reworking some of it to be more robust and decided to put it up here.

Unlike other code documentation generators, no extra "hints" are required within the code for it to work. This allows programmers to keep their code clean of huge blocks of comments. However, the result is simply a listing and index of the declarations within the header files, not a complete description of how to use the code within your api.

In this project, I was mainly targeting my own style of writing self-documenting code which has proven its worth thoughout my time as a developer. Of course, projects such as Aftermath are quite large, leaving me to forget the names and locations of some of the utility functions I had written only a month (or longer) before. The solution was SourceDoc: plain and simple, fast to generate and easy to use.

Since its first iteration, dubbed "AEScribe", I decided to add a few features including the generation of a set of index pages for classes, structs, namespaces, and free functions. I also decided to overhaul the parser to be far more robust than my original. One new feature I'm particularly excited about, I added pages for unit tests. Currently this only has been tested on the version of CppUnitLite I happen to be using for Aftermath, but it will also comply with a contemporary unit test framework called UnitTest++ (see SourceForge: UnitTest++).

There are still a couple things that are primitive about the current iteration of SourceDoc; one being the pathfile for which it uses to find the directories of source code: this could be done in XML, but I haven't gotten around to setting that up yet -- expect this to be upgraded in a later version.


Sample Output

Current run on UnitTest++


Known Issues

UnitTest++ Sample:
- operator functions do not parse "post const" parameters properly
- duplicates in menu are from source files with same name in different directories
- TEST_FIXTURE() not supported in parser (parse like TEST_F() in CppUnitLite2)
- paths generated for links to source code files are absolute