Doxygen comments in Python
I’ve been creating automatic documentation for the Entertainer project using Doxygen.
As you may know, Entertainer is written in python, so what follows is a short guide to commenting python code in a format that Doxygen will pick up.
Say you wrote the following:
class Demo:
def theDemoTest(self, testParameter):
#do something here
return 0
You can comment this in Doxygen format in the following way:
class Demo:
"""
This is a description of the Demo class
@author Joshua Scotton
@version 0.1
"""
def theDemoTest(self, testParameter):
"""
This is the very, very, very, very, very, very, very, very, very, very long description of theDemoTest!
@brief This is where you can put a brief description
@see Demo
@param testParameter String: Input Parameter is a string
@return int Returns a 0 if successful
"""
#do something here
return 0
Quick Tag List
@author
@brief
@bug
@code and @endcode
@date
@file
@package
@param
@return
@see
@todo
@version
@warning
March 19th, 2008 at 12:13 am
What filter do you use in DoxyGen to make tags work?
March 19th, 2008 at 12:02 pm
Hi Greg,
The setup I use for Doxygen is described in my earlier post at http://www.joshuascotton.com/main/archives/64
The filter I use is doxypy from http://code.foosel.org/doxypy and I edit the config.dox file to have the following line:
INPUT_FILTER = “python /path/to/doxypy.py”
Josh