I want to wrap a C++ vector of vectors to Python code by using SWIG.
Is it possible to wrap this type of vector of vectors?
std::vector<std::vector<MyClass*>>;
In the interface file MyApplication.i
I added these lines:
%include "std_vector.i"
%{
#include <vector>
%}
namespace std {
%template(VectorOfStructVector) vector<vector<MyClass*>>;
}
But, I'm getting an Error when SWIG is executed. I'm able to wrap this type (using reference to the vector):
std::vector<std::vector<MyClass*>*>;
But, it's not working properly, I cannot access the items. That's why I'm interested in this type (without the reference):
std::vector<std::vector<MyClass*>>;
Any ideas?