Difference between revisions of "Doxygen"

From The Battle for Wesnoth Wiki
(Intro)
 
(example)
Line 2: Line 2:
 
see http://www.stack.nl/~dimitri/doxygen/index.html.
 
see http://www.stack.nl/~dimitri/doxygen/index.html.
  
Wesnoth uses doxygen to generate documentation about code as html-pages,
+
Wesnoth uses doxygen to generate documentation about its code as html-pages.
these are uploaded to http://devdocs.wesnoth.org
+
These are uploaded (currently manually by Mark de Wever) to http://devdocs.wesnoth.org.
  
 
Developers can generate these pages locally by running the command
 
Developers can generate these pages locally by running the command
doxygen Doxyfile
+
'''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
 
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 http://www.stack.nl/~dimitri/doxygen/commands.html
 +
 +
... More details ...

Revision as of 10:34, 15 August 2007

Doxygen is a documentation system for C++, C, Java, Python and other language, see http://www.stack.nl/~dimitri/doxygen/index.html.

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

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 http://www.stack.nl/~dimitri/doxygen/commands.html

... More details ...