1#ifndef AS_GEN_WRAPPER_H
2#define AS_GEN_WRAPPER_H
6#include <angelscript.h>
16template <
typename T>
class Proxy {
19 Proxy(T value) : value(value) {}
20 static T cast(
void * ptr) {
21 return reinterpret_cast<Proxy<T> *
>(&ptr)->value;
34void destroy(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
35 static_cast<T *
>(gen->GetObject())->~T();
39 template <
void (*fp)(
void)>
40 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
46 template <R (*fp)(
void)>
47 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
48 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)());
53 template <
void (T::*fp)(
void)>
54 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
55 ((
static_cast<T *
>(gen->GetObject())->*fp)());
58template <
typename T,
typename R>
60 template <R (T::*fp)(
void)>
61 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
62 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)());
67 template <
void (T::*fp)(
void) const>
68 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
69 ((
static_cast<T *
>(gen->GetObject())->*fp)());
72template <
typename T,
typename R>
74 template <R (T::*fp)(
void) const>
75 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
76 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)());
81 template <
void (*fp)(T)>
82 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
87template <
typename T,
typename R>
90 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
91 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
97 template <
void (*fp)(T)>
98 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
103template <
typename T,
typename R>
105 template <R (*fp)(T)>
106 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
107 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
113 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
114 new (gen->GetObject()) T();
117template <
typename A0>
119 template <
void (*fp)(A0)>
120 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
122 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
125template <
typename R,
typename A0>
127 template <R (*fp)(A0)>
128 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
129 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
130 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
133template <
typename T,
typename A0>
135 template <
void (T::*fp)(A0)>
136 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
137 ((
static_cast<T *
>(gen->GetObject())->*fp)(
138 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
141template <
typename T,
typename R,
typename A0>
143 template <R (T::*fp)(A0)>
144 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
145 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
146 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
149template <
typename T,
typename A0>
151 template <
void (T::*fp)(A0) const>
152 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
153 ((
static_cast<T *
>(gen->GetObject())->*fp)(
154 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
157template <
typename T,
typename R,
typename A0>
159 template <R (T::*fp)(A0) const>
160 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
161 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
162 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
165template <
typename T,
typename A0>
167 template <
void (*fp)(T, A0)>
168 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
171 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
174template <
typename T,
typename R,
typename A0>
176 template <R (*fp)(T, A0)>
177 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
178 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
180 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value));
183template <
typename T,
typename A0>
185 template <
void (*fp)(A0, T)>
186 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
188 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
192template <
typename T,
typename R,
typename A0>
194 template <R (*fp)(A0, T)>
195 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
196 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
197 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
201template <
typename T,
typename A0>
203 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
204 new (gen->GetObject()) T(
205 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value);
208template <
typename A0,
typename A1>
210 template <
void (*fp)(A0, A1)>
211 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
213 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
214 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
217template <
typename R,
typename A0,
typename A1>
219 template <R (*fp)(A0, A1)>
220 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
221 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
222 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
223 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
226template <
typename T,
typename A0,
typename A1>
228 template <
void (T::*fp)(A0, A1)>
229 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
230 ((
static_cast<T *
>(gen->GetObject())->*fp)(
231 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
232 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
235template <
typename T,
typename R,
typename A0,
typename A1>
237 template <R (T::*fp)(A0, A1)>
238 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
239 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
240 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
241 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
244template <
typename T,
typename A0,
typename A1>
246 template <
void (T::*fp)(A0, A1) const>
247 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
248 ((
static_cast<T *
>(gen->GetObject())->*fp)(
249 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
250 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
253template <
typename T,
typename R,
typename A0,
typename A1>
255 template <R (T::*fp)(A0, A1) const>
256 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
257 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
258 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
259 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
262template <
typename T,
typename A0,
typename A1>
264 template <
void (*fp)(T, A0, A1)>
265 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
268 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
269 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
272template <
typename T,
typename R,
typename A0,
typename A1>
274 template <R (*fp)(T, A0, A1)>
275 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
276 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
278 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
279 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value));
282template <
typename T,
typename A0,
typename A1>
284 template <
void (*fp)(A0, A1, T)>
285 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
287 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
288 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
292template <
typename T,
typename R,
typename A0,
typename A1>
294 template <R (*fp)(A0, A1, T)>
295 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
296 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
297 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
298 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
302template <
typename T,
typename A0,
typename A1>
304 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
305 new (gen->GetObject()) T(
306 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
307 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value);
310template <
typename A0,
typename A1,
typename A2>
312 template <
void (*fp)(A0, A1, A2)>
313 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
315 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
316 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
317 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
320template <
typename R,
typename A0,
typename A1,
typename A2>
322 template <R (*fp)(A0, A1, A2)>
323 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
324 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
325 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
326 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
327 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
330template <
typename T,
typename A0,
typename A1,
typename A2>
332 template <
void (T::*fp)(A0, A1, A2)>
333 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
334 ((
static_cast<T *
>(gen->GetObject())->*fp)(
335 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
336 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
337 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
340template <
typename T,
typename R,
typename A0,
typename A1,
typename A2>
342 template <R (T::*fp)(A0, A1, A2)>
343 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
344 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
345 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
346 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
347 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
350template <
typename T,
typename A0,
typename A1,
typename A2>
351struct Wrapper<void (T::*)(A0, A1, A2) const> {
352 template <
void (T::*fp)(A0, A1, A2) const>
353 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
354 ((
static_cast<T *
>(gen->GetObject())->*fp)(
355 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
356 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
357 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
360template <
typename T,
typename R,
typename A0,
typename A1,
typename A2>
362 template <R (T::*fp)(A0, A1, A2) const>
363 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
364 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
365 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
366 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
367 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
370template <
typename T,
typename A0,
typename A1,
typename A2>
372 template <
void (*fp)(T, A0, A1, A2)>
373 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
376 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
377 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
378 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
381template <
typename T,
typename R,
typename A0,
typename A1,
typename A2>
383 template <R (*fp)(T, A0, A1, A2)>
384 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
385 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
387 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
388 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
389 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value));
392template <
typename T,
typename A0,
typename A1,
typename A2>
394 template <
void (*fp)(A0, A1, A2, T)>
395 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
397 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
398 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
399 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
403template <
typename T,
typename R,
typename A0,
typename A1,
typename A2>
405 template <R (*fp)(A0, A1, A2, T)>
406 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
407 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
408 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
409 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
410 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
414template <
typename T,
typename A0,
typename A1,
typename A2>
416 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
417 new (gen->GetObject()) T(
418 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
419 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
420 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value);
423template <
typename A0,
typename A1,
typename A2,
typename A3>
425 template <
void (*fp)(A0, A1, A2, A3)>
426 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
428 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
429 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
430 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
431 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
434template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
436 template <R (*fp)(A0, A1, A2, A3)>
437 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
438 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
439 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
440 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
441 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
442 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
445template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3>
447 template <
void (T::*fp)(A0, A1, A2, A3)>
448 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
449 ((
static_cast<T *
>(gen->GetObject())->*fp)(
450 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
451 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
452 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
453 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
456template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
458 template <R (T::*fp)(A0, A1, A2, A3)>
459 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
460 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
461 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
462 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
463 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
464 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
467template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3>
468struct Wrapper<void (T::*)(A0, A1, A2, A3) const> {
469 template <
void (T::*fp)(A0, A1, A2, A3) const>
470 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
471 ((
static_cast<T *
>(gen->GetObject())->*fp)(
472 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
473 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
474 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
475 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
478template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
479struct Wrapper<R (T::*)(A0, A1, A2, A3) const> {
480 template <R (T::*fp)(A0, A1, A2, A3) const>
481 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
482 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
483 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
484 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
485 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
486 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
489template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3>
491 template <
void (*fp)(T, A0, A1, A2, A3)>
492 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
495 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
496 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
497 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
498 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
501template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
503 template <R (*fp)(T, A0, A1, A2, A3)>
504 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
505 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
507 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
508 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
509 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
510 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value));
513template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3>
515 template <
void (*fp)(A0, A1, A2, A3, T)>
516 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
518 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
519 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
520 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
521 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
525template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
527 template <R (*fp)(A0, A1, A2, A3, T)>
528 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
529 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
530 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
531 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
532 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
533 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
537template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3>
539 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
540 new (gen->GetObject()) T(
541 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
542 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
543 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
544 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value);
547template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
549 template <
void (*fp)(A0, A1, A2, A3, A4)>
550 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
552 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
553 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
554 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
555 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
556 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
559template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
561 template <R (*fp)(A0, A1, A2, A3, A4)>
562 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
563 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
564 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
565 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
566 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
567 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
568 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
571template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
572struct Wrapper<void (T::*)(A0, A1, A2, A3, A4)> {
573 template <
void (T::*fp)(A0, A1, A2, A3, A4)>
574 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
575 ((
static_cast<T *
>(gen->GetObject())->*fp)(
576 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
577 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
578 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
579 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
580 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
583template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
585 template <R (T::*fp)(A0, A1, A2, A3, A4)>
586 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
587 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
588 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
589 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
590 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
591 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
592 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
595template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
596struct Wrapper<void (T::*)(A0, A1, A2, A3, A4) const> {
597 template <
void (T::*fp)(A0, A1, A2, A3, A4) const>
598 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
599 ((
static_cast<T *
>(gen->GetObject())->*fp)(
600 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
601 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
602 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
603 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
604 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
607template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
608struct Wrapper<R (T::*)(A0, A1, A2, A3, A4) const> {
609 template <R (T::*fp)(A0, A1, A2, A3, A4) const>
610 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
611 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
612 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
613 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
614 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
615 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
616 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
619template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
621 template <
void (*fp)(T, A0, A1, A2, A3, A4)>
622 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
625 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
626 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
627 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
628 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
629 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
632template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
634 template <R (*fp)(T, A0, A1, A2, A3, A4)>
635 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
636 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
638 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
639 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
640 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
641 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
642 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value));
645template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
646struct ObjLast<void (*)(A0, A1, A2, A3, A4, T)> {
647 template <
void (*fp)(A0, A1, A2, A3, A4, T)>
648 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
650 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
651 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
652 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
653 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
654 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
658template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
660 template <R (*fp)(A0, A1, A2, A3, A4, T)>
661 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
662 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
663 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
664 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
665 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
666 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
667 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
671template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
673 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
674 new (gen->GetObject()) T(
675 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
676 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
677 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
678 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
679 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value);
682template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
683struct Wrapper<void (*)(A0, A1, A2, A3, A4, A5)> {
684 template <
void (*fp)(A0, A1, A2, A3, A4, A5)>
685 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
687 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
688 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
689 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
690 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
691 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
692 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
695template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
696struct Wrapper<R (*)(A0, A1, A2, A3, A4, A5)> {
697 template <R (*fp)(A0, A1, A2, A3, A4, A5)>
698 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
699 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
700 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
701 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
702 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
703 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
704 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
705 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
708template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
709struct Wrapper<void (T::*)(A0, A1, A2, A3, A4, A5)> {
710 template <
void (T::*fp)(A0, A1, A2, A3, A4, A5)>
711 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
712 ((
static_cast<T *
>(gen->GetObject())->*fp)(
713 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
714 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
715 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
716 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
717 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
718 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
721template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
722struct Wrapper<R (T::*)(A0, A1, A2, A3, A4, A5)> {
723 template <R (T::*fp)(A0, A1, A2, A3, A4, A5)>
724 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
725 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
726 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
727 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
728 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
729 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
730 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
731 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
734template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
735struct Wrapper<void (T::*)(A0, A1, A2, A3, A4, A5) const> {
736 template <
void (T::*fp)(A0, A1, A2, A3, A4, A5) const>
737 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
738 ((
static_cast<T *
>(gen->GetObject())->*fp)(
739 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
740 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
741 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
742 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
743 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
744 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
747template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
748struct Wrapper<R (T::*)(A0, A1, A2, A3, A4, A5) const> {
749 template <R (T::*fp)(A0, A1, A2, A3, A4, A5) const>
750 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
751 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
752 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
753 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
754 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
755 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
756 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
757 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
760template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
761struct ObjFirst<void (*)(T, A0, A1, A2, A3, A4, A5)> {
762 template <
void (*fp)(T, A0, A1, A2, A3, A4, A5)>
763 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
766 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
767 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
768 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
769 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
770 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
771 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
774template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
776 template <R (*fp)(T, A0, A1, A2, A3, A4, A5)>
777 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
778 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
780 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
781 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
782 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
783 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
784 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
785 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value));
788template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
789struct ObjLast<void (*)(A0, A1, A2, A3, A4, A5, T)> {
790 template <
void (*fp)(A0, A1, A2, A3, A4, A5, T)>
791 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
793 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
794 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
795 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
796 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
797 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
798 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
802template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
803struct ObjLast<R (*)(A0, A1, A2, A3, A4, A5, T)> {
804 template <R (*fp)(A0, A1, A2, A3, A4, A5, T)>
805 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
806 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
807 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
808 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
809 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
810 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
811 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
812 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
816template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
818 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
819 new (gen->GetObject()) T(
820 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
821 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
822 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
823 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
824 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
825 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value);
828template <
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
829struct Wrapper<void (*)(A0, A1, A2, A3, A4, A5, A6)> {
830 template <
void (*fp)(A0, A1, A2, A3, A4, A5, A6)>
831 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
833 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
834 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
835 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
836 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
837 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
838 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
839 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
842template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
843struct Wrapper<R (*)(A0, A1, A2, A3, A4, A5, A6)> {
844 template <R (*fp)(A0, A1, A2, A3, A4, A5, A6)>
845 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
846 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
847 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
848 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
849 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
850 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
851 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
852 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
853 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
856template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
857struct Wrapper<void (T::*)(A0, A1, A2, A3, A4, A5, A6)> {
858 template <
void (T::*fp)(A0, A1, A2, A3, A4, A5, A6)>
859 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
860 ((
static_cast<T *
>(gen->GetObject())->*fp)(
861 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
862 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
863 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
864 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
865 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
866 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
867 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
870template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
871struct Wrapper<R (T::*)(A0, A1, A2, A3, A4, A5, A6)> {
872 template <R (T::*fp)(A0, A1, A2, A3, A4, A5, A6)>
873 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
874 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
875 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
876 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
877 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
878 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
879 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
880 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
881 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
884template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
885struct Wrapper<void (T::*)(A0, A1, A2, A3, A4, A5, A6) const> {
886 template <
void (T::*fp)(A0, A1, A2, A3, A4, A5, A6) const>
887 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
888 ((
static_cast<T *
>(gen->GetObject())->*fp)(
889 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
890 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
891 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
892 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
893 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
894 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
895 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
898template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
899struct Wrapper<R (T::*)(A0, A1, A2, A3, A4, A5, A6) const> {
900 template <R (T::*fp)(A0, A1, A2, A3, A4, A5, A6) const>
901 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
902 new (gen->GetAddressOfReturnLocation())
Proxy<R>((
static_cast<T *
>(gen->GetObject())->*fp)(
903 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
904 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
905 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
906 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
907 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
908 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
909 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
912template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
913struct ObjFirst<void (*)(T, A0, A1, A2, A3, A4, A5, A6)> {
914 template <
void (*fp)(T, A0, A1, A2, A3, A4, A5, A6)>
915 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
918 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
919 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
920 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
921 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
922 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
923 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
924 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
927template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
928struct ObjFirst<R (*)(T, A0, A1, A2, A3, A4, A5, A6)> {
929 template <R (*fp)(T, A0, A1, A2, A3, A4, A5, A6)>
930 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
931 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
933 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
934 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
935 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
936 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
937 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
938 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
939 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value));
942template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
943struct ObjLast<void (*)(A0, A1, A2, A3, A4, A5, A6, T)> {
944 template <
void (*fp)(A0, A1, A2, A3, A4, A5, A6, T)>
945 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
947 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
948 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
949 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
950 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
951 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
952 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
953 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value,
957template <
typename T,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
958struct ObjLast<R (*)(A0, A1, A2, A3, A4, A5, A6, T)> {
959 template <R (*fp)(A0, A1, A2, A3, A4, A5, A6, T)>
960 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
961 new (gen->GetAddressOfReturnLocation())
Proxy<R>((fp)(
962 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
963 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
964 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
965 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
966 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
967 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
968 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value,
972template <
typename T,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6>
974 static void f(AS_NAMESPACE_QUALIFIER asIScriptGeneric * gen) {
975 new (gen->GetObject()) T(
976 static_cast<Proxy <A0> *
>(gen->GetAddressOfArg(0))->value,
977 static_cast<Proxy <A1> *
>(gen->GetAddressOfArg(1))->value,
978 static_cast<Proxy <A2> *
>(gen->GetAddressOfArg(2))->value,
979 static_cast<Proxy <A3> *
>(gen->GetAddressOfArg(3))->value,
980 static_cast<Proxy <A4> *
>(gen->GetAddressOfArg(4))->value,
981 static_cast<Proxy <A5> *
>(gen->GetAddressOfArg(5))->value,
982 static_cast<Proxy <A6> *
>(gen->GetAddressOfArg(6))->value);
987 template <T fn_ptr> AS_NAMESPACE_QUALIFIER asSFuncPtr f(
void) {
return asFUNCTION(&
Wrapper<T>::template f<fn_ptr>); }
988 template <T fn_ptr> AS_NAMESPACE_QUALIFIER asSFuncPtr of(
void) {
return asFUNCTION(&
ObjFirst<T>::template f<fn_ptr>); }
989 template <T fn_ptr> AS_NAMESPACE_QUALIFIER asSFuncPtr ol(
void) {
return asFUNCTION(&
ObjLast<T>::template f<fn_ptr>); }
998#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
1001 #define TMPL template
1006#define WRAP_FN(name) (::gw::id(name).TMPL f< name >())
1007#define WRAP_MFN(ClassType, name) (::gw::id(&ClassType::name).TMPL f< &ClassType::name >())
1008#define WRAP_OBJ_FIRST(name) (::gw::id(name).TMPL of< name >())
1009#define WRAP_OBJ_LAST(name) (::gw::id(name).TMPL ol< name >())
1011#define WRAP_FN_PR(name, Parameters, ReturnType) asFUNCTION((::gw::Wrapper<ReturnType (*)Parameters>::TMPL f< name >))
1012#define WRAP_MFN_PR(ClassType, name, Parameters, ReturnType) asFUNCTION((::gw::Wrapper<ReturnType (ClassType::*)Parameters>::TMPL f< &ClassType::name >))
1013#define WRAP_OBJ_FIRST_PR(name, Parameters, ReturnType) asFUNCTION((::gw::ObjFirst<ReturnType (*)Parameters>::TMPL f< name >))
1014#define WRAP_OBJ_LAST_PR(name, Parameters, ReturnType) asFUNCTION((::gw::ObjLast<ReturnType (*)Parameters>::TMPL f< name >))
1016#define WRAP_CON(ClassType, Parameters) asFUNCTION((::gw::Constructor<ClassType Parameters>::f))
1017#define WRAP_DES(ClassType) asFUNCTION((::gw::destroy<ClassType>))
Definition: aswrappedcall.hpp:16
Definition: aswrappedcall.hpp:31
Definition: aswrappedcall.hpp:986
Definition: aswrappedcall.hpp:29
Definition: aswrappedcall.hpp:30
Definition: aswrappedcall.hpp:28