10

"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 clicks 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

2
  • Are these classes and functions documented (with Doxygen) or is only the package documented? Commented Jun 14, 2011 at 8:05
  • it's all documented, added the example from the doxygen docs Commented Jun 14, 2011 at 8:31

1 Answer 1

8

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.

Sign up to request clarification or add additional context in comments.

3 Comments

If anyone wants a direct link
Almost ... I copied the module text into a separate file, then set the config settings as above. The module, class and class member comments came out fine. The module-level function func() was left out. Is there some way to get this documentation included, too?
... I think setting EXTRACT_ALL = YES gets the module-level func() documentation, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.