annotate lib/swig/swigwin-2.0.11/Lib/std/std_vector.i @ 1980:c1c74df0a33e

changing most of auto types to their actual types
author Grumpy7
date Wed, 30 Oct 2013 00:47:37 -0700
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::vector
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 %include <std_container.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 // Vector
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 %define %std_vector_methods(vector...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 %std_sequence_methods(vector)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 void reserve(size_type n);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 size_type capacity() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 %define %std_vector_methods_val(vector...)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 %std_sequence_methods_val(vector)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 void reserve(size_type n);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 size_type capacity() const;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 %enddef
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 // std::vector
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 // The aim of all that follows would be to integrate std::vector with
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 // as much as possible, namely, to allow the user to pass and
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 // be returned tuples or lists.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 // const declarations are used to guess the intent of the function being
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 // exported; therefore, the following rationale is applied:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 //
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 // -- f(std::vector<T>), f(const std::vector<T>&):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 // the parameter being read-only, either a sequence or a
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 // previously wrapped std::vector<T> can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 // -- f(std::vector<T>&), f(std::vector<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 // the parameter may be modified; therefore, only a wrapped std::vector
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 // can be passed.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 // -- std::vector<T> f(), const std::vector<T>& f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 // the vector is returned by copy; therefore, a sequence of T:s
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 // is returned which is most easily used in other functions
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 // -- std::vector<T>& f(), std::vector<T>* f():
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 // the vector is returned by reference; therefore, a wrapped std::vector
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 // is returned
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 // -- const std::vector<T>* f(), f(const std::vector<T>*):
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 // for consistency, they expect and return a plain vector pointer.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 // ------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 %{
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 #include <vector>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 %}
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 // exported classes
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 namespace std {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 template<class _Tp, class _Alloc = allocator< _Tp > >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 class vector {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 typedef _Tp value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 typedef _Tp& reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 typedef const _Tp& const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 %traits_swigtype(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 %traits_enum(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 %fragment(SWIG_Traits_frag(std::vector<_Tp, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 fragment=SWIG_Traits_frag(_Tp),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 fragment="StdVectorTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 template <> struct traits<std::vector<_Tp, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 return "std::vector<" #_Tp "," #_Alloc " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 %typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 #ifdef %swig_vector_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 %swig_vector_methods(std::vector<_Tp, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 %std_vector_methods(vector);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98 // This specialization should disappear or get simplified when
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 // a 'const SWIGTYPE*&' can be defined
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 template<class _Tp, class _Alloc >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 class vector<_Tp*, _Alloc > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106 typedef _Tp* value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 typedef value_type reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110 typedef value_type const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113 %traits_swigtype(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115 %fragment(SWIG_Traits_frag(std::vector<_Tp*, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 fragment=SWIG_Traits_frag(_Tp),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117 fragment="StdVectorTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 template <> struct traits<std::vector<_Tp*, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120 typedef value_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122 return "std::vector<" #_Tp " *," #_Alloc " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123 }
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
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
128 %typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
129
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
130 #ifdef %swig_vector_methods_val
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
131 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
132 %swig_vector_methods_val(std::vector<_Tp*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
133 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
134
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
135 %std_vector_methods_val(vector);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
136 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
137
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
138 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
139 // const pointer specialization
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
140 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
141 template<class _Tp, class _Alloc >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
142 class vector<_Tp const *, _Alloc > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
143 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
144 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
145 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
146 typedef _Tp const * value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
147 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
148 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
149 typedef value_type reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
150 typedef value_type const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
151 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
152
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
153 %traits_swigtype(_Tp);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
154
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
155 %fragment(SWIG_Traits_frag(std::vector<_Tp const*, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
156 fragment=SWIG_Traits_frag(_Tp),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
157 fragment="StdVectorTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
158 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
159 template <> struct traits<std::vector<_Tp const*, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
160 typedef value_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
161 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
162 return "std::vector<" #_Tp " const*," #_Alloc " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
163 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
164 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
165 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
166 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
167
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
168 %typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<_Tp const*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
169
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
170 #ifdef %swig_vector_methods_val
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
171 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
172 %swig_vector_methods_val(std::vector<_Tp const*, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
173 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
174
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
175 %std_vector_methods_val(vector);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
176 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
177
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
178 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
179 // bool specialization
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
180 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
181
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
182 template<class _Alloc >
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
183 class vector<bool,_Alloc > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
184 public:
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
185 typedef size_t size_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
186 typedef ptrdiff_t difference_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
187 typedef bool value_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
188 typedef value_type* pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
189 typedef const value_type* const_pointer;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
190 typedef value_type reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
191 typedef value_type const_reference;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
192 typedef _Alloc allocator_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
193
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
194 %traits_swigtype(bool);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
195
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
196 %fragment(SWIG_Traits_frag(std::vector<bool, _Alloc >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
197 fragment=SWIG_Traits_frag(bool),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
198 fragment="StdVectorTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
199 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
200 template <> struct traits<std::vector<bool, _Alloc > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
201 typedef value_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
202 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
203 return "std::vector<bool, _Alloc >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
204 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
205 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
206 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
207 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
208
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
209 %typemap_traits_ptr(SWIG_TYPECHECK_VECTOR, std::vector<bool, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
210
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
211
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
212 #ifdef %swig_vector_methods_val
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
213 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
214 %swig_vector_methods_val(std::vector<bool, _Alloc >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
215 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
216
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
217 %std_vector_methods_val(vector);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
218
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
219 #if defined(SWIG_STD_MODERN_STL) && !defined(SWIG_STD_NOMODERN_STL)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
220 void flip();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
221 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
222
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
223 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
224
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
225 }