PageRenderTime 64ms CodeModel.GetById 53ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Lib/ocaml/std_deque.i

#
Swig | 23 lines | 19 code | 3 blank | 1 comment | 0 complexity | 9610b6a26270e955e24bf3ed86b3a490 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1/* Default std_deque wrapper */
 2%module std_deque
 3
 4%rename(__getitem__) std::deque::getitem;
 5%rename(__setitem__) std::deque::setitem;
 6%rename(__delitem__) std::deque::delitem;
 7%rename(__getslice__) std::deque::getslice;
 8%rename(__setslice__) std::deque::setslice;
 9%rename(__delslice__) std::deque::delslice;
10
11%extend std::deque {
12   int __len__() {
13       return (int) self->size();
14   }
15   int __nonzero__() {
16       return ! self->empty();
17   }
18   void append(const T &x) {
19       self->push_back(x);
20   }
21};
22
23%include "_std_deque.i"