This page is divided into the following sections:
In order to make Doxygen work with TNG one has to strictly follow some guidelines during programming.
Within the CMake build system, the target doc
was introduced to compile all Doxygen parts. They consist of
/doc/src
*
.dox files found in /doc/src
. All contained files ending by *
.in are preprocessed by CMake and stored in its build tree to be considered by Doxygen. /doc/html
/doc/CMakeLists
.txt
/modules/NAME/doc/src
/modules/NAME/doc/src
which will be processed by Doxygen, all source files recursively found in /modules/NAME/NAME
will be parsed. Each module should provide a HTML link referencing the main documentation. /doc/html/modules/NAME
and /doc/html/modules_swig/NAME
. /modules/NAME/CMakeLists
.txt using the subroutines in /cmake_subroutines/DoxygenMakeDocForModule
.cmake. The Doxygen configuration template /modules/NAME/doc/src/Doxyfile
.in is usually copy of the /doc/src/Doxyfile
.in.
\main_menu
(in main doc)CMakeLists.txt
.
\ref_to_parent_doc
(in modules)\cond
, \if and \ifnot. A small example illustrates it:
//! \cond API_DOC //! does something (only available in C++ doc) void doSomething(); //! \endcond //! this method is available in C++ and SWIG doc void doSomething2(); //! \if SWIG_DOC This method is documented in SWIG doc only \endif void swigCode(); /** \if API_DOC \brief computes a value. \param val is the value to be set. \else \brief in Lua, it returns a value. \endif */ void setAValue(double & value);
Enabled sections are
API_DOC
SWIG_DOC
*
.i files in order to know the header files to be generate a binding from. However, there is no easy way to let Doxygen understand SWIG input files. What can be used, is that SWIG ignores the header parts which are selected by #ifndef SWIG ...; #endif
Doxygen can be configured to understand such predefines. When creating the SWIG API documentation, the preprocessor directive
#define SWIG
Note: Doxygen will parse all source files of a module. Therefore, source files being not parsed by SWIG must contain
#ifndef SWIG ...; #endif
\brief
\code
\endcode\def
\if
\endif\param
\todo