1 // Vectors 2 3 %fragment("StdVectorTraits","header",fragment="StdSequenceTraits") 4 %{ 5 namespace swig { 6 template <class T> 7 struct traits_asptr<std::vector<T> > { 8 static int asptr(const octave_value& obj, std::vector<T> **vec) { 9 return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec); 10 } 11 }; 12 13 template <class T> 14 struct traits_from<std::vector<T> > { 15 static octave_value from(const std::vector<T>& vec) { 16 return traits_from_stdseq<std::vector<T> >::from(vec); 17 } 18 }; 19 } 20 %} 21 22 #define %swig_vector_methods(Type...) %swig_sequence_methods(Type) 23 #define %swig_vector_methods_val(Type...) %swig_sequence_methods_val(Type); 24 25 %include <std/std_vector.i> 26 27