使用 doxygen 记录 Python 包
http://www.doxygen.nl/manual/docblocks 中的“Python 中的特殊文档块”。 html 给出了 doxygen 在 Python 中的使用示例。
在 doxygen 生成的相应 HTML 文档中(Web 中的示例输出),如果单击包名称,则会显示与该包相关的所有描述、类和函数。
如果我从 doxygen 文档中获取相同的示例脚本,使用“doxygen -g config”创建配置文件并使用“doxygen config”生成 html,则输出会有所不同。如果我单击包名称,则仅显示包描述,而不显示类和函数。
我需要在配置文件或某些 xml 方案中更改什么,才能在包文档下包含类和函数。
编辑1:上面网页的示例:
## @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
编辑2: 使用 Win XP 和 doxygen-1.7.4-setup.exe
"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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
doxygen 文档中的示例是使用以下配置设置生成的:
请参阅 doxygen 源包的示例目录。
The example in the doxygen documentation was generated with the following config settings:
See the examples directory of the doxygen source package.