Reputation: 165
I have a swig file which contains the following code:
%module vgSofa
#define VG_SOFA_API
%import vgd/vgd.i
%import vgm/vgm.i
%template(BasicHandlerShp1) boost::shared_ptr<vgSofa::handler::BasicHandler>;
%{
#include "vgSofa/handler/BasicHandler.hpp"
%}
%template(BasicHandlerShp) vgd::Shp<vgSofa::handler::BasicHandler>;
%include "vgSofa/handler/BasicHandler.hpp"
Where vgd::Shp
inherits to boost::shared_ptr
.
This code generates the wrapper and python file but in the python file generated I don't have access to vgSofa::handler::BasicHandler
functions in my template BasicHandlerShp
.
How can I do to access these functions in BasicHandlerShp
?
Thank you !!
Upvotes: 0
Views: 158
Reputation: 305
Does the BasicHandlerShp1 class work for you? I'm not sure why you would want vgd::Shp to inherit from shared_ptr, is that really what you want to do?
Upvotes: 1