Chris Olsen
Some of the more important settings are: PROJECT_NAME = ``Your Project'' the name of your project OUTPUT_DIRECTORY = ``/home/username/public_html/doc/'' the directory doxygen will output it's documentation INPUT = ``src/'' tells doxygen where to look for your source code RECURSIVE = YES tells doxygen to go into subdirectories to find source code Doxygen must also be told what to output to. For example, if you wanted HTML output: GENERATE_HTML = YES tells Doxygen to output to html HTML_OUTPUT = html/ tells Doxygen where to put html documentation, relative to OUTPUT_DIRECTORY HTML_FILE_EXTENSION = .html tells what the extension of the html files should be (.htm or .html) a header and footer for each page can also be set with the HTML_HEADER and HTML_FOOTER options There are similar options for RTF, Latex and Man Pages.
Doxygen derives documentation from comments of two basic forms.
/** */ and ///. Doxygen documents whatever immediately follows the
doxygen comment.
/**
* Class documentation appears here
*/
class SomeClass
{
/// varaible Documentation
int var;
/** Documenting Method1 */
void Method1();
/// Documenting Method2
void Method2();
};
In some cases it may be desirable to put documentation after an item,
in which case you can use the commenting form /**< */ and ///<.
/**
* Class documentation appears here
*/
class SomeClass
{
int var; ///< variable documentation after
void Method1(); /**< Documenting Method1 after */
void Method2(); ///< Documenting Method2 after
};
There are a variety of commands that can be used within these special
comment blocks. Doxygen commands are preceeded by either a \ or an @
(either is fine). Some of the more common ones are:
param
return
author
date
file
Special commands for method documentation can be used as follows:
/**
* Takes an integer and squares it
* \param a The integer to be squared
* \return The integer squared
*/
int square(int a);
Commands used for documentation of a file:
/**
* \file someFile.h
* \author Some Guy
* \date 2-26-04
*/
There are a variety of other useful commands and formatting options,
check out the Doxygen website for more information.
To run doxygen just use the command doxygen followed by your configuration file doxygen project.cfg Doxygen will generate documentation and output to the directory specified in the config file.
This handout, an example Doxygen configuration file and example Doxygen output is available online at http://www.upl.cs.wisc.edu/tutorials/doxygen/ The Official Doxygen website is http://www.doxygen.org/ You can find information on all doxygen commands, commenting styles, and configuration options there.