views:

160

answers:

3

I've got a project that I'm using Doxygen to generate documentation to. The documentation of the classes is fine, but I've also got some functions that I use in main() to create objects etc. I'd also like to have these into my documentation, but I have not figured how to do that. Any suggestions?

+1  A: 

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

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

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

Pieter
+1  A: 

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);  
Bruce
@Bruce: Click the 010101 button to format your selection as code (indent the block by 4 spaces on each line).
Mark Rushakoff
+1  A: 

I like this pattern

   ///////////////////////////////////////////////////////////////////////
   /// \brief setX
   /// \param x offset of the image.
   /// \return a new image as an QImage.
   /////////////////////////////////////////////////////////////////////////
    QImage  setX(int x);
lukas