1 | // THIS IS A GENERATED FILE, RUN callback.pl to regenerate it |
1 | // THIS IS A GENERATED FILE: RUN callback.pl to regenerate it |
2 | // THIS IS A GENERATED FILE, RUN callback.pl to regenerate it |
2 | // THIS IS A GENERATED FILE: callback.pl is part of the GVPE |
3 | // THIS IS A GENERATED FILE, RUN callback.pl to regenerate it |
3 | // THIS IS A GENERATED FILE: distribution. |
4 | // THIS IS A GENERATED FILE, RUN callback.pl to regenerate it |
|
|
5 | // THIS IS A GENERATED FILE, RUN callback.pl to regenerate it |
|
|
6 | // THIS IS A GENERATED FILE, RUN callback.pl to regenerate it |
|
|
7 | |
4 | |
8 | /* |
5 | /* |
9 | callback.h -- C++ callback mechanism |
6 | callback.h -- C++ callback mechanism |
|
|
7 | Copyright (C) 2003-2007 Marc Lehmann <pcg@goof.com> |
10 | |
8 | |
|
|
9 | This file is part of GVPE. |
|
|
10 | |
11 | This program is free software; you can redistribute it and/or modify |
11 | GVPE is free software; you can redistribute it and/or modify |
12 | it under the terms of the GNU General Public License as published by |
12 | it under the terms of the GNU General Public License as published by |
13 | the Free Software Foundation; either version 2 of the License, or |
13 | the Free Software Foundation; either version 2 of the License, or |
14 | (at your option) any later version. |
14 | (at your option) any later version. |
15 | |
15 | |
16 | This program is distributed in the hope that it will be useful, |
16 | This program is distributed in the hope that it will be useful, |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | GNU General Public License for more details. |
19 | GNU General Public License for more details. |
20 | |
20 | |
21 | You should have received a copy of the GNU General Public License |
21 | You should have received a copy of the GNU General Public License |
22 | along with this program; if not, write to the Free Software |
22 | along with gvpe; if not, write to the Free Software |
23 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
24 | */ |
24 | */ |
25 | |
25 | |
26 | #ifndef VPE_CALLBACK_H__ |
26 | #ifndef CALLBACK_H__ |
27 | #define VPE_CALLBACK_H__ |
27 | #define CALLBACK_H__ |
|
|
28 | |
|
|
29 | #define CALLBACK_H_VERSION 3 |
|
|
30 | |
|
|
31 | template<class signature> |
|
|
32 | struct callback_funtype_trait; |
|
|
33 | |
|
|
34 | template<int arity, class signature> |
|
|
35 | struct callback_get_impl; |
28 | |
36 | |
29 | template<class R> |
37 | template<class R> |
30 | class callback0 { |
38 | class callback0 |
31 | struct object { }; |
39 | { |
|
|
40 | struct klass; // it is vital that this is never defined |
32 | |
41 | |
33 | void *obj; |
42 | typedef R (klass::*ptr_type)(); |
34 | R (object::*meth)(); |
|
|
35 | |
43 | |
36 | /* a proxy is a kind of recipe on how to call a specific class method */ |
44 | klass *o; |
37 | struct proxy_base { |
45 | R (klass::*m)(); |
38 | virtual R call (void *obj, R (object::*meth)()) = 0; |
|
|
39 | }; |
|
|
40 | template<class O1, class O2> |
|
|
41 | struct proxy : proxy_base { |
|
|
42 | virtual R call (void *obj, R (object::*meth)()) |
|
|
43 | { |
|
|
44 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)()>(meth))) |
|
|
45 | (); |
|
|
46 | } |
|
|
47 | }; |
|
|
48 | |
46 | |
49 | proxy_base *prxy; |
|
|
50 | |
|
|
51 | public: |
47 | public: |
52 | template<class O1, class O2> |
48 | template<class O1, class O2> |
53 | callback0 (O1 *object, R (O2::*method)()) |
49 | explicit callback0 (O1 *object, R (O2::*method)()) |
54 | { |
50 | { |
55 | static proxy<O1,O2> p; |
|
|
56 | obj = reinterpret_cast<void *>(object); |
51 | o = reinterpret_cast<klass *>(object); |
57 | meth = reinterpret_cast<R (object::*)()>(method); |
52 | m = reinterpret_cast<R (klass::*)()>(method); |
58 | prxy = &p; |
|
|
59 | } |
53 | } |
60 | |
54 | |
|
|
55 | // this works because a standards-compliant C++ compiler |
|
|
56 | // basically can't help it: it doesn't have the knowledge |
|
|
57 | // required to miscompile (klass is not defined anywhere |
|
|
58 | // and nothing is known about the constructor arguments) :) |
61 | R call() const |
59 | R call() const |
62 | { |
60 | { |
63 | return prxy->call (obj, meth); |
61 | return (o->*m) (); |
64 | } |
62 | } |
65 | |
63 | |
66 | R operator ()() const |
64 | R operator ()() const |
67 | { |
65 | { |
68 | return call (); |
66 | return call (); |
69 | } |
67 | } |
70 | }; |
68 | }; |
71 | |
69 | |
|
|
70 | template<class R> |
|
|
71 | struct callback_funtype_trait0 |
|
|
72 | { |
|
|
73 | static const int arity = 0; |
|
|
74 | typedef R type (void); |
|
|
75 | typedef R result_type; |
|
|
76 | |
|
|
77 | }; |
|
|
78 | |
|
|
79 | template<class R> |
|
|
80 | struct callback_funtype_trait<R ()> : callback_funtype_trait0<R> |
|
|
81 | { |
|
|
82 | }; |
|
|
83 | |
|
|
84 | template<class signature> |
|
|
85 | struct callback_get_impl<0, signature> |
|
|
86 | { |
|
|
87 | typedef callback_funtype_trait<signature> T; |
|
|
88 | typedef callback0<typename T::result_type> type; |
|
|
89 | }; |
|
|
90 | |
72 | template<class R, class A1> |
91 | template<class R, class A1> |
73 | class callback1 { |
92 | class callback1 |
74 | struct object { }; |
93 | { |
|
|
94 | struct klass; // it is vital that this is never defined |
75 | |
95 | |
76 | void *obj; |
96 | typedef R (klass::*ptr_type)(A1); |
77 | R (object::*meth)(A1); |
|
|
78 | |
97 | |
79 | /* a proxy is a kind of recipe on how to call a specific class method */ |
98 | klass *o; |
80 | struct proxy_base { |
99 | R (klass::*m)(A1); |
81 | virtual R call (void *obj, R (object::*meth)(A1), A1 a1) = 0; |
|
|
82 | }; |
|
|
83 | template<class O1, class O2> |
|
|
84 | struct proxy : proxy_base { |
|
|
85 | virtual R call (void *obj, R (object::*meth)(A1), A1 a1) |
|
|
86 | { |
|
|
87 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1)>(meth))) |
|
|
88 | (a1); |
|
|
89 | } |
|
|
90 | }; |
|
|
91 | |
100 | |
92 | proxy_base *prxy; |
|
|
93 | |
|
|
94 | public: |
101 | public: |
95 | template<class O1, class O2> |
102 | template<class O1, class O2> |
96 | callback1 (O1 *object, R (O2::*method)(A1)) |
103 | explicit callback1 (O1 *object, R (O2::*method)(A1)) |
97 | { |
104 | { |
98 | static proxy<O1,O2> p; |
|
|
99 | obj = reinterpret_cast<void *>(object); |
105 | o = reinterpret_cast<klass *>(object); |
100 | meth = reinterpret_cast<R (object::*)(A1)>(method); |
106 | m = reinterpret_cast<R (klass::*)(A1)>(method); |
101 | prxy = &p; |
|
|
102 | } |
107 | } |
103 | |
108 | |
|
|
109 | // this works because a standards-compliant C++ compiler |
|
|
110 | // basically can't help it: it doesn't have the knowledge |
|
|
111 | // required to miscompile (klass is not defined anywhere |
|
|
112 | // and nothing is known about the constructor arguments) :) |
104 | R call(A1 a1) const |
113 | R call(A1 a1) const |
105 | { |
114 | { |
106 | return prxy->call (obj, meth, a1); |
115 | return (o->*m) (a1); |
107 | } |
116 | } |
108 | |
117 | |
109 | R operator ()(A1 a1) const |
118 | R operator ()(A1 a1) const |
110 | { |
119 | { |
111 | return call (a1); |
120 | return call (a1); |
112 | } |
121 | } |
113 | }; |
122 | }; |
114 | |
123 | |
|
|
124 | template<class R, class A1> |
|
|
125 | struct callback_funtype_trait1 |
|
|
126 | { |
|
|
127 | static const int arity = 1; |
|
|
128 | typedef R type (A1); |
|
|
129 | typedef R result_type; |
|
|
130 | typedef A1 arg1_type; |
|
|
131 | }; |
|
|
132 | |
|
|
133 | template<class R, class A1> |
|
|
134 | struct callback_funtype_trait<R (A1)> : callback_funtype_trait1<R, A1> |
|
|
135 | { |
|
|
136 | }; |
|
|
137 | |
|
|
138 | template<class signature> |
|
|
139 | struct callback_get_impl<1, signature> |
|
|
140 | { |
|
|
141 | typedef callback_funtype_trait<signature> T; |
|
|
142 | typedef callback1<typename T::result_type, typename T::arg1_type> type; |
|
|
143 | }; |
|
|
144 | |
115 | template<class R, class A1, class A2> |
145 | template<class R, class A1, class A2> |
116 | class callback2 { |
146 | class callback2 |
117 | struct object { }; |
147 | { |
|
|
148 | struct klass; // it is vital that this is never defined |
118 | |
149 | |
119 | void *obj; |
150 | typedef R (klass::*ptr_type)(A1, A2); |
120 | R (object::*meth)(A1, A2); |
|
|
121 | |
151 | |
122 | /* a proxy is a kind of recipe on how to call a specific class method */ |
152 | klass *o; |
123 | struct proxy_base { |
153 | R (klass::*m)(A1, A2); |
124 | virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) = 0; |
|
|
125 | }; |
|
|
126 | template<class O1, class O2> |
|
|
127 | struct proxy : proxy_base { |
|
|
128 | virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) |
|
|
129 | { |
|
|
130 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2)>(meth))) |
|
|
131 | (a1, a2); |
|
|
132 | } |
|
|
133 | }; |
|
|
134 | |
154 | |
135 | proxy_base *prxy; |
|
|
136 | |
|
|
137 | public: |
155 | public: |
138 | template<class O1, class O2> |
156 | template<class O1, class O2> |
139 | callback2 (O1 *object, R (O2::*method)(A1, A2)) |
157 | explicit callback2 (O1 *object, R (O2::*method)(A1, A2)) |
140 | { |
158 | { |
141 | static proxy<O1,O2> p; |
|
|
142 | obj = reinterpret_cast<void *>(object); |
159 | o = reinterpret_cast<klass *>(object); |
143 | meth = reinterpret_cast<R (object::*)(A1, A2)>(method); |
160 | m = reinterpret_cast<R (klass::*)(A1, A2)>(method); |
144 | prxy = &p; |
|
|
145 | } |
161 | } |
146 | |
162 | |
|
|
163 | // this works because a standards-compliant C++ compiler |
|
|
164 | // basically can't help it: it doesn't have the knowledge |
|
|
165 | // required to miscompile (klass is not defined anywhere |
|
|
166 | // and nothing is known about the constructor arguments) :) |
147 | R call(A1 a1, A2 a2) const |
167 | R call(A1 a1, A2 a2) const |
148 | { |
168 | { |
149 | return prxy->call (obj, meth, a1, a2); |
169 | return (o->*m) (a1, a2); |
150 | } |
170 | } |
151 | |
171 | |
152 | R operator ()(A1 a1, A2 a2) const |
172 | R operator ()(A1 a1, A2 a2) const |
153 | { |
173 | { |
154 | return call (a1, a2); |
174 | return call (a1, a2); |
155 | } |
175 | } |
156 | }; |
176 | }; |
157 | |
177 | |
|
|
178 | template<class R, class A1, class A2> |
|
|
179 | struct callback_funtype_trait2 |
|
|
180 | { |
|
|
181 | static const int arity = 2; |
|
|
182 | typedef R type (A1, A2); |
|
|
183 | typedef R result_type; |
|
|
184 | typedef A1 arg1_type; typedef A2 arg2_type; |
|
|
185 | }; |
|
|
186 | |
|
|
187 | template<class R, class A1, class A2> |
|
|
188 | struct callback_funtype_trait<R (A1, A2)> : callback_funtype_trait2<R, A1, A2> |
|
|
189 | { |
|
|
190 | }; |
|
|
191 | |
|
|
192 | template<class signature> |
|
|
193 | struct callback_get_impl<2, signature> |
|
|
194 | { |
|
|
195 | typedef callback_funtype_trait<signature> T; |
|
|
196 | typedef callback2<typename T::result_type, typename T::arg1_type, typename T::arg2_type> type; |
|
|
197 | }; |
|
|
198 | |
158 | template<class R, class A1, class A2, class A3> |
199 | template<class R, class A1, class A2, class A3> |
159 | class callback3 { |
200 | class callback3 |
160 | struct object { }; |
201 | { |
|
|
202 | struct klass; // it is vital that this is never defined |
161 | |
203 | |
162 | void *obj; |
204 | typedef R (klass::*ptr_type)(A1, A2, A3); |
|
|
205 | |
|
|
206 | klass *o; |
163 | R (object::*meth)(A1, A2, A3); |
207 | R (klass::*m)(A1, A2, A3); |
164 | |
208 | |
165 | /* a proxy is a kind of recipe on how to call a specific class method */ |
|
|
166 | struct proxy_base { |
|
|
167 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) = 0; |
|
|
168 | }; |
|
|
169 | template<class O1, class O2> |
|
|
170 | struct proxy : proxy_base { |
|
|
171 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) |
|
|
172 | { |
|
|
173 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3)>(meth))) |
|
|
174 | (a1, a2, a3); |
|
|
175 | } |
|
|
176 | }; |
|
|
177 | |
|
|
178 | proxy_base *prxy; |
|
|
179 | |
|
|
180 | public: |
209 | public: |
181 | template<class O1, class O2> |
210 | template<class O1, class O2> |
182 | callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) |
211 | explicit callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) |
183 | { |
212 | { |
184 | static proxy<O1,O2> p; |
|
|
185 | obj = reinterpret_cast<void *>(object); |
213 | o = reinterpret_cast<klass *>(object); |
186 | meth = reinterpret_cast<R (object::*)(A1, A2, A3)>(method); |
214 | m = reinterpret_cast<R (klass::*)(A1, A2, A3)>(method); |
187 | prxy = &p; |
|
|
188 | } |
215 | } |
189 | |
216 | |
|
|
217 | // this works because a standards-compliant C++ compiler |
|
|
218 | // basically can't help it: it doesn't have the knowledge |
|
|
219 | // required to miscompile (klass is not defined anywhere |
|
|
220 | // and nothing is known about the constructor arguments) :) |
190 | R call(A1 a1, A2 a2, A3 a3) const |
221 | R call(A1 a1, A2 a2, A3 a3) const |
191 | { |
222 | { |
192 | return prxy->call (obj, meth, a1, a2, a3); |
223 | return (o->*m) (a1, a2, a3); |
193 | } |
224 | } |
194 | |
225 | |
195 | R operator ()(A1 a1, A2 a2, A3 a3) const |
226 | R operator ()(A1 a1, A2 a2, A3 a3) const |
196 | { |
227 | { |
197 | return call (a1, a2, a3); |
228 | return call (a1, a2, a3); |
198 | } |
229 | } |
199 | }; |
230 | }; |
200 | |
231 | |
|
|
232 | template<class R, class A1, class A2, class A3> |
|
|
233 | struct callback_funtype_trait3 |
|
|
234 | { |
|
|
235 | static const int arity = 3; |
|
|
236 | typedef R type (A1, A2, A3); |
|
|
237 | typedef R result_type; |
|
|
238 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; |
|
|
239 | }; |
|
|
240 | |
|
|
241 | template<class R, class A1, class A2, class A3> |
|
|
242 | struct callback_funtype_trait<R (A1, A2, A3)> : callback_funtype_trait3<R, A1, A2, A3> |
|
|
243 | { |
|
|
244 | }; |
|
|
245 | |
|
|
246 | template<class signature> |
|
|
247 | struct callback_get_impl<3, signature> |
|
|
248 | { |
|
|
249 | typedef callback_funtype_trait<signature> T; |
|
|
250 | typedef callback3<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type> type; |
|
|
251 | }; |
|
|
252 | |
201 | template<class R, class A1, class A2, class A3, class A4> |
253 | template<class R, class A1, class A2, class A3, class A4> |
202 | class callback4 { |
254 | class callback4 |
203 | struct object { }; |
255 | { |
|
|
256 | struct klass; // it is vital that this is never defined |
204 | |
257 | |
205 | void *obj; |
258 | typedef R (klass::*ptr_type)(A1, A2, A3, A4); |
|
|
259 | |
|
|
260 | klass *o; |
206 | R (object::*meth)(A1, A2, A3, A4); |
261 | R (klass::*m)(A1, A2, A3, A4); |
207 | |
262 | |
208 | /* a proxy is a kind of recipe on how to call a specific class method */ |
|
|
209 | struct proxy_base { |
|
|
210 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) = 0; |
|
|
211 | }; |
|
|
212 | template<class O1, class O2> |
|
|
213 | struct proxy : proxy_base { |
|
|
214 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) |
|
|
215 | { |
|
|
216 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4)>(meth))) |
|
|
217 | (a1, a2, a3, a4); |
|
|
218 | } |
|
|
219 | }; |
|
|
220 | |
|
|
221 | proxy_base *prxy; |
|
|
222 | |
|
|
223 | public: |
263 | public: |
224 | template<class O1, class O2> |
264 | template<class O1, class O2> |
225 | callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) |
265 | explicit callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) |
226 | { |
266 | { |
227 | static proxy<O1,O2> p; |
|
|
228 | obj = reinterpret_cast<void *>(object); |
267 | o = reinterpret_cast<klass *>(object); |
229 | meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4)>(method); |
268 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4)>(method); |
230 | prxy = &p; |
|
|
231 | } |
269 | } |
232 | |
270 | |
|
|
271 | // this works because a standards-compliant C++ compiler |
|
|
272 | // basically can't help it: it doesn't have the knowledge |
|
|
273 | // required to miscompile (klass is not defined anywhere |
|
|
274 | // and nothing is known about the constructor arguments) :) |
233 | R call(A1 a1, A2 a2, A3 a3, A4 a4) const |
275 | R call(A1 a1, A2 a2, A3 a3, A4 a4) const |
234 | { |
276 | { |
235 | return prxy->call (obj, meth, a1, a2, a3, a4); |
277 | return (o->*m) (a1, a2, a3, a4); |
236 | } |
278 | } |
237 | |
279 | |
238 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4) const |
280 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4) const |
239 | { |
281 | { |
240 | return call (a1, a2, a3, a4); |
282 | return call (a1, a2, a3, a4); |
241 | } |
283 | } |
242 | }; |
284 | }; |
243 | |
285 | |
|
|
286 | template<class R, class A1, class A2, class A3, class A4> |
|
|
287 | struct callback_funtype_trait4 |
|
|
288 | { |
|
|
289 | static const int arity = 4; |
|
|
290 | typedef R type (A1, A2, A3, A4); |
|
|
291 | typedef R result_type; |
|
|
292 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; |
|
|
293 | }; |
|
|
294 | |
|
|
295 | template<class R, class A1, class A2, class A3, class A4> |
|
|
296 | struct callback_funtype_trait<R (A1, A2, A3, A4)> : callback_funtype_trait4<R, A1, A2, A3, A4> |
|
|
297 | { |
|
|
298 | }; |
|
|
299 | |
|
|
300 | template<class signature> |
|
|
301 | struct callback_get_impl<4, signature> |
|
|
302 | { |
|
|
303 | typedef callback_funtype_trait<signature> T; |
|
|
304 | typedef callback4<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type> type; |
|
|
305 | }; |
|
|
306 | |
244 | template<class R, class A1, class A2, class A3, class A4, class A5> |
307 | template<class R, class A1, class A2, class A3, class A4, class A5> |
245 | class callback5 { |
308 | class callback5 |
246 | struct object { }; |
309 | { |
|
|
310 | struct klass; // it is vital that this is never defined |
247 | |
311 | |
248 | void *obj; |
312 | typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5); |
|
|
313 | |
|
|
314 | klass *o; |
249 | R (object::*meth)(A1, A2, A3, A4, A5); |
315 | R (klass::*m)(A1, A2, A3, A4, A5); |
250 | |
316 | |
251 | /* a proxy is a kind of recipe on how to call a specific class method */ |
|
|
252 | struct proxy_base { |
|
|
253 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) = 0; |
|
|
254 | }; |
|
|
255 | template<class O1, class O2> |
|
|
256 | struct proxy : proxy_base { |
|
|
257 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) |
|
|
258 | { |
|
|
259 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5)>(meth))) |
|
|
260 | (a1, a2, a3, a4, a5); |
|
|
261 | } |
|
|
262 | }; |
|
|
263 | |
|
|
264 | proxy_base *prxy; |
|
|
265 | |
|
|
266 | public: |
317 | public: |
267 | template<class O1, class O2> |
318 | template<class O1, class O2> |
268 | callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) |
319 | explicit callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) |
269 | { |
320 | { |
270 | static proxy<O1,O2> p; |
|
|
271 | obj = reinterpret_cast<void *>(object); |
321 | o = reinterpret_cast<klass *>(object); |
272 | meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5)>(method); |
322 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4, A5)>(method); |
273 | prxy = &p; |
|
|
274 | } |
323 | } |
275 | |
324 | |
|
|
325 | // this works because a standards-compliant C++ compiler |
|
|
326 | // basically can't help it: it doesn't have the knowledge |
|
|
327 | // required to miscompile (klass is not defined anywhere |
|
|
328 | // and nothing is known about the constructor arguments) :) |
276 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const |
329 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const |
277 | { |
330 | { |
278 | return prxy->call (obj, meth, a1, a2, a3, a4, a5); |
331 | return (o->*m) (a1, a2, a3, a4, a5); |
279 | } |
332 | } |
280 | |
333 | |
281 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const |
334 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const |
282 | { |
335 | { |
283 | return call (a1, a2, a3, a4, a5); |
336 | return call (a1, a2, a3, a4, a5); |
284 | } |
337 | } |
285 | }; |
338 | }; |
286 | |
339 | |
|
|
340 | template<class R, class A1, class A2, class A3, class A4, class A5> |
|
|
341 | struct callback_funtype_trait5 |
|
|
342 | { |
|
|
343 | static const int arity = 5; |
|
|
344 | typedef R type (A1, A2, A3, A4, A5); |
|
|
345 | typedef R result_type; |
|
|
346 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; |
|
|
347 | }; |
|
|
348 | |
|
|
349 | template<class R, class A1, class A2, class A3, class A4, class A5> |
|
|
350 | struct callback_funtype_trait<R (A1, A2, A3, A4, A5)> : callback_funtype_trait5<R, A1, A2, A3, A4, A5> |
|
|
351 | { |
|
|
352 | }; |
|
|
353 | |
|
|
354 | template<class signature> |
|
|
355 | struct callback_get_impl<5, signature> |
|
|
356 | { |
|
|
357 | typedef callback_funtype_trait<signature> T; |
|
|
358 | typedef callback5<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type, typename T::arg5_type> type; |
|
|
359 | }; |
|
|
360 | |
287 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6> |
361 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6> |
288 | class callback6 { |
362 | class callback6 |
289 | struct object { }; |
363 | { |
|
|
364 | struct klass; // it is vital that this is never defined |
290 | |
365 | |
291 | void *obj; |
366 | typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6); |
|
|
367 | |
|
|
368 | klass *o; |
292 | R (object::*meth)(A1, A2, A3, A4, A5, A6); |
369 | R (klass::*m)(A1, A2, A3, A4, A5, A6); |
293 | |
370 | |
294 | /* a proxy is a kind of recipe on how to call a specific class method */ |
|
|
295 | struct proxy_base { |
|
|
296 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) = 0; |
|
|
297 | }; |
|
|
298 | template<class O1, class O2> |
|
|
299 | struct proxy : proxy_base { |
|
|
300 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) |
|
|
301 | { |
|
|
302 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5, A6)>(meth))) |
|
|
303 | (a1, a2, a3, a4, a5, a6); |
|
|
304 | } |
|
|
305 | }; |
|
|
306 | |
|
|
307 | proxy_base *prxy; |
|
|
308 | |
|
|
309 | public: |
371 | public: |
310 | template<class O1, class O2> |
372 | template<class O1, class O2> |
311 | callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) |
373 | explicit callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) |
312 | { |
374 | { |
313 | static proxy<O1,O2> p; |
|
|
314 | obj = reinterpret_cast<void *>(object); |
375 | o = reinterpret_cast<klass *>(object); |
315 | meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5, A6)>(method); |
376 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4, A5, A6)>(method); |
316 | prxy = &p; |
|
|
317 | } |
377 | } |
318 | |
378 | |
|
|
379 | // this works because a standards-compliant C++ compiler |
|
|
380 | // basically can't help it: it doesn't have the knowledge |
|
|
381 | // required to miscompile (klass is not defined anywhere |
|
|
382 | // and nothing is known about the constructor arguments) :) |
319 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const |
383 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const |
320 | { |
384 | { |
321 | return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6); |
385 | return (o->*m) (a1, a2, a3, a4, a5, a6); |
322 | } |
386 | } |
323 | |
387 | |
324 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const |
388 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const |
325 | { |
389 | { |
326 | return call (a1, a2, a3, a4, a5, a6); |
390 | return call (a1, a2, a3, a4, a5, a6); |
327 | } |
391 | } |
328 | }; |
392 | }; |
329 | |
393 | |
|
|
394 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6> |
|
|
395 | struct callback_funtype_trait6 |
|
|
396 | { |
|
|
397 | static const int arity = 6; |
|
|
398 | typedef R type (A1, A2, A3, A4, A5, A6); |
|
|
399 | typedef R result_type; |
|
|
400 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; |
|
|
401 | }; |
|
|
402 | |
|
|
403 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6> |
|
|
404 | struct callback_funtype_trait<R (A1, A2, A3, A4, A5, A6)> : callback_funtype_trait6<R, A1, A2, A3, A4, A5, A6> |
|
|
405 | { |
|
|
406 | }; |
|
|
407 | |
|
|
408 | template<class signature> |
|
|
409 | struct callback_get_impl<6, signature> |
|
|
410 | { |
|
|
411 | typedef callback_funtype_trait<signature> T; |
|
|
412 | typedef callback6<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type, typename T::arg5_type, typename T::arg6_type> type; |
|
|
413 | }; |
|
|
414 | |
330 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7> |
415 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7> |
331 | class callback7 { |
416 | class callback7 |
332 | struct object { }; |
417 | { |
|
|
418 | struct klass; // it is vital that this is never defined |
333 | |
419 | |
334 | void *obj; |
420 | typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7); |
|
|
421 | |
|
|
422 | klass *o; |
335 | R (object::*meth)(A1, A2, A3, A4, A5, A6, A7); |
423 | R (klass::*m)(A1, A2, A3, A4, A5, A6, A7); |
336 | |
424 | |
337 | /* a proxy is a kind of recipe on how to call a specific class method */ |
|
|
338 | struct proxy_base { |
|
|
339 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) = 0; |
|
|
340 | }; |
|
|
341 | template<class O1, class O2> |
|
|
342 | struct proxy : proxy_base { |
|
|
343 | virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) |
|
|
344 | { |
|
|
345 | ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5, A6, A7)>(meth))) |
|
|
346 | (a1, a2, a3, a4, a5, a6, a7); |
|
|
347 | } |
|
|
348 | }; |
|
|
349 | |
|
|
350 | proxy_base *prxy; |
|
|
351 | |
|
|
352 | public: |
425 | public: |
353 | template<class O1, class O2> |
426 | template<class O1, class O2> |
354 | callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) |
427 | explicit callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) |
355 | { |
428 | { |
356 | static proxy<O1,O2> p; |
|
|
357 | obj = reinterpret_cast<void *>(object); |
429 | o = reinterpret_cast<klass *>(object); |
358 | meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5, A6, A7)>(method); |
430 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4, A5, A6, A7)>(method); |
359 | prxy = &p; |
|
|
360 | } |
431 | } |
361 | |
432 | |
|
|
433 | // this works because a standards-compliant C++ compiler |
|
|
434 | // basically can't help it: it doesn't have the knowledge |
|
|
435 | // required to miscompile (klass is not defined anywhere |
|
|
436 | // and nothing is known about the constructor arguments) :) |
362 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const |
437 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const |
363 | { |
438 | { |
364 | return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6, a7); |
439 | return (o->*m) (a1, a2, a3, a4, a5, a6, a7); |
365 | } |
440 | } |
366 | |
441 | |
367 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const |
442 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const |
368 | { |
443 | { |
369 | return call (a1, a2, a3, a4, a5, a6, a7); |
444 | return call (a1, a2, a3, a4, a5, a6, a7); |
370 | } |
445 | } |
|
|
446 | }; |
|
|
447 | |
|
|
448 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7> |
|
|
449 | struct callback_funtype_trait7 |
|
|
450 | { |
|
|
451 | static const int arity = 7; |
|
|
452 | typedef R type (A1, A2, A3, A4, A5, A6, A7); |
|
|
453 | typedef R result_type; |
|
|
454 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; |
|
|
455 | }; |
|
|
456 | |
|
|
457 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7> |
|
|
458 | struct callback_funtype_trait<R (A1, A2, A3, A4, A5, A6, A7)> : callback_funtype_trait7<R, A1, A2, A3, A4, A5, A6, A7> |
|
|
459 | { |
|
|
460 | }; |
|
|
461 | |
|
|
462 | template<class signature> |
|
|
463 | struct callback_get_impl<7, signature> |
|
|
464 | { |
|
|
465 | typedef callback_funtype_trait<signature> T; |
|
|
466 | typedef callback7<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type, typename T::arg5_type, typename T::arg6_type, typename T::arg7_type> type; |
|
|
467 | }; |
|
|
468 | |
|
|
469 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> |
|
|
470 | class callback8 |
|
|
471 | { |
|
|
472 | struct klass; // it is vital that this is never defined |
|
|
473 | |
|
|
474 | typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7, A8); |
|
|
475 | |
|
|
476 | klass *o; |
|
|
477 | R (klass::*m)(A1, A2, A3, A4, A5, A6, A7, A8); |
|
|
478 | |
|
|
479 | public: |
|
|
480 | template<class O1, class O2> |
|
|
481 | explicit callback8 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7, A8)) |
|
|
482 | { |
|
|
483 | o = reinterpret_cast<klass *>(object); |
|
|
484 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4, A5, A6, A7, A8)>(method); |
|
|
485 | } |
|
|
486 | |
|
|
487 | // this works because a standards-compliant C++ compiler |
|
|
488 | // basically can't help it: it doesn't have the knowledge |
|
|
489 | // required to miscompile (klass is not defined anywhere |
|
|
490 | // and nothing is known about the constructor arguments) :) |
|
|
491 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const |
|
|
492 | { |
|
|
493 | return (o->*m) (a1, a2, a3, a4, a5, a6, a7, a8); |
|
|
494 | } |
|
|
495 | |
|
|
496 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const |
|
|
497 | { |
|
|
498 | return call (a1, a2, a3, a4, a5, a6, a7, a8); |
|
|
499 | } |
|
|
500 | }; |
|
|
501 | |
|
|
502 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> |
|
|
503 | struct callback_funtype_trait8 |
|
|
504 | { |
|
|
505 | static const int arity = 8; |
|
|
506 | typedef R type (A1, A2, A3, A4, A5, A6, A7, A8); |
|
|
507 | typedef R result_type; |
|
|
508 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; typedef A8 arg8_type; |
|
|
509 | }; |
|
|
510 | |
|
|
511 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> |
|
|
512 | struct callback_funtype_trait<R (A1, A2, A3, A4, A5, A6, A7, A8)> : callback_funtype_trait8<R, A1, A2, A3, A4, A5, A6, A7, A8> |
|
|
513 | { |
|
|
514 | }; |
|
|
515 | |
|
|
516 | template<class signature> |
|
|
517 | struct callback_get_impl<8, signature> |
|
|
518 | { |
|
|
519 | typedef callback_funtype_trait<signature> T; |
|
|
520 | typedef callback8<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type, typename T::arg5_type, typename T::arg6_type, typename T::arg7_type, typename T::arg8_type> type; |
|
|
521 | }; |
|
|
522 | |
|
|
523 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> |
|
|
524 | class callback9 |
|
|
525 | { |
|
|
526 | struct klass; // it is vital that this is never defined |
|
|
527 | |
|
|
528 | typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7, A8, A9); |
|
|
529 | |
|
|
530 | klass *o; |
|
|
531 | R (klass::*m)(A1, A2, A3, A4, A5, A6, A7, A8, A9); |
|
|
532 | |
|
|
533 | public: |
|
|
534 | template<class O1, class O2> |
|
|
535 | explicit callback9 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7, A8, A9)) |
|
|
536 | { |
|
|
537 | o = reinterpret_cast<klass *>(object); |
|
|
538 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9)>(method); |
|
|
539 | } |
|
|
540 | |
|
|
541 | // this works because a standards-compliant C++ compiler |
|
|
542 | // basically can't help it: it doesn't have the knowledge |
|
|
543 | // required to miscompile (klass is not defined anywhere |
|
|
544 | // and nothing is known about the constructor arguments) :) |
|
|
545 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) const |
|
|
546 | { |
|
|
547 | return (o->*m) (a1, a2, a3, a4, a5, a6, a7, a8, a9); |
|
|
548 | } |
|
|
549 | |
|
|
550 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) const |
|
|
551 | { |
|
|
552 | return call (a1, a2, a3, a4, a5, a6, a7, a8, a9); |
|
|
553 | } |
|
|
554 | }; |
|
|
555 | |
|
|
556 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> |
|
|
557 | struct callback_funtype_trait9 |
|
|
558 | { |
|
|
559 | static const int arity = 9; |
|
|
560 | typedef R type (A1, A2, A3, A4, A5, A6, A7, A8, A9); |
|
|
561 | typedef R result_type; |
|
|
562 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; typedef A8 arg8_type; typedef A9 arg9_type; |
|
|
563 | }; |
|
|
564 | |
|
|
565 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> |
|
|
566 | struct callback_funtype_trait<R (A1, A2, A3, A4, A5, A6, A7, A8, A9)> : callback_funtype_trait9<R, A1, A2, A3, A4, A5, A6, A7, A8, A9> |
|
|
567 | { |
|
|
568 | }; |
|
|
569 | |
|
|
570 | template<class signature> |
|
|
571 | struct callback_get_impl<9, signature> |
|
|
572 | { |
|
|
573 | typedef callback_funtype_trait<signature> T; |
|
|
574 | typedef callback9<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type, typename T::arg5_type, typename T::arg6_type, typename T::arg7_type, typename T::arg8_type, typename T::arg9_type> type; |
|
|
575 | }; |
|
|
576 | |
|
|
577 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10> |
|
|
578 | class callback10 |
|
|
579 | { |
|
|
580 | struct klass; // it is vital that this is never defined |
|
|
581 | |
|
|
582 | typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); |
|
|
583 | |
|
|
584 | klass *o; |
|
|
585 | R (klass::*m)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); |
|
|
586 | |
|
|
587 | public: |
|
|
588 | template<class O1, class O2> |
|
|
589 | explicit callback10 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)) |
|
|
590 | { |
|
|
591 | o = reinterpret_cast<klass *>(object); |
|
|
592 | m = reinterpret_cast<R (klass::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>(method); |
|
|
593 | } |
|
|
594 | |
|
|
595 | // this works because a standards-compliant C++ compiler |
|
|
596 | // basically can't help it: it doesn't have the knowledge |
|
|
597 | // required to miscompile (klass is not defined anywhere |
|
|
598 | // and nothing is known about the constructor arguments) :) |
|
|
599 | R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) const |
|
|
600 | { |
|
|
601 | return (o->*m) (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); |
|
|
602 | } |
|
|
603 | |
|
|
604 | R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) const |
|
|
605 | { |
|
|
606 | return call (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); |
|
|
607 | } |
|
|
608 | }; |
|
|
609 | |
|
|
610 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10> |
|
|
611 | struct callback_funtype_trait10 |
|
|
612 | { |
|
|
613 | static const int arity = 10; |
|
|
614 | typedef R type (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); |
|
|
615 | typedef R result_type; |
|
|
616 | typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; typedef A8 arg8_type; typedef A9 arg9_type; typedef A10 arg10_type; |
|
|
617 | }; |
|
|
618 | |
|
|
619 | template<class R, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10> |
|
|
620 | struct callback_funtype_trait<R (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : callback_funtype_trait10<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> |
|
|
621 | { |
|
|
622 | }; |
|
|
623 | |
|
|
624 | template<class signature> |
|
|
625 | struct callback_get_impl<10, signature> |
|
|
626 | { |
|
|
627 | typedef callback_funtype_trait<signature> T; |
|
|
628 | typedef callback10<typename T::result_type, typename T::arg1_type, typename T::arg2_type, typename T::arg3_type, typename T::arg4_type, typename T::arg5_type, typename T::arg6_type, typename T::arg7_type, typename T::arg8_type, typename T::arg9_type, typename T::arg10_type> type; |
|
|
629 | }; |
|
|
630 | |
|
|
631 | |
|
|
632 | template<class signature> |
|
|
633 | struct callback : callback_get_impl<callback_funtype_trait<signature>::arity, signature>::type |
|
|
634 | { |
|
|
635 | typedef typename callback_get_impl<callback_funtype_trait<signature>::arity, signature>::type base_type; |
|
|
636 | |
|
|
637 | template<class O, class M> |
|
|
638 | explicit callback (O object, M method) |
|
|
639 | : base_type (object, method) |
|
|
640 | { |
|
|
641 | } |
371 | }; |
642 | }; |
372 | |
643 | |
373 | #endif |
644 | #endif |