source_template_file
docu_template_file
/* description .. date .. author *//*! \file ../dir/filename.h \ingroup group_xx */
/* description .. date .. author TODO: ----------------------------------------------------- Modifications: 2009-04-06 created. RF. ----------------------------------------------------- *//*! \file ../dir/filename.c \ingroup group_xx detailed Description of file \code ===================================================== Liste_Funktionen_Beginn: UtxTab_clear init / clear all words UtxTab_add add a new string Liste_Funktionen_Ende: ===================================================== -see also: - internal: - usage examples: - OFFLINE tests: \endcode *//*
// all descriptions must be inline or before declaration ! // Version 1 - shortDescription (inline): #define RAD_360 6.2831853071795862319 ///< 360 Grad // Version 2 - shortDescription (before): /// ILIM2 returns x = between lo and hi #define ILIM2(x,lo,hi) (((x)>(hi))?(hi):(((x)<(lo))?(lo):(x))) // Version 3 - short- & long-Description: /// \brief ICHG01 change 0 -> 1, 1 -> 0. /// \code /// output always has pos. sign /// \endcode #define ICHG01(i) (((i)>0)?(0):(1))
// all descriptions must be before declaration ! // Version 1 - shortDescription only: /// group of obj's typedef struct {long anz, maxanz; int *typ; void **ea;} Group; // Version 2 - short- & long-Description: /// \brief 2D-circle, Typ_CI2, Typ_AC2 /// \code /// p1 .. startpoint /// p2 .. endpoint /// \endcode /// 2004-08-06 ango added. RF. typedef struct {Point2 p1, p2, pc; double rad, ango;} Circ2;
// all descriptions must be inline or before declaration ! // Version 1 - shortDescription (inline): static int prgStat1=0; ///< shortDescription (goes into Header) // Version 2 - shortDescription (must be before): /// programmStatus2 int prgStat2=0; // Version 2 - short- & long-Description (must be before): /// \brief Kurzbeschreibung prgStat5 /// \code /// long-Description: prgStat5 /// more details /// \endcode int prgStat5=0;
// Version 1 - shortDescription only: //================= int main (void) { //================= /// main-entry // Version 2 - short- & long-Description: //============================ int ugrp_free (Group *grp) { //============================ ///\code /// long-Description ugrp_free. ///\endcode // Version 3 - short- & long-Description & parameters: // ATT: line with last parameter may not contain '{' ! //========================= int ugrp_add (Group *grp, ///< in/out group, where to add int typ, ///< in type of obj to be added (eg Typ_PT) void *elact) ///< in obj (eg *Point) //========================== ///\code /// Input: /// typ zB xx /// elact act. element; /// Output: /// grp gruppe .. ///\endcode {
do not use a single ' or " (disables creating links) this is ok: 'a' or "b" .. do not use a point as last char of a commentline; eg this. (disables creating links sometimes) this is ok: two points ..
dox/doxy.sh generate doc script dox/modules.dox The list of files and the brief-description of its content. dox/Doxyfile doxygen configuration file
Examplefile with a fileheader and function. (../dox/templateSource.c)
Make a copy and modify: cp ../dox/templateSource.c newNam.c
Add new file in ../dox/modules.dox Update Makefile
/* templateFile.c 2009-03-03 RF Purpose: use this file as a templete for a new c-file for Details see ../dox/CodingHints_Doxygen.dox ----------------------------------------------------- TODO: ----------------------------------------------------- Modifications: 2009-03-03 Created. RF. ----------------------------------------------------- *//*! \file ../dox/templateFile.c \ingroup group_xx use as a templete for a new c-file \code ===================================================== Liste_Funktionen_Beginn: templateFunction does nothing .. Liste_Funktionen_Ende: ===================================================== -see also: ../dox/modules.dox - internal: - usage examples: - OFFLINE tests: \endcode *//* */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> //================================================================ int templateFunction (int ii) { //================================================================ ///\code /// Description of function templateFunction /// Input: /// ii not used /// Output: /// retCod always 0 ///\endcode printf("templateFunction %d\n",ii); return 0; } // EOF
Examplefile for documentaion with links (../dox/templateDocu.dox)
/*! \page pag_pf ProgramFlow \ref Title-chapter-1<br> \ref Title-chapter-2<br> <hr> \section Title-chapter-1 \code .. text chapter 1 \endcode \section Title-chapter-2 \code .. text chapter 2 \endcode */