开发者

Documenting Python packages with doxygen

开发者 https://www.devze.com 2023-03-13 00:45 出处:网络
\"Special documentation blocks in Python\" in http://www.doxygen.nl/manual/docblocks.html gives an example of doxygen usage with Python.

"Special documentation blocks in Python" in http://www.doxygen.nl/manual/docblocks.html gives an example of doxygen usage with Python.

In the corresponding HTML documentation that is generated by doxygen (example output in the web), if one click开发者_如何转开发s on a package name, then all the descriptions, classes and functions connected with the package are shown.

If I take the same example script from doxygen documentation, create config file with "doxygen -g config" and generate html with "doxygen config", then the output is different. If I click on the package name, then only the package description is shown, but not the classes and functions.

What do I need to change in the config file or some xml scheme, in order to have classes and functions under package documentation.

Edit 1: The example from the webpage above:

## @package pyexample
#  Documentation for this module.
#
#  More details.

## Documentation for a function.
#
#  More details.
def func():
   pass

## Documentation for a class.
#
#  More details.
class PyClass:

    ## The constructor.
    def __init__(self):
        self._memVar = 0;

    ## Documentation for a method.
    #  @param self The object pointer.
    def PyMethod(self):
        pass

    ## A class variable.
    classVar = 0;

    ## @var _memVar
    #  a member variable

Edit 2: using Win XP and doxygen-1.7.4-setup.exe


The example in the doxygen documentation was generated with the following config settings:

PROJECT_NAME      = "Python"
OUTPUT_DIRECTORY  = pyexample
GENERATE_LATEX    = NO
GENERATE_MAN      = NO
GENERATE_RTF      = NO
OPTIMIZE_OUTPUT_JAVA = YES
INPUT             = pyexample.py
QUIET             = YES
JAVADOC_AUTOBRIEF = YES
SEARCHENGINE      = NO

See the examples directory of the doxygen source package.

0

精彩评论

暂无评论...
验证码 换一张
取 消