annotate lib/swig/swigwin-2.0.11/Lib/std/std_deque.i @ 2575:a76d408c5132 tip

DrawTranslucent -> DrawTextureGrayShade Removed old texture drawing stuff
author a.parshin
date Wed, 09 Mar 2016 01:39:52 +0200
parents b3009adc0e2f
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 // std::deque
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4 %include <std_container.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6 // Deque
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 %define %std_deque_methods(deque...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 %std_sequence_methods(deque)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 void pop_front();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 void push_front(const value_type& x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 %define %std_deque_methods_val(deque...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 %std_sequence_methods_val(deque)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 void pop_front();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 void push_front(value_type x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 // std::deque
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 // const declarations are used to guess the intent of the function being
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 // exported; therefore, the following rationale is applied:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 // -- f(std::deque<T>), f(const std::deque<T>&):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 // the parameter being read-only, either a sequence or a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 // previously wrapped std::deque<T> can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 // -- f(std::deque<T>&), f(std::deque<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 // the parameter may be modified; therefore, only a wrapped std::deque
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 // can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 // -- std::deque<T> f(), const std::deque<T>& f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 // the deque is returned by copy; therefore, a sequence of T:s
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 // is returned which is most easily used in other functions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 // -- std::deque<T>& f(), std::deque<T>* f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 // the deque is returned by reference; therefore, a wrapped std::deque
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 // is returned
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 // -- const std::deque<T>* f(), f(const std::deque<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 // for consistency, they expect and return a plain deque pointer.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 %{
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 #include <deque>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 %}
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 // exported classes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 namespace std {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 template<class _Tp, class _Alloc = allocator<_Tp> >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 class deque {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 typedef _Tp value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 typedef value_type& reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 typedef const value_type& const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 %traits_swigtype(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 %fragment(SWIG_Traits_frag(std::deque<_Tp, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 fragment=SWIG_Traits_frag(_Tp),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 fragment="StdDequeTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 template <> struct traits<std::deque<_Tp, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 return "std::deque<" #_Tp " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 %typemap_traits_ptr(SWIG_TYPECHECK_DEQUE, std::deque<_Tp, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 #ifdef %swig_deque_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 %swig_deque_methods(std::deque<_Tp, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 %std_deque_methods(deque);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 template<class _Tp, class _Alloc >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 class deque<_Tp*, _Alloc > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 typedef _Tp* value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97 typedef value_type reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98 typedef value_type const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 %traits_swigtype(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 %fragment(SWIG_Traits_frag(std::deque<_Tp*, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 fragment=SWIG_Traits_frag(_Tp),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105 fragment="StdDequeTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 template <> struct traits<std::deque<_Tp*, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 typedef value_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110 return "std::deque<" #_Tp " * >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 %typemap_traits_ptr(SWIG_TYPECHECK_DEQUE, std::deque<_Tp*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118 #ifdef %swig_deque_methods_val
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120 %swig_deque_methods_val(std::deque<_Tp*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123 %std_deque_methods_val(std::deque<_Tp*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
124 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
125
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
126 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
127