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

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -