Doxygen

Article on other languages:

del.icio.us del.icio.us
Digg Digg
Furl Furl
Reddit Reddit
Rojo Rojo
Add to OnlyWire
Doxygen
Image:Doxygen.png
Developed by Dimitri van Heesch
Latest release 1.5.6 / May 18, 2008
Written in C++
OS Cross-platform
Genre Documentation generator
License GNU General Public License
Website http://www.doxygen.org

Doxygen is a documentation generator for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D. It runs on most Unix-like systems, including Mac OS X, as well as on Windows. The first version of Doxygen borrowed some code of an old version of DOC++; later, the Doxygen code was rewritten by Dimitri van Heesch.

KDE uses Doxygen for parts of its documentation and KDevelop has built-in support for it.

Released under the General Public License, Doxygen is free software.

Contents

Usage

Like Javadoc, Doxygen extracts documentation from source file comments. In addition to the Javadoc syntax, Doxygen supports the documentation tags used in the Qt toolkit and can generate output in HTML as well as in CHM, RTF, PDF, LaTeX, PostScript or man pages.

Example code

A screenshot of what the output would look like in HTML.

The following illustrates how a C++ source file can be documented.

/**
  * The time class represents a moment of time.
  *
  * @author John Doe
  */
 
  class Time {
 
    public:
 
       /**
         * 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() {
       }
     };

An alternative approach that is preferred by some for documenting parameters is shown below and will produce the same documentation. The advantage with this approach is if you delete a parameter or change the meaning of a parameter you're more likely to update the documentation.

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

See also

External links

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.


Giant Panda

Mercedes Car
James Bond Guide
This site monitored by SitePinger.net