This article has multiple issues. Please help improve it or discuss these issues on the talk page.

This article relies largely or entirely upon a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources.(December 2011)

Doxygen/ˈdɑːksiɡən/[2] is a documentation generator, a tool for writing software reference documentation. The documentation is written within code, and is thus relatively easy to keep up to date. Doxygen can cross reference documentation and code, so that the reader of a document can easily refer to the actual code.

The first version of Doxygen borrowed code from an early version of DOC++ (developed by Roland Wunderling and Malte Zöckler at Zuse Institute Berlin); later, the Doxygen code was rewritten by Dimitri van Heesch.

Example code[edit]

A screenshot of what the output would look like in HTML

The generic syntax of documentation comments is to start a comment with an extra asterisk after the leading comment delimiter '/*':

/** * @file * @author John Doe <jdoe@example.com> * @version 1.0 * * @section LICENSE * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details at * http://www.gnu.org/copyleft/gpl.html * * @section DESCRIPTION * * The time class represents a moment of time. */class Time {public:/** * Constructor that sets the time to a given value. * * @param timemillis Number of milliseconds * passed since Jan 1, 1970. */ Time (int timemillis){// the code}/** * Get the current time. * * @return A time object set to the current time. */static Time now (){// the code}};

An alternative approach for documenting parameters is shown below. It will produce the same documentation.

/** * Constructor that sets the time to a given value. */ Time (int timemillis ///< Number of milliseconds passed since Jan 1, 1970.>){// the code}

Richer markup is also possible. For instance, add equations using LaTeX commands: