Doxygen关于Python声明的行尾注释 [英] Doxygen end of line comments on declarations in Python

查看:125
本文介绍了Doxygen关于Python声明的行尾注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C / C ++中,您可以强制doxygen识别注释适用于一行前面的文本。以下任何一项:

In C/C++, you can force doxygen to recognize that a comment applies to the text preceding it on a line. Any of these:

int my_variable;                 /*!< This is my variable */
int my_variable;                 /**< This is my variable */
int my_variable;                 //!< This is my variable
int my_variable;                 ///< This is my variable

将字符串添加到 my_variable 。在Python中尝试使用等效方法似乎无效。可行:

adds the string to the documentation for my_variable. Trying the equivalent in Python doesn't seem to work. This works:

## This is my variable
my_variable = None

此:

my_variable = None               ## This is my variable
my_other_variable = None

将文档附加到 my_other_variable ,正如您所期望的,但是这两者都是:

attaches the documentation to my_other_variable, as you'd expect, but both of these:

my_variable = None               ##< This is my variable
my_variable = None               #!< This is my variable

似乎只是丢弃文档。有没有办法在Python中做 // !! lt!

seem to just discard the documentation. Is there a way to do the equivalent of //!< in Python?

推荐答案

否,暂时不支持。

Python的解析器由几个学生提供。虽然他们在整体上做得不错,但并没有实现C / C ++可用的所有功能。

The parser for Python was provided by a couple of students. While they did a good job overall, they did not implement all the features that are available for C/C++.

缺少的两个最值得注意的功能是:

Two most notable features that are missing are:

  • support for documenting stuff after the definition
    https://bugzilla.gnome.org/show_bug.cgi?id=361813
  • support for cross-referencing and call graphs
    http://old.nabble.com/Python-callgraph-td24224054.html

希望我以后可以添加这些文件,但是欢迎您提供帮助。

Hopefully I get around to add these in the future, but any help is welcome.

这篇关于Doxygen关于Python声明的行尾注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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