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.
The Doxygen source code is hosted at GitHub, where the main developer, Dimitri van Heesch, contributes under the name "doxygen".13 Doxygen is written in C++, and consists of around 300,000 source lines of code. For lexical analysis, Lex (or its replacement Flex) is run via approximately 35,000 lines of lex script. The parsing tool Yacc (or its replacement Bison) is also used, but only for minor tasks. The bulk of parsing is done via native C++ code. The build system includes CMake and Python script.
Like other documentation generators such as Javadoc, Doxygen extracts information from both the comment and the symbolic (non-comment) code. A comment is associated with a programming symbol by immediately preceding it in the code. Markup in the comments allows for controlling inclusion and formatting of the resulting documentation.
Doxygen supports output in many formats including: HTML, CHM, RTF, PDF, LaTeX, PostScript and man page.
Doxygen can generate inheritance diagrams for C++ classes. For more advanced diagrams and graphs, Doxygen can use the "dot" tool from Graphviz.14
All examples are given for languages with C-like comments where a multi-line comment starts with /* and a single line comment starts with //.
Doxygen ignores a comment unless it is marked specially. For a multi-line comment, the comment must start with /** or /*!. A markup tag is prefixed with a backslash (\) or an at-sign (@).15 The following is a relatively simple function comment block with markup in bold:
A block can be formatted various ways. A common way is to left-align asterisks on each line which Doxygen does not include in the output. For example:
Alternatively, a block can consist of a series of single-line comments. Doxygen accepts comments with an additional slash (/) or exclamation (!).16
To locate a documentation comment to the right of the code, an additional < marker is required.17 This allows for an alternative approach for documenting parameters as shown below.
A mathematic formula can be specified via LaTeX commands. For example:
A more complete example in C++:
"Doxygen Manual: Frequently Asked Questions". www.doxygen.nl. https://www.doxygen.nl/manual/faq.html ↩
Perkel, Jeffrey M. (2015-11-22). "Get With the Program: DIY tips for adding coding to your analysis arsenal". The Scientist (Journal). The Scientist. https://www.the-scientist.com/?articles.view/articleNo/43632/title/Get-With-the-Program/ ↩
Sabin, Mihaela (2015-11-22). "Doxygen". OpenComputing (Wiki). University of New Hampshire. Archived from the original on 2015-11-23. https://web.archive.org/web/20151123030546/http://foss.unh.edu/resources/index.php/Doxygen ↩
"Doxygen". Free Software Directory (Wiki). 2015-11-22. https://directory.fsf.org/wiki/Doxygen ↩
"Documentation". Rosetta Code (Wiki). 2015-11-22. https://rosettacode.org/wiki/Documentation ↩
"Documentation: C". Rosetta Code (Wiki). 2015-11-22. https://rosettacode.org/wiki/Documentation#C ↩
"Documentation: Objective-C". Rosetta Code (Wiki). 2015-11-22. https://rosettacode.org/wiki/Documentation#Objective-C ↩
"Doxygen::Filter::Perl - A perl code pre-filter for Doxygen - metacpan.org". metacpan.org. https://metacpan.org/pod/Doxygen::Filter::Perl ↩
"Doxygen Manual: Getting started". www.doxygen.nl. https://www.doxygen.nl/manual/starting.html ↩
"Automatic Python API documentation generation tools". python.org wiki (Wiki). 2015-11-22. https://wiki.python.org/moin/DocumentationTools#Automatic_Python_API_documentation_generation_tools ↩
Brown, Eric W. "doxypypy: A Doxygen filter for Python" – via PyPI. https://github.com/Feneric/doxypypy ↩
"doxygen/doxygen". June 9, 2021 – via GitHub. https://github.com/doxygen/doxygen ↩
"Doxygen Manual: Graphs and diagrams". www.doxygen.nl. https://www.doxygen.nl/manual/diagrams.html ↩
Doxygen: Special Commands https://www.doxygen.nl/manual/commands.html ↩
Doxygen: Documenting the code - §Comment blocks for C-like languages https://www.doxygen.nl/manual/docblocks.html#cppblock ↩
Doxygen: Documenting the code - §Putting documentation after members https://www.doxygen.nl/manual/docblocks.html#memberdoc ↩