使绑定知道祖先绑定
Make bindings aware of ancestor bindings
我有一个从库类派生的C++类。
class Derived : public LargeLibrary::ParentWithHugeInterface
{
// add some methods
// override some other methods
};
这个库有自己的Python和Perl绑定(使用SWIG创建)。现在我想为自己的类创建类似的绑定。我可以让我的绑定知道LargeLibrary
的遗留问题,以便将Derived
与LargeLibrary
的方法一起使用并获得其父级的接口吗?
更新:我已经找到了Python的PyTypeObject* PyTypeObject.tp_base
插槽,但我仍然不知道如何使用它。
最后,我找到了解决方案。
这就像在接口文件中添加%import "LargeLibrary.i"
一样简单。
相关文章:
- 我想将一个对T类型的非常量左值引用绑定到一个T类型的临时值
- 在基于范围的for循环中使用结构化绑定声明
- 使用 LuaBridge 将 LuaJIT 绑定到C++会导致"PANIC: unprotected error"
- 尝试通过OCI例程从Oracle获取blob数据,但出现错误:ORA-01008:并非所有变量都绑定
- 在使用GPU支持编译Tensorflow时,会遇到CUDA_TOOLKIT_PATH未绑定变量
- 视觉studo 2019中的漫画和静态/动态绑定
- 将自由函数绑定为类成员函数
- 将常量指针引用绑定到非常量指针
- 在派生类中绑定非静态模板化成员函数
- 绑定派生类方法C++从实例范围之外的分隔 std::function 变量调用
- 在 openGL 中多次绑定缓冲区
- 定义有趣的宏和正则表达式在Z3 C++绑定
- 使用结构化绑定'Reflection'
- 为什么 std::绑定错误参数可以成功?
- 如何绑定 C++ gRPC 客户端的网络接口
- 在 openmp 中,omp_get_thread_num是否绑定到物理线程?
- C++绑定(已弃用)
- 运行时错误:引用绑定到类型为"int"的空指针
- 有没有办法将重载的类函数绑定到函数对象?
- 使绑定知道祖先绑定