Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/158.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使绑定了解祖先绑定 我有一个从类库派生的C++类。_Python_C++_Perl_Swig - Fatal编程技术网

Python 使绑定了解祖先绑定 我有一个从类库派生的C++类。

Python 使绑定了解祖先绑定 我有一个从类库派生的C++类。,python,c++,perl,swig,Python,C++,Perl,Swig,class Derived : public LargeLibrary::ParentWithHugeInterface { // add some methods // override some other methods }; 这个库有自己的Python和Perl绑定(使用SWIG创建)。现在我想为我自己的类创建类似的绑定。我是否可以让我的绑定知道LargeLibrary的遗留内容,以便将派生的与LargeLibrary的方法一起使用,并获取其父接口 更新: 我找到了Python

class Derived : public LargeLibrary::ParentWithHugeInterface
{
  // add some methods
  // override some other methods
};
这个库有自己的Python和Perl绑定(使用SWIG创建)。现在我想为我自己的类创建类似的绑定。我是否可以让我的绑定知道
LargeLibrary
的遗留内容,以便将
派生的
LargeLibrary
的方法一起使用,并获取其父接口

更新:
我找到了Python的
PyTypeObject*PyTypeObject.tp_base
slot,但是我仍然不知道如何使用它

最后,我找到了解决办法

只需在接口文件中添加
%import“LargeLibrary.i”
即可