Doxygen
From Free net encyclopedia
←Older revision | Newer revision→
Doxygen is a documentation generator for [[C++]], C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors) and to some extent PHP, C# and D. Being highly portable, it runs on most Unix systems as well as on Windows and Mac OS X. Most of the Doxygen code was written by Dimitri van Heesch. Several projects such as KDE use Doxygen for generating documentation for the API. KDevelop has builtin support for Doxygen.
Contents |
Usage
Doxygen takes as input the source code files and outputs a set of documentation pages. By default the output format is HTML but it can also be in CHM, RTF, PDF, LaTeX, PostScript or man pages.
The documentation generation is based on the parsing of the program structure and on the additional information given by the code writer in specially formated comments. The format of the comments is very similar to Javadoc.
Example code
The following illustrates how a source file can be documented. Image:Doxygen ouput.png
/** * The time class represents a moment of time. * * \author John Doe */ class Time { /** * Constructor that sets the time to a given value. * \param timemillis Is a number of milliseconds passed since Jan 1. 1970 */ Time(int timemillis) { ... } /** * Get the current time. * \return A time object set to the current time. */ static Time now() { ... } }