Documenting functions in C++ with Doxygen

Use \fn where you otherwise use \class in your \\*! *\ block

http://www.doxygen.nl/manual/docblocks.html look for "Documentation at other places"

http://www.doxygen.nl/manual/commands.html#cmdfn
It works similar as documenting member functions


This pattern worked well for us.

/*! Convert counts to kg for the reservoir.  
    \param counts The A/D counts to convert.` 
    \return The calculated kg based on the parameter.  
*/  
float RES_ConvertCountsToValue(uint_16 counts);  

Entities that are members of classes are only documented if their class is documented. Entities declared at namespace scope are only documented if their namespace is documented. Entities declared at file scope are only documented if their file is documented.

So to document a free function in the global namespace you also need a line like this somewhere in the header file in which it is declared:

/** @file */

Or like this:

/*! \file */