ArticleslgStudy

computer science

Doxygen

Doxygen is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Doxygen rather than just read about it. In short: Doxygen ( DOK-see-jən) is a documentation generator that works with many programming languages. It extracts information from specially-formatted source code comments and saves the information in one of various supported formats.

Doxygen — main illustration
Doxygen — illustration

Key takeaways

  • Doxygen belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Doxygen to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Doxygen from memory before moving on to harder problems.

Reference excerpt

Doxygen ( DOK-see-jən) is a documentation generator that works with many programming languages. It extracts information from specially-formatted source code comments and saves the information in one of various supported formats. Doxygen supports static analysis of a codebase. It uses the parse tree parsed from the codebase to generate diagrams and charts of the code structure. It provides cross-referencing that a reader can use to refer back to the source code from the generated documentation. Doxygen can be used in many programming contexts. It supports many languages including C, C++, C#, D, Fortran, IDL, Java, Objective-C, Perl, PHP, Python, and VHDL. It can run on many computers, including Unix-like, macOS, and Windows systems. It is free software, released under the terms of the GNU General Public License version 2 (GPLv2).

History 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.

Development The Doxygen source code is hosted at GitHub, where the main developer, Dimitri van Heesch, contributes under the name "doxygen". 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.

Design 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.

Example 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 (@). 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 (!).

To locate a documentation comment to the right of the code, an additional < marker is required. This allows for an alternative approach for documenting parameters as shown below.

A mathematical formula can be specified via LaTeX commands. For example:

A more complete example in C++:

See also

Comparison of documentation generators Javadoc API Writer

References

External links Official website

Illustrations

Doxygen illustration

Worked examples

Example 1 — a first encounter with Doxygen

Start with the simplest possible case. Write down what Doxygen claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Doxygen before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Doxygen ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Doxygen

In research
Doxygen appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Doxygen in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Doxygen is common in secondary-school and first-year university syllabi. It links to neighbouring topics Code navigation tools, Cross-platform software, Free computer programming tools, so understanding it makes those chapters shorter.
In everyday life
Look for Doxygen outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Doxygen” →

How to study Doxygen in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Doxygen means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Doxygen out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Doxygen in simple terms?

Doxygen ( DOK-see-jən) is a documentation generator that works with many programming languages. It extracts information from specially-formatted source code comments and saves the information in one of various supported formats.

Why does Doxygen matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Doxygen?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Doxygen.

Tags

  • Code navigation tools
  • Cross-platform software
  • Free computer programming tools
  • Free documentation generators
  • Free software programmed in C++
  • Software that uses Qt

Keep exploring