annotate lib/swig/swigwin-2.0.11/Lib/std/std_pair.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 %include <std_common.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 %{
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4 #include <utility>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 %}
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 namespace std {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 template <class T, class U > struct pair {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 typedef T first_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 typedef U second_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 %traits_swigtype(T);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 %traits_swigtype(U);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 %fragment(SWIG_Traits_frag(std::pair<T,U >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 fragment=SWIG_Traits_frag(T),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 fragment=SWIG_Traits_frag(U),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 fragment="StdPairTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 template <> struct traits<std::pair<T,U > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 return "std::pair<" #T "," #U " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 #ifndef SWIG_STD_PAIR_ASVAL
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T,U >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 #else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 %typemap_traits(SWIG_TYPECHECK_PAIR, std::pair<T,U >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 pair();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 pair(T first, U second);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 pair(const pair& p);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 template <class U1, class U2> pair(const pair<U1, U2> &p);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 T first;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 U second;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 #ifdef %swig_pair_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 %swig_pair_methods(std::pair<T,U >)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 #endif
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 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 // The following specializations should disappear or get
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53 // simplified when a 'const SWIGTYPE*&' can be defined
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 // ***
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 template <class T, class U > struct pair<T, U*> {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 typedef T first_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 typedef U* second_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 %traits_swigtype(T);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 %traits_swigtype(U);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 %fragment(SWIG_Traits_frag(std::pair<T,U* >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 fragment=SWIG_Traits_frag(T),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 fragment=SWIG_Traits_frag(U),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 fragment="StdPairTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 template <> struct traits<std::pair<T,U* > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 return "std::pair<" #T "," #U " * >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 }
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 %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T,U* >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 pair();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 pair(T __a, U* __b);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 pair(const pair& __p);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 T first;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 U* second;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 #ifdef %swig_pair_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 %swig_pair_methods(std::pair<T,U*>)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 template <class T, class U > struct pair<T*, U> {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92 typedef T* first_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 typedef U second_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95 %traits_swigtype(T);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 %traits_swigtype(U);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98 %fragment(SWIG_Traits_frag(std::pair<T*,U >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99 fragment=SWIG_Traits_frag(T),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 fragment=SWIG_Traits_frag(U),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 fragment="StdPairTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 template <> struct traits<std::pair<T*,U > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106 return "std::pair<" #T " *," #U " >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112 %typemap_traits_ptr(SWIG_TYPECHECK_PAIR, std::pair<T*,U >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114 pair();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115 pair(T* __a, U __b);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 pair(const pair& __p);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118 T* first;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 U second;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 #ifdef %swig_pair_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123 %swig_pair_methods(std::pair<T*,U >)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
124 #endif
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 template <class T, class U > struct pair<T*, U*> {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
128 typedef T* first_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
129 typedef U* second_type;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
130
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
131 %traits_swigtype(T);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
132 %traits_swigtype(U);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
133
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
134 %fragment(SWIG_Traits_frag(std::pair<T*,U* >), "header",
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
135 fragment=SWIG_Traits_frag(T),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
136 fragment=SWIG_Traits_frag(U),
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
137 fragment="StdPairTraits") {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
138 namespace swig {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
139 template <> struct traits<std::pair<T*,U* > > {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
140 typedef pointer_category category;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
141 static const char* type_name() {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
142 return "std::pair<" #T " *," #U " * >";
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
143 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
144 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
145 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
146 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
147
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
148 %typemap_traits(SWIG_TYPECHECK_PAIR, std::pair<T*,U* >);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
149
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
150 pair();
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
151 pair(T* __a, U* __b);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
152 pair(const pair& __p);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
153
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
154 T* first;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
155 U* second;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
156
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
157 #ifdef %swig_pair_methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
158 // Add swig/language extra methods
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
159 %swig_pair_methods(std::pair<T*,U*>)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
160 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
161 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
162
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
163 }