%module template_matrix %{ #include struct pop { }; %} %include "std_vector.i" %inline { namespace simuPOP { struct POP { }; template class Operator { int x; }; } } %template(vectorop) std::vector< simuPOP::Operator >; namespace simuPOP { %template(baseOperator) Operator; } #if 1 namespace std { %template(vectori) vector; %template(matrixi) vector< vector >; %template(cubei) vector< vector< vector > >; } %inline %{ std::vector passVector(const std::vector& a) { return a; } std::vector< std::vector > passMatrix(const std::vector< std::vector >& a) { return a; } std::vector< std::vector< std::vector > > passCube(const std::vector< std::vector< std::vector > >& a) { return a; } %} #endif