Difference between revisions of "Doxygen"

From GnuCash
Jump to: navigation, search
(Links: Category:)
(Another template)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://en.wikipedia.org/wiki/Doxygen Doxygen] is the central point for source documentation at this moment (January 2011).
+
[[Category:Development]][[Category:API]]
 +
{| class="wikitable" style="margin: auto;"
 +
! scope="row"|Languages
 +
| [[{{PAGENAME}}|English]]
 +
| [[He/{{PAGENAME:דוקסיג'ן}}|עִברִית]]
 +
|}
 +
[{{URL:wp}}Doxygen Doxygen] is the central point for source documentation at this moment (January 2011).
  
 
It is a software which extracts (special) comments from sourcecode to produce
 
It is a software which extracts (special) comments from sourcecode to produce
Line 5: Line 11:
  
 
;Nightlies:This is done and put online on a regular basis at {{BuildServer}}/docs/ for both branches :
 
;Nightlies:This is done and put online on a regular basis at {{BuildServer}}/docs/ for both branches :
:[{{BuildURL}}/docs/MAINT/ MAINT], the next minor bugfix and
+
:[{{BuildURL}}/docs/STABLE/ STABLE], the next minor bugfix and after creation
:[{{BuildURL}}/docs/MASTER/ MASTER], the next major release.
+
:[{{BuildURL}}/docs/FUTURE/ FUTURE], the next major release.
  
 
==Creating the Source Documentation==
 
==Creating the Source Documentation==
 
+
See [[Building]] for the setup.
It can be run on your local copy of the sources by
+
Then it can be run on your local copy of the sources depending on your  [[Build Tools]]
<SyntaxHighlight lang="sh">
+
:;[[Build_Tools#Make|Make]]: <SyntaxHighlight lang="sh">
 
make doc
 
make doc
 
</SyntaxHighlight>
 
</SyntaxHighlight>
or if building with ninja:
+
:;[[Build_Tools#Ninja|Ninja]]: <SyntaxHighlight lang="sh">
<SyntaxHighlight lang="sh">
 
 
ninja doc
 
ninja doc
 
</SyntaxHighlight>
 
</SyntaxHighlight>
Line 49: Line 54:
 
==Links==
 
==Links==
 
;GnuCash API Documentation:
 
;GnuCash API Documentation:
:[{{BuildURL}}/docs/MAINT/ MAINT]
+
:[{{URL:docs:API}} STABLE]
:[{{BuildURL}}/docs/MASTER/ MASTER]
+
:After we create a branch <tt>future</tt> that will contain changes for the next major release.
 
;Doxygen:
 
;Doxygen:
:[http://www.doxygen.nl/ Website]
+
:[{{URL:doxy-www}} Website]
:[https://github.com/doxygen/doxygen Repository]
+
:[{{URL:doxy-repo}} Repository]
[[Category:Development]][[Category:API]]
 

Latest revision as of 07:53, 26 May 2025

Languages English עִברִית

Doxygen is the central point for source documentation at this moment (January 2011).

It is a software which extracts (special) comments from sourcecode to produce source documentation.

Nightlies
This is done and put online on a regular basis at code.gnucash.org/docs/ for both branches :
STABLE, the next minor bugfix and after creation
FUTURE, the next major release.

Creating the Source Documentation

See Building for the setup. Then it can be run on your local copy of the sources depending on your Build Tools

Make
make doc
Ninja
ninja doc
Important
You need to have doxygen installed for this. Otherwise the target doc will not be available.

This will populate ${BUILDDIR}/libgnucash/doc. Problems will be logged there to doxygen.log. The HTML docs can be found in it's subdirectory html.

It's configuration gets created from ${SOURCEDIR}/libgnucash/doc/doxygen.cfg.in.

Doxygen Elements

  • To mark a C style comment for Doxygen, it has to start with /** or /*!.
  • Usually the explaining comment should be in front of a declaration. If the comment is behind a member declaration, the next symbol should be <, resulting in /**< or /*!<.
  • Doxygen keywords begin with \ or @.
  • To document global objects, you must document the file in which they are defined:
     /*! \file */
    
or
 /** @file */

Improving the Source Documentation

A header file of a public API should have the following Doxygen section:
/**
 * @addtogroup <module>
 * @{
 * @file
 * @brief <A brief description>
 * @author Copyright (C) <year> <name> <email>
 */
where <module> is usually the name of the directory.

Links

GnuCash API Documentation
STABLE
After we create a branch future that will contain changes for the next major release.
Doxygen
Website
Repository