PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Lib/ruby/std_deque.i

#
Swig | 30 lines | 22 code | 5 blank | 3 comment | 0 complexity | f2338d56dfd170288e39a9e2a84d5ed8 MD5 | raw file
 1/*
 2  Deques
 3*/
 4
 5%fragment("StdDequeTraits","header",fragment="StdSequenceTraits")
 6%{
 7  namespace swig {
 8    template <class T>
 9    struct traits_asptr<std::deque<T> >  {
10      static int asptr(VALUE obj, std::deque<T>  **vec) {
11	return traits_asptr_stdseq<std::deque<T> >::asptr(obj, vec);
12      }
13    };
14
15    template <class T>
16    struct traits_from<std::deque<T> > {
17      static VALUE from(const std::deque<T> & vec) {
18	return traits_from_stdseq<std::deque<T> >::from(vec);
19      }
20    };
21  }
22%}
23
24%ignore std::deque::push_back;
25%ignore std::deque::pop_back;
26
27#define %swig_deque_methods(Type...) %swig_sequence_methods(Type)
28#define %swig_deque_methods_val(Type...) %swig_sequence_methods_val(Type);
29
30%include <std/std_deque.i>