Documentation 如何让SWIG复制我的源代码';将文档导入it';生成的文件是什么?
我有一些C API,其中包含如下文档Documentation 如何让SWIG复制我的源代码';将文档导入it';生成的文件是什么?,documentation,wrapper,swig,Documentation,Wrapper,Swig,我有一些C API,其中包含如下文档 // file: my_module.h /** * My function. * @param x A number. * @return Return. */ extern int my_function(int x); 我的swig文件 %module my_module %{ #include "my_module.h" %} %include "my_module.h" 例如,如果我为python生成一个包装器,我将
// file: my_module.h
/**
* My function.
* @param x A number.
* @return Return.
*/
extern int my_function(int x);
我的swig文件
%module my_module
%{
#include "my_module.h"
%}
%include "my_module.h"
例如,如果我为python生成一个包装器,我将生成这个python包装器函数
# file: my_module.py
# < I want my docs copied here
def my_function(x):
return _my_module.my_function(x)
#文件:my_module.py
#<我想把我的文件复制到这里
def my_功能(x):
返回我的模块。我的函数(x)
有没有办法告诉SWIG将我的文档复制到输出中,这样当我使用包装器时,我就可以在python编辑器的intellisense中看到我的文档?我自己还没有尝试过,但是SWIG 4.0对doxygen注释有一些支持: