1 /* 2 Stacks 3 */ 4 5 %fragment("StdStackTraits","header",fragment="StdSequenceTraits") 6 %{ 7 namespace swig { 8 template <class T> 9 struct traits_asptr<std::stack<T> > { 10 static int asptr(VALUE obj, std::stack<T> **vec) { 11 return traits_asptr_stdseq<std::stack<T> >::asptr(obj, vec); 12 } 13 }; 14 15 template <class T> 16 struct traits_from<std::stack<T> > { 17 static VALUE from(const std::stack<T> & vec) { 18 return traits_from_stdseq<std::stack<T> >::from(vec); 19 } 20 }; 21 } 22 %} 23 24 25 %rename("delete") std::stack::__delete__; 26 %rename("reject!") std::stack::reject_bang; 27 %rename("map!") std::stack::map_bang; 28 %rename("empty?") std::stack::empty; 29 %rename("include?" ) std::stack::__contains__ const; 30 %rename("has_key?" ) std::stack::has_key const; 31 32 %alias std::stack::push "<<"; 33 34 35 %include <std/std_stack.i> 36