We're a bunch of Outcast fans who are also interested in game development. When Outcast 2 was canceled some years ago because Appeal went bankrupt there was only one solution: Create our own inofficial sequel!

Post tutorial Report RSS Generating API documentation from source files

Most Game SDKs that include C++ code don't have a proper documentation of the API. Learn how to generate such a documentation automatically using only the source files.

Posted by on - Basic Client Side Coding

Virtually any Game SDK comes nowadays with a bunch of source files which are used to generate some kind of custom DLL for your mod.

Mostly though the classes and functions aren't documented properly outside of the source code and using the search function of your IDE to get an overview of interfaces and classes can be pretty fatiguing.

Wouldn't it be great to have a HTML overview of the API?


Even if the functions are not documented you could at least see members of classes and parameters of functions listed properly and linked among each other.

This is exactly what a tool called Doxygen is capable of.
By following some rules for commenting your code Doxygen can generate descriptions of classes, function parameters and much more. Many open Source projects use it to generate their documentation.

Though most sourcefiles from SDKs aren't optimized for the use with Doxygen you will still always be able to get all classes and functions listed clearly.

So here is how it goes:


Get the Doxgen-Setup from Stack.nl

After installing start Doxywizard - a graphical frontend for Doxygen.

Specify the working directory (should be *Programs*/doxygen/bin)

Tutorial Images #1

Settings for the Project topic:

  • Specify the Project Name and version
  • Set the Source Directory to the location where your source files are located
  • Check Scan recursively
  • Set the Destination directory to where your generated files should be stored

Note: The parent folder of Destination Directory has to exist else the program will fail.

Tutorial Images #1

Settings for the Mode topic:

  • Select All Entities and Include cross-referenced source code in order to get the most information out of the source files

Tutorial Images #1

Settings for the Output topic:

  • Deselect LaTeX since we want only HTML output

Go to the Run Tab and press Run Doxygen

Tutorial Images #1

Check out Destination Directory\html\index.html

Now you should have a HTML documentation of the API of your favourite SDK.

Happy coding!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: