python - Wrapping return vector<T> on swig -


i have c++ library in classes have methods return std::vector<t>, t custom class of library. there way wrap outputs python lists?

regards.

yes it's possible.

c++ classes have public interface wrapped swig.

and swig has typemaps std::vector can used this:

%include "typemaps.i" %include "std_vector.i" %{  #include "myclass.h" %}  %template(myvector) std::vector<myclass>; 

Comments

Popular posts from this blog

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -