From The Battle for Wesnoth Wiki
Revision as of 10:34, 15 August 2007 by HaJo (talk | contribs) (example)

Doxygen is a documentation system for C++, C, Java, Python and other language, see

Wesnoth uses doxygen to generate documentation about its code as html-pages. These are uploaded (currently manually by Mark de Wever) to

Developers can generate these pages locally by running the command doxygen Doxyfile It runs for about 5 minutes, producing about 50 MB of html and graphics. The startpage can than be found at wesnoth/doc/doxygen/html/index.html

To get meaningful documentation from the code, special comments are used:

  • In front of some item (class, function, struct, whatever),
as in "//! Show titlepage with logo"
  • just behind some item (variables, enums etc.),
as in "enum TITLE_RESULT { TUTORIAL = 0,       //!< Start special campaign 'tutorial'"

For nice, short examples see titlescreen.cpp and titlescreen.cpp

Doxygen supports a lot of commands to customize and fine-tune the resulting documentation, see

... More details ...