Doxygen python连接到函数 [英] Doxygen python linking to functions

查看:544
本文介绍了Doxygen python连接到函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Doxygen记录我的python模块,我试图让它链接到文本中的函数。我可以让它链接到函数的命名空间,但不是函数本身。



例如。 ModuleName :: Namespace 工作但 ModuleName :: Namespace :: getSomething()不。



如何让这些链接工作?

解决方案

Doxygen自动将功能包装在每个模块的命名空间。您必须记录此模块,以使文档可见和可链接(或使用EXTRACT_ALL = YES)。



这是一个示例 func。 py

  ## @package func 
#模块文档

##一个函数

#更多文档。
def foo():
打印Hello World!

##另一个功能。

#这个函数只是调用foo()
def bar():
foo()

另一个函数 another.py

  ## @package另一个

#另一个模块

import func

##这个函数调用func.foo )
def another():
foo()

你应该会看到foo()和func.foo()将被自动链接。


I'm using Doxygen to document my python module and I'm trying to get it to link to a function in-text. I can get it to link to the function's namespace ok but not to the function itself.

E.g. ModuleName::Namespace works but ModuleName::Namespace::getSomething() doesn't.

How do I get these links to work?

解决方案

Doxygen automatically wraps functions in a namespace per module. You have to document this module in order to make the documentation visible and linkable (or use EXTRACT_ALL = YES).

Here is an example func.py

## @package func
#  Module docs

## A function
#
#  More documentation.
def foo():
    print "Hello World!"

## Another function.
#
#  This function simply calls foo()
def bar():
    foo()

And another function another.py:

## @package another
#
#  Another module

import func

## This function calls func.foo()
def another():
     foo()

You should see that foo() and func.foo() will be automatically linked.

这篇关于Doxygen python连接到函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆