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