Library of Assembled Shared Sources
pyobject_call.inl
Go to the documentation of this file.
1/*
2 * *** ATTENTION! DO NOT MODIFY THIS FILE DIRECTLY! ***
3 *
4 * It has automatically been generated from pyobject_call.tmpl.inl
5 * by param_expander.py on Mon Oct 6 22:51:43 2025.
6 */
7
8/** @file
9 * @author Bram de Greve (bram@cocamware.com)
10 * @author Tom De Muer (tom@cocamware.com)
11 *
12 * *** BEGIN LICENSE INFORMATION ***
13 *
14 * The contents of this file are subject to the Common Public Attribution License
15 * Version 1.0 (the "License"); you may not use this file except in compliance with
16 * the License. You may obtain a copy of the License at
17 * http://lass.sourceforge.net/cpal-license. The License is based on the
18 * Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover
19 * use of software over a computer network and provide for limited attribution for
20 * the Original Developer. In addition, Exhibit A has been modified to be consistent
21 * with Exhibit B.
22 *
23 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
24 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
25 * language governing rights and limitations under the License.
26 *
27 * The Original Code is LASS - Library of Assembled Shared Sources.
28 *
29 * The Initial Developer of the Original Code is Bram de Greve and Tom De Muer.
30 * The Original Developer is the Initial Developer.
31 *
32 * All portions of the code written by the Initial Developer are:
33 * Copyright (C) 2004-2025 the Initial Developer.
34 * All Rights Reserved.
35 *
36 * Contributor(s):
37 *
38 * Alternatively, the contents of this file may be used under the terms of the
39 * GNU General Public License Version 2 or later (the GPL), in which case the
40 * provisions of GPL are applicable instead of those above. If you wish to allow use
41 * of your version of this file only under the terms of the GPL and not to allow
42 * others to use your version of this file under the CPAL, indicate your decision by
43 * deleting the provisions above and replace them with the notice and other
44 * provisions required by the GPL License. If you do not delete the provisions above,
45 * a recipient may use your version of this file under either the CPAL or the GPL.
46 *
47 * *** END LICENSE INFORMATION ***
48 */
49
50#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_CALL_INL
51#define LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_CALL_INL
52
53#include "python_common.h"
54#include "pyobject_plus.h"
55#include "py_tuple.h"
56#include "pyshadow_object.h"
57#include "argument_traits.h"
58#include "exception.h"
59#include "gil.h"
60#include "../util/call_traits.h"
61#include "../meta/if.h"
62#include "../meta/select.h"
63#include "../meta/wrap.h"
64#include "../meta/type_list.h"
65#include "../meta/type_tuple.h"
66#include "../meta/is_const.h"
67
68
69#if LASS_COMPILER_TYPE == LASS_COMPILER_TYPE_MSVC
70# pragma warning(push)
71# pragma warning(disable: 4267) // conversion from 'size_t' to 'unsigned int', possible loss of data
72#endif
73
74namespace lass
75{
76namespace python
77{
78namespace impl
79{
80
81// --- exception handlers -------------------------------------------------------------------------
82
83
84
85
86
87// --- actual callers ------------------------------------------------------------------------------
88
89/** calls the actual function with provided parameters, and returns result as a PyObject pointer.
90 */
91template <typename R>
92struct Caller
93{
94 // free function
95
96 template <typename Function>
97 static PyObject* callFunction( Function function )
98 {
99 try
100 {
101 UnblockThreads LASS_UNUSED(unlock);
102 return pyBuildSimpleObject( function() );
103 }
104 LASS_PYTHON_CATCH_AND_RETURN
105 };
106
107 template <typename Function, typename... P>
108 static PyObject* callFunction(Function function, P&&... p)
109 {
110 try
111 {
112 UnblockThreads LASS_UNUSED(unlock);
113 return pyBuildSimpleObject(function(std::forward<P>(p)...));
114 }
115 LASS_PYTHON_CATCH_AND_RETURN
116 }
117
118 // method
119
120 template <typename CppClassRef, typename Method>
121 static PyObject* callMethod( CppClassRef object, Method method )
122 {
123 try
124 {
125 UnblockThreads LASS_UNUSED(unlock);
126 return pyBuildSimpleObject( (object.*method)() );
127 }
128 LASS_PYTHON_CATCH_AND_RETURN
129 };
130
131 template <typename CppClassRef, typename Method, typename... P>
132 static PyObject* callMethod(CppClassRef object, Method method, P&&... p)
133 {
134 try
135 {
136 UnblockThreads LASS_UNUSED(unlock);
137 return pyBuildSimpleObject((object.*method)(std::forward<P>(p)...));
138 }
139 LASS_PYTHON_CATCH_AND_RETURN
140 }
141};
142
143/** specialisation for functions without return value, calls function and returns Py_None.
144 */
145template <>
146struct Caller<void>
147{
148 // free functions
149
150 template <typename Function>
151 static PyObject* callFunction( Function function )
152 {
153 try
154 {
155 UnblockThreads LASS_UNUSED(unlock);
156 function();
157 }
158 LASS_PYTHON_CATCH_AND_RETURN
159 Py_RETURN_NONE;
160 };
161
162 template <typename Function, typename... P>
163 static PyObject* callFunction(Function function, P&&... p)
164 {
165 try
166 {
167 UnblockThreads LASS_UNUSED(unlock);
168 function(std::forward<P>(p)...);
169 }
170 LASS_PYTHON_CATCH_AND_RETURN
171 Py_RETURN_NONE;
172 }
173
174 // methods
175
176 template <typename CppClassRef, typename Method>
177 static PyObject* callMethod( CppClassRef object, Method method )
178 {
179 try
180 {
181 UnblockThreads LASS_UNUSED(unlock);
182 (object.*method)();
183 }
184 LASS_PYTHON_CATCH_AND_RETURN
185 Py_RETURN_NONE;
186 };
187
188 template <typename CppClassRef, typename Method, typename... P>
189 static PyObject* callMethod( CppClassRef object, Method method, P&&... p)
190 {
191 try
192 {
193 UnblockThreads LASS_UNUSED(unlock);
194 (object.*method)(std::forward<P>(p)...);
195 }
196 LASS_PYTHON_CATCH_AND_RETURN
197 Py_RETURN_NONE;
198 }
199};
200
201
202
203// --- free functions ------------------------------------------------------------------------------
204
205/** calls C++ function without arguments
206 */
207template <typename R>
208PyObject* callFunction( PyObject* args, R (*function)() )
209{
210 typedef R(*TFunction)();
211 if( decodeTuple(args) != 0 )
212 {
213 return 0;
214 }
216}
217
218/** calls C++ function with 1 arguments, translated from python arguments
219 */
220template <typename R, typename P1>
221PyObject* callFunction( PyObject* args, R (*function)(P1) )
222{
223 typedef R (*TFunction)(P1);
224 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
225
226 if( decodeTuple<S1>( args, p1 ) != 0 )
227 {
228 return 0;
229 }
231 function, TArg1::arg(p1) );
232}
233
234/** calls C++ function with 2 arguments, translated from python arguments
235 */
236template <typename R, typename P1, typename P2>
237PyObject* callFunction( PyObject* args, R (*function)(P1, P2) )
238{
239 typedef R (*TFunction)(P1, P2);
240 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
241 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
242
243 if( decodeTuple<S1, S2>( args, p1, p2 ) != 0 )
244 {
245 return 0;
246 }
248 function, TArg1::arg(p1), TArg2::arg(p2) );
249}
250
251/** calls C++ function with 3 arguments, translated from python arguments
252 */
253template <typename R, typename P1, typename P2, typename P3>
254PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3) )
255{
256 typedef R (*TFunction)(P1, P2, P3);
257 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
258 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
259 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
260
261 if( decodeTuple<S1, S2, S3>( args, p1, p2, p3 ) != 0 )
262 {
263 return 0;
264 }
266 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) );
267}
268
269/** calls C++ function with 4 arguments, translated from python arguments
270 */
271template <typename R, typename P1, typename P2, typename P3, typename P4>
272PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4) )
273{
274 typedef R (*TFunction)(P1, P2, P3, P4);
275 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
276 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
277 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
278 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
279
280 if( decodeTuple<S1, S2, S3, S4>( args, p1, p2, p3, p4 ) != 0 )
281 {
282 return 0;
283 }
285 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) );
286}
287
288/** calls C++ function with 5 arguments, translated from python arguments
289 */
290template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
291PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5) )
292{
293 typedef R (*TFunction)(P1, P2, P3, P4, P5);
294 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
295 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
296 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
297 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
298 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
299
300 if( decodeTuple<S1, S2, S3, S4, S5>( args, p1, p2, p3, p4, p5 ) != 0 )
301 {
302 return 0;
303 }
305 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) );
306}
307
308/** calls C++ function with 6 arguments, translated from python arguments
309 */
310template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
311PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6) )
312{
313 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6);
314 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
315 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
316 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
317 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
318 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
319 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
320
321 if( decodeTuple<S1, S2, S3, S4, S5, S6>( args, p1, p2, p3, p4, p5, p6 ) != 0 )
322 {
323 return 0;
324 }
326 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) );
327}
328
329/** calls C++ function with 7 arguments, translated from python arguments
330 */
331template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
332PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7) )
333{
334 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7);
335 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
336 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
337 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
338 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
339 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
340 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
341 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
342
343 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7>( args, p1, p2, p3, p4, p5, p6, p7 ) != 0 )
344 {
345 return 0;
346 }
348 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) );
349}
350
351/** calls C++ function with 8 arguments, translated from python arguments
352 */
353template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
354PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8) )
355{
356 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8);
357 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
358 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
359 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
360 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
361 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
362 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
363 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
364 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
365
366 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>( args, p1, p2, p3, p4, p5, p6, p7, p8 ) != 0 )
367 {
368 return 0;
369 }
371 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) );
372}
373
374/** calls C++ function with 9 arguments, translated from python arguments
375 */
376template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
377PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9) )
378{
379 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9);
380 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
381 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
382 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
383 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
384 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
385 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
386 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
387 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
388 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
389
390 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9 ) != 0 )
391 {
392 return 0;
393 }
395 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) );
396}
397
398/** calls C++ function with 10 arguments, translated from python arguments
399 */
400template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
401PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) )
402{
403 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10);
404 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
405 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
406 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
407 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
408 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
409 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
410 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
411 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
412 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
413 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
414
415 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ) != 0 )
416 {
417 return 0;
418 }
420 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) );
421}
422
423/** calls C++ function with 11 arguments, translated from python arguments
424 */
425template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
426PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) )
427{
428 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11);
429 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
430 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
431 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
432 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
433 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
434 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
435 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
436 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
437 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
438 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
439 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
440
441 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 ) != 0 )
442 {
443 return 0;
444 }
446 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) );
447}
448
449/** calls C++ function with 12 arguments, translated from python arguments
450 */
451template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
452PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) )
453{
454 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12);
455 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
456 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
457 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
458 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
459 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
460 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
461 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
462 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
463 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
464 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
465 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
466 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
467
468 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12 ) != 0 )
469 {
470 return 0;
471 }
473 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) );
474}
475
476/** calls C++ function with 13 arguments, translated from python arguments
477 */
478template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
479PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) )
480{
481 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13);
482 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
483 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
484 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
485 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
486 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
487 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
488 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
489 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
490 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
491 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
492 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
493 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
494 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
495
496 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13 ) != 0 )
497 {
498 return 0;
499 }
501 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) );
502}
503
504/** calls C++ function with 14 arguments, translated from python arguments
505 */
506template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
507PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) )
508{
509 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14);
510 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
511 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
512 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
513 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
514 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
515 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
516 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
517 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
518 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
519 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
520 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
521 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
522 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
523 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
524
525 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14 ) != 0 )
526 {
527 return 0;
528 }
530 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) );
531}
532
533/** calls C++ function with 15 arguments, translated from python arguments
534 */
535template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
536PyObject* callFunction( PyObject* args, R (*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) )
537{
538 typedef R (*TFunction)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15);
539 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
540 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
541 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
542 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
543 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
544 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
545 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
546 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
547 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
548 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
549 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
550 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
551 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
552 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
553 typedef ArgumentTraits<P15> TArg15; typedef typename TArg15::TStorage S15; S15 p15 = S15();
554
555 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 ) != 0 )
556 {
557 return 0;
558 }
560 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) );
561}
562
563
564/** calls std::function without arguments
565 */
566template <typename R>
567PyObject* callFunction( PyObject* args, std::function<R()> function )
568{
569 typedef std::function<R()> TFunction;
570 if( decodeTuple(args) != 0 )
571 {
572 return 0;
573 }
575}
576
577/** calls std::function with 1 arguments, translated from python arguments
578 */
579template <typename R, typename P1>
580PyObject* callFunction( PyObject* args, std::function<R(P1)> function )
581{
582 typedef std::function<R(P1)> TFunction;
583 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
584
585 if( decodeTuple<S1>( args, p1 ) != 0 )
586 {
587 return 0;
588 }
590 function, TArg1::arg(p1) );
591}
592
593/** calls std::function with 2 arguments, translated from python arguments
594 */
595template <typename R, typename P1, typename P2>
596PyObject* callFunction( PyObject* args, std::function<R(P1, P2)> function )
597{
598 typedef std::function<R(P1, P2)> TFunction;
599 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
600 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
601
602 if( decodeTuple<S1, S2>( args, p1, p2 ) != 0 )
603 {
604 return 0;
605 }
607 function, TArg1::arg(p1), TArg2::arg(p2) );
608}
609
610/** calls std::function with 3 arguments, translated from python arguments
611 */
612template <typename R, typename P1, typename P2, typename P3>
613PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3)> function )
614{
615 typedef std::function<R(P1, P2, P3)> TFunction;
616 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
617 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
618 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
619
620 if( decodeTuple<S1, S2, S3>( args, p1, p2, p3 ) != 0 )
621 {
622 return 0;
623 }
625 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) );
626}
627
628/** calls std::function with 4 arguments, translated from python arguments
629 */
630template <typename R, typename P1, typename P2, typename P3, typename P4>
631PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4)> function )
632{
633 typedef std::function<R(P1, P2, P3, P4)> TFunction;
634 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
635 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
636 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
637 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
638
639 if( decodeTuple<S1, S2, S3, S4>( args, p1, p2, p3, p4 ) != 0 )
640 {
641 return 0;
642 }
644 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) );
645}
646
647/** calls std::function with 5 arguments, translated from python arguments
648 */
649template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
650PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5)> function )
651{
652 typedef std::function<R(P1, P2, P3, P4, P5)> TFunction;
653 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
654 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
655 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
656 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
657 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
658
659 if( decodeTuple<S1, S2, S3, S4, S5>( args, p1, p2, p3, p4, p5 ) != 0 )
660 {
661 return 0;
662 }
664 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) );
665}
666
667/** calls std::function with 6 arguments, translated from python arguments
668 */
669template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
670PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6)> function )
671{
672 typedef std::function<R(P1, P2, P3, P4, P5, P6)> TFunction;
673 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
674 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
675 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
676 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
677 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
678 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
679
680 if( decodeTuple<S1, S2, S3, S4, S5, S6>( args, p1, p2, p3, p4, p5, p6 ) != 0 )
681 {
682 return 0;
683 }
685 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) );
686}
687
688/** calls std::function with 7 arguments, translated from python arguments
689 */
690template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
691PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7)> function )
692{
693 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7)> TFunction;
694 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
695 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
696 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
697 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
698 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
699 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
700 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
701
702 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7>( args, p1, p2, p3, p4, p5, p6, p7 ) != 0 )
703 {
704 return 0;
705 }
707 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) );
708}
709
710/** calls std::function with 8 arguments, translated from python arguments
711 */
712template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
713PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8)> function )
714{
715 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8)> TFunction;
716 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
717 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
718 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
719 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
720 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
721 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
722 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
723 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
724
725 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>( args, p1, p2, p3, p4, p5, p6, p7, p8 ) != 0 )
726 {
727 return 0;
728 }
730 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) );
731}
732
733/** calls std::function with 9 arguments, translated from python arguments
734 */
735template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
736PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9)> function )
737{
738 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9)> TFunction;
739 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
740 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
741 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
742 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
743 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
744 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
745 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
746 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
747 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
748
749 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9 ) != 0 )
750 {
751 return 0;
752 }
754 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) );
755}
756
757/** calls std::function with 10 arguments, translated from python arguments
758 */
759template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
760PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)> function )
761{
762 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)> TFunction;
763 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
764 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
765 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
766 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
767 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
768 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
769 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
770 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
771 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
772 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
773
774 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ) != 0 )
775 {
776 return 0;
777 }
779 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) );
780}
781
782/** calls std::function with 11 arguments, translated from python arguments
783 */
784template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
785PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)> function )
786{
787 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)> TFunction;
788 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
789 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
790 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
791 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
792 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
793 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
794 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
795 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
796 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
797 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
798 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
799
800 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 ) != 0 )
801 {
802 return 0;
803 }
805 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) );
806}
807
808/** calls std::function with 12 arguments, translated from python arguments
809 */
810template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
811PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)> function )
812{
813 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)> TFunction;
814 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
815 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
816 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
817 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
818 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
819 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
820 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
821 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
822 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
823 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
824 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
825 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
826
827 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12 ) != 0 )
828 {
829 return 0;
830 }
832 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) );
833}
834
835/** calls std::function with 13 arguments, translated from python arguments
836 */
837template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
838PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)> function )
839{
840 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)> TFunction;
841 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
842 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
843 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
844 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
845 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
846 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
847 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
848 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
849 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
850 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
851 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
852 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
853 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
854
855 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13 ) != 0 )
856 {
857 return 0;
858 }
860 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) );
861}
862
863/** calls std::function with 14 arguments, translated from python arguments
864 */
865template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
866PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)> function )
867{
868 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)> TFunction;
869 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
870 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
871 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
872 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
873 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
874 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
875 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
876 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
877 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
878 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
879 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
880 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
881 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
882 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
883
884 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14 ) != 0 )
885 {
886 return 0;
887 }
889 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) );
890}
891
892/** calls std::function with 15 arguments, translated from python arguments
893 */
894template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
895PyObject* callFunction( PyObject* args, std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)> function )
896{
897 typedef std::function<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)> TFunction;
898 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
899 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
900 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
901 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
902 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
903 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
904 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
905 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
906 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
907 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
908 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
909 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
910 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
911 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
912 typedef ArgumentTraits<P15> TArg15; typedef typename TArg15::TStorage S15; S15 p15 = S15();
913
914 if( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 ) != 0 )
915 {
916 return 0;
917 }
919 function, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) );
920}
921
922
923
924
925// --- methods -------------------------------------------------------------------------------------
926
927template <typename ShadowTraits>
928struct CallMethod
929{
930 // non const methods
931
932 /** call non const method without arguments
933 */
934 template <typename C, typename R>
935 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)() )
936 {
937 typedef typename ShadowTraits::TCppClass TCppClass;
938 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
939 typedef R (C::*TMethod)();
940 TCppClassPtr self;
941 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple(args) != 0 )
942 {
943 return 0;
944 }
945 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
946 *self, method);
947 return establishMagicalBackLinks(result, object);
948 }
949
950 /** call non const method with 1 arguments, translated from python arguments
951 */
952 template <typename C, typename R, typename P1>
953 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1) )
954 {
955 typedef typename ShadowTraits::TCppClass TCppClass;
956 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
957 typedef R (C::*TMethod)(P1);
958 TCppClassPtr self;
959 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
960
961 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1>(args, p1) != 0 )
962 {
963 return 0;
964 }
965 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
966 *self, method, TArg1::arg(p1) );
967 return establishMagicalBackLinks(result, object);
968 }
969
970 /** call non const method with 2 arguments, translated from python arguments
971 */
972 template <typename C, typename R, typename P1, typename P2>
973 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2) )
974 {
975 typedef typename ShadowTraits::TCppClass TCppClass;
976 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
977 typedef R (C::*TMethod)(P1, P2);
978 TCppClassPtr self;
979 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
980 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
981
982 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2>(args, p1, p2) != 0 )
983 {
984 return 0;
985 }
986 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
987 *self, method, TArg1::arg(p1), TArg2::arg(p2) );
988 return establishMagicalBackLinks(result, object);
989 }
990
991 /** call non const method with 3 arguments, translated from python arguments
992 */
993 template <typename C, typename R, typename P1, typename P2, typename P3>
994 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3) )
995 {
996 typedef typename ShadowTraits::TCppClass TCppClass;
997 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
998 typedef R (C::*TMethod)(P1, P2, P3);
999 TCppClassPtr self;
1000 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1001 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1002 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1003
1004 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3>(args, p1, p2, p3) != 0 )
1005 {
1006 return 0;
1007 }
1008 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1009 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) );
1010 return establishMagicalBackLinks(result, object);
1011 }
1012
1013 /** call non const method with 4 arguments, translated from python arguments
1014 */
1015 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4>
1016 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4) )
1017 {
1018 typedef typename ShadowTraits::TCppClass TCppClass;
1019 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1020 typedef R (C::*TMethod)(P1, P2, P3, P4);
1021 TCppClassPtr self;
1022 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1023 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1024 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1025 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1026
1027 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4>(args, p1, p2, p3, p4) != 0 )
1028 {
1029 return 0;
1030 }
1031 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1032 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) );
1033 return establishMagicalBackLinks(result, object);
1034 }
1035
1036 /** call non const method with 5 arguments, translated from python arguments
1037 */
1038 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
1039 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5) )
1040 {
1041 typedef typename ShadowTraits::TCppClass TCppClass;
1042 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1043 typedef R (C::*TMethod)(P1, P2, P3, P4, P5);
1044 TCppClassPtr self;
1045 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1046 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1047 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1048 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1049 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1050
1051 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5>(args, p1, p2, p3, p4, p5) != 0 )
1052 {
1053 return 0;
1054 }
1055 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1056 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) );
1057 return establishMagicalBackLinks(result, object);
1058 }
1059
1060 /** call non const method with 6 arguments, translated from python arguments
1061 */
1062 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
1063 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6) )
1064 {
1065 typedef typename ShadowTraits::TCppClass TCppClass;
1066 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1067 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6);
1068 TCppClassPtr self;
1069 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1070 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1071 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1072 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1073 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1074 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1075
1076 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6>(args, p1, p2, p3, p4, p5, p6) != 0 )
1077 {
1078 return 0;
1079 }
1080 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1081 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) );
1082 return establishMagicalBackLinks(result, object);
1083 }
1084
1085 /** call non const method with 7 arguments, translated from python arguments
1086 */
1087 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
1088 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7) )
1089 {
1090 typedef typename ShadowTraits::TCppClass TCppClass;
1091 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1092 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7);
1093 TCppClassPtr self;
1094 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1095 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1096 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1097 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1098 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1099 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1100 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1101
1102 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7>(args, p1, p2, p3, p4, p5, p6, p7) != 0 )
1103 {
1104 return 0;
1105 }
1106 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1107 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) );
1108 return establishMagicalBackLinks(result, object);
1109 }
1110
1111 /** call non const method with 8 arguments, translated from python arguments
1112 */
1113 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
1114 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8) )
1115 {
1116 typedef typename ShadowTraits::TCppClass TCppClass;
1117 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1118 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8);
1119 TCppClassPtr self;
1120 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1121 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1122 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1123 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1124 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1125 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1126 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1127 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1128
1129 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>(args, p1, p2, p3, p4, p5, p6, p7, p8) != 0 )
1130 {
1131 return 0;
1132 }
1133 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1134 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) );
1135 return establishMagicalBackLinks(result, object);
1136 }
1137
1138 /** call non const method with 9 arguments, translated from python arguments
1139 */
1140 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
1141 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9) )
1142 {
1143 typedef typename ShadowTraits::TCppClass TCppClass;
1144 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1145 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9);
1146 TCppClassPtr self;
1147 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1148 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1149 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1150 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1151 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1152 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1153 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1154 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1155 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1156
1157 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9) != 0 )
1158 {
1159 return 0;
1160 }
1161 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1162 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) );
1163 return establishMagicalBackLinks(result, object);
1164 }
1165
1166 /** call non const method with 10 arguments, translated from python arguments
1167 */
1168 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
1169 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) )
1170 {
1171 typedef typename ShadowTraits::TCppClass TCppClass;
1172 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1173 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10);
1174 TCppClassPtr self;
1175 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1176 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1177 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1178 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1179 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1180 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1181 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1182 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1183 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1184 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10;
1185
1186 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) != 0 )
1187 {
1188 return 0;
1189 }
1190 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1191 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) );
1192 return establishMagicalBackLinks(result, object);
1193 }
1194
1195 /** call non const method with 11 arguments, translated from python arguments
1196 */
1197 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
1198 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) )
1199 {
1200 typedef typename ShadowTraits::TCppClass TCppClass;
1201 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1202 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11);
1203 TCppClassPtr self;
1204 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1205 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1206 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1207 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1208 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1209 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1210 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1211 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1212 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1213 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10;
1214 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11;
1215
1216 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) != 0 )
1217 {
1218 return 0;
1219 }
1220 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1221 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) );
1222 return establishMagicalBackLinks(result, object);
1223 }
1224
1225 /** call non const method with 12 arguments, translated from python arguments
1226 */
1227 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
1228 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) )
1229 {
1230 typedef typename ShadowTraits::TCppClass TCppClass;
1231 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1232 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12);
1233 TCppClassPtr self;
1234 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1235 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1236 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1237 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1238 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1239 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1240 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1241 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1242 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1243 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10;
1244 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11;
1245 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12;
1246
1247 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) != 0 )
1248 {
1249 return 0;
1250 }
1251 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1252 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) );
1253 return establishMagicalBackLinks(result, object);
1254 }
1255
1256 /** call non const method with 13 arguments, translated from python arguments
1257 */
1258 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
1259 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) )
1260 {
1261 typedef typename ShadowTraits::TCppClass TCppClass;
1262 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1263 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13);
1264 TCppClassPtr self;
1265 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1266 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1267 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1268 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1269 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1270 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1271 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1272 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1273 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1274 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10;
1275 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11;
1276 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12;
1277 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13;
1278
1279 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) != 0 )
1280 {
1281 return 0;
1282 }
1283 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1284 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) );
1285 return establishMagicalBackLinks(result, object);
1286 }
1287
1288 /** call non const method with 14 arguments, translated from python arguments
1289 */
1290 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
1291 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) )
1292 {
1293 typedef typename ShadowTraits::TCppClass TCppClass;
1294 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1295 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14);
1296 TCppClassPtr self;
1297 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1298 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1299 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1300 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1301 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1302 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1303 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1304 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1305 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1306 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10;
1307 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11;
1308 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12;
1309 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13;
1310 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14;
1311
1312 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) != 0 )
1313 {
1314 return 0;
1315 }
1316 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1317 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) );
1318 return establishMagicalBackLinks(result, object);
1319 }
1320
1321 /** call non const method with 15 arguments, translated from python arguments
1322 */
1323 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
1324 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) )
1325 {
1326 typedef typename ShadowTraits::TCppClass TCppClass;
1327 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
1328 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15);
1329 TCppClassPtr self;
1330 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1;
1331 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2;
1332 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3;
1333 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4;
1334 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5;
1335 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6;
1336 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7;
1337 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8;
1338 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9;
1339 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10;
1340 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11;
1341 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12;
1342 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13;
1343 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14;
1344 typedef ArgumentTraits<P15> TArg15; typedef typename TArg15::TStorage S15; S15 p15;
1345
1346 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) != 0 )
1347 {
1348 return 0;
1349 }
1350 PyObject* result = Caller<R>::template callMethod<TCppClass&, TMethod>(
1351 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) );
1352 return establishMagicalBackLinks(result, object);
1353 }
1354
1355
1356 // const methods
1357
1358 /** call const method without arguments
1359 */
1360 template <typename C, typename R>
1361 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)() const )
1362 {
1363 typedef typename ShadowTraits::TCppClass TCppClass;
1364 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1365 typedef R (C::*TMethod)() const;
1366 TConstCppClassPtr self;
1367 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple(args) != 0 )
1368 {
1369 return 0;
1370 }
1371 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1372 *self, method);
1373 return establishMagicalBackLinks(result, object);
1374 }
1375
1376 /** call const method with 1 argument, translated from python arguments
1377 */
1378 template <typename C, typename R, typename P1>
1379 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1) const )
1380 {
1381 typedef typename ShadowTraits::TCppClass TCppClass;
1382 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1383 typedef R (C::*TMethod)(P1) const;
1384 TConstCppClassPtr self;
1385 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1386
1387 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1>(args, p1) != 0 )
1388 {
1389 return 0;
1390 }
1391 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1392 *self, method, TArg1::arg(p1) );
1393 return establishMagicalBackLinks(result, object);
1394 }
1395
1396 /** call const method with 2 argument, translated from python arguments
1397 */
1398 template <typename C, typename R, typename P1, typename P2>
1399 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2) const )
1400 {
1401 typedef typename ShadowTraits::TCppClass TCppClass;
1402 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1403 typedef R (C::*TMethod)(P1, P2) const;
1404 TConstCppClassPtr self;
1405 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1406 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1407
1408 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2>(args, p1, p2) != 0 )
1409 {
1410 return 0;
1411 }
1412 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1413 *self, method, TArg1::arg(p1), TArg2::arg(p2) );
1414 return establishMagicalBackLinks(result, object);
1415 }
1416
1417 /** call const method with 3 argument, translated from python arguments
1418 */
1419 template <typename C, typename R, typename P1, typename P2, typename P3>
1420 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3) const )
1421 {
1422 typedef typename ShadowTraits::TCppClass TCppClass;
1423 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1424 typedef R (C::*TMethod)(P1, P2, P3) const;
1425 TConstCppClassPtr self;
1426 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1427 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1428 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1429
1430 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3>(args, p1, p2, p3) != 0 )
1431 {
1432 return 0;
1433 }
1434 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1435 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) );
1436 return establishMagicalBackLinks(result, object);
1437 }
1438
1439 /** call const method with 4 argument, translated from python arguments
1440 */
1441 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4>
1442 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4) const )
1443 {
1444 typedef typename ShadowTraits::TCppClass TCppClass;
1445 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1446 typedef R (C::*TMethod)(P1, P2, P3, P4) const;
1447 TConstCppClassPtr self;
1448 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1449 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1450 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1451 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1452
1453 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4>(args, p1, p2, p3, p4) != 0 )
1454 {
1455 return 0;
1456 }
1457 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1458 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) );
1459 return establishMagicalBackLinks(result, object);
1460 }
1461
1462 /** call const method with 5 argument, translated from python arguments
1463 */
1464 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
1465 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5) const )
1466 {
1467 typedef typename ShadowTraits::TCppClass TCppClass;
1468 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1469 typedef R (C::*TMethod)(P1, P2, P3, P4, P5) const;
1470 TConstCppClassPtr self;
1471 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1472 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1473 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1474 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1475 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1476
1477 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5>(args, p1, p2, p3, p4, p5) != 0 )
1478 {
1479 return 0;
1480 }
1481 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1482 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) );
1483 return establishMagicalBackLinks(result, object);
1484 }
1485
1486 /** call const method with 6 argument, translated from python arguments
1487 */
1488 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
1489 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6) const )
1490 {
1491 typedef typename ShadowTraits::TCppClass TCppClass;
1492 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1493 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6) const;
1494 TConstCppClassPtr self;
1495 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1496 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1497 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1498 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1499 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1500 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1501
1502 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6>(args, p1, p2, p3, p4, p5, p6) != 0 )
1503 {
1504 return 0;
1505 }
1506 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1507 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) );
1508 return establishMagicalBackLinks(result, object);
1509 }
1510
1511 /** call const method with 7 argument, translated from python arguments
1512 */
1513 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
1514 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7) const )
1515 {
1516 typedef typename ShadowTraits::TCppClass TCppClass;
1517 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1518 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7) const;
1519 TConstCppClassPtr self;
1520 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1521 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1522 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1523 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1524 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1525 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1526 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1527
1528 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7>(args, p1, p2, p3, p4, p5, p6, p7) != 0 )
1529 {
1530 return 0;
1531 }
1532 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1533 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) );
1534 return establishMagicalBackLinks(result, object);
1535 }
1536
1537 /** call const method with 8 argument, translated from python arguments
1538 */
1539 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
1540 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8) const )
1541 {
1542 typedef typename ShadowTraits::TCppClass TCppClass;
1543 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1544 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8) const;
1545 TConstCppClassPtr self;
1546 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1547 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1548 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1549 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1550 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1551 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1552 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1553 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1554
1555 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>(args, p1, p2, p3, p4, p5, p6, p7, p8) != 0 )
1556 {
1557 return 0;
1558 }
1559 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1560 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) );
1561 return establishMagicalBackLinks(result, object);
1562 }
1563
1564 /** call const method with 9 argument, translated from python arguments
1565 */
1566 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
1567 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9) const )
1568 {
1569 typedef typename ShadowTraits::TCppClass TCppClass;
1570 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1571 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9) const;
1572 TConstCppClassPtr self;
1573 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1574 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1575 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1576 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1577 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1578 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1579 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1580 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1581 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1582
1583 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9) != 0 )
1584 {
1585 return 0;
1586 }
1587 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1588 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) );
1589 return establishMagicalBackLinks(result, object);
1590 }
1591
1592 /** call const method with 10 argument, translated from python arguments
1593 */
1594 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
1595 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) const )
1596 {
1597 typedef typename ShadowTraits::TCppClass TCppClass;
1598 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1599 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) const;
1600 TConstCppClassPtr self;
1601 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1602 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1603 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1604 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1605 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1606 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1607 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1608 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1609 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1610 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
1611
1612 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) != 0 )
1613 {
1614 return 0;
1615 }
1616 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1617 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) );
1618 return establishMagicalBackLinks(result, object);
1619 }
1620
1621 /** call const method with 11 argument, translated from python arguments
1622 */
1623 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
1624 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) const )
1625 {
1626 typedef typename ShadowTraits::TCppClass TCppClass;
1627 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1628 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) const;
1629 TConstCppClassPtr self;
1630 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1631 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1632 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1633 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1634 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1635 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1636 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1637 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1638 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1639 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
1640 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
1641
1642 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) != 0 )
1643 {
1644 return 0;
1645 }
1646 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1647 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) );
1648 return establishMagicalBackLinks(result, object);
1649 }
1650
1651 /** call const method with 12 argument, translated from python arguments
1652 */
1653 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
1654 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) const )
1655 {
1656 typedef typename ShadowTraits::TCppClass TCppClass;
1657 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1658 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) const;
1659 TConstCppClassPtr self;
1660 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1661 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1662 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1663 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1664 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1665 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1666 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1667 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1668 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1669 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
1670 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
1671 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
1672
1673 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) != 0 )
1674 {
1675 return 0;
1676 }
1677 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1678 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) );
1679 return establishMagicalBackLinks(result, object);
1680 }
1681
1682 /** call const method with 13 argument, translated from python arguments
1683 */
1684 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
1685 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) const )
1686 {
1687 typedef typename ShadowTraits::TCppClass TCppClass;
1688 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1689 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) const;
1690 TConstCppClassPtr self;
1691 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1692 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1693 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1694 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1695 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1696 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1697 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1698 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1699 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1700 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
1701 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
1702 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
1703 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
1704
1705 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) != 0 )
1706 {
1707 return 0;
1708 }
1709 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1710 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) );
1711 return establishMagicalBackLinks(result, object);
1712 }
1713
1714 /** call const method with 14 argument, translated from python arguments
1715 */
1716 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
1717 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) const )
1718 {
1719 typedef typename ShadowTraits::TCppClass TCppClass;
1720 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1721 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) const;
1722 TConstCppClassPtr self;
1723 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1724 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1725 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1726 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1727 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1728 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1729 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1730 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1731 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1732 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
1733 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
1734 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
1735 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
1736 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
1737
1738 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) != 0 )
1739 {
1740 return 0;
1741 }
1742 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1743 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) );
1744 return establishMagicalBackLinks(result, object);
1745 }
1746
1747 /** call const method with 15 argument, translated from python arguments
1748 */
1749 template <typename C, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
1750 static PyObject* call( PyObject* args, PyObject* object, R (C::*method)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) const )
1751 {
1752 typedef typename ShadowTraits::TCppClass TCppClass;
1753 typedef typename ShadowTraits::TConstCppClassPtr TConstCppClassPtr;
1754 typedef R (C::*TMethod)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) const;
1755 TConstCppClassPtr self;
1756 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1757 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1758 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1759 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1760 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1761 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1762 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1763 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1764 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1765 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
1766 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
1767 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
1768 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
1769 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
1770 typedef ArgumentTraits<P15> TArg15; typedef typename TArg15::TStorage S15; S15 p15 = S15();
1771
1772 if ( ShadowTraits::getObject(object, self) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) != 0 )
1773 {
1774 return 0;
1775 }
1776 PyObject* result = Caller<R>::template callMethod<const TCppClass&, TMethod>(
1777 *self, method, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) );
1778 return establishMagicalBackLinks(result, object);
1779 }
1780
1781 // "free" methods passing object as first argument
1782
1783 /** call "free method" without arguments, passing object as first argument
1784 */
1785 template <typename R, typename P0>
1786 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0) )
1787 {
1788 typedef R (*TFunction)(P0);
1789 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1790 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple(args) != 0 )
1791 {
1792 return 0;
1793 }
1794 PyObject* result = Caller<R>::template callFunction<TFunction>(
1795 freeMethod, TArg0::arg(p0) );
1796 return establishMagicalBackLinks(result, object);
1797 }
1798
1799 /** call "free method" with 1 arguments translated from python arguments, passing object as first argument
1800 */
1801 template <typename R, typename P0, typename P1>
1802 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1) )
1803 {
1804 typedef R (*TFunction)(P0, P1);
1805 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1806 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1807
1808 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1>(args, p1) != 0 )
1809 {
1810 return 0;
1811 }
1812 PyObject* result = Caller<R>::template callFunction<TFunction>(
1813 freeMethod, TArg0::arg(p0), TArg1::arg(p1) );
1814 return establishMagicalBackLinks(result, object);
1815 }
1816
1817 /** call "free method" with 2 arguments translated from python arguments, passing object as first argument
1818 */
1819 template <typename R, typename P0, typename P1, typename P2>
1820 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2) )
1821 {
1822 typedef R (*TFunction)(P0, P1, P2);
1823 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1824 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1825 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1826
1827 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2>(args, p1, p2) != 0 )
1828 {
1829 return 0;
1830 }
1831 PyObject* result = Caller<R>::template callFunction<TFunction>(
1832 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2) );
1833 return establishMagicalBackLinks(result, object);
1834 }
1835
1836 /** call "free method" with 3 arguments translated from python arguments, passing object as first argument
1837 */
1838 template <typename R, typename P0, typename P1, typename P2, typename P3>
1839 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3) )
1840 {
1841 typedef R (*TFunction)(P0, P1, P2, P3);
1842 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1843 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1844 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1845 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1846
1847 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3>(args, p1, p2, p3) != 0 )
1848 {
1849 return 0;
1850 }
1851 PyObject* result = Caller<R>::template callFunction<TFunction>(
1852 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) );
1853 return establishMagicalBackLinks(result, object);
1854 }
1855
1856 /** call "free method" with 4 arguments translated from python arguments, passing object as first argument
1857 */
1858 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4>
1859 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4) )
1860 {
1861 typedef R (*TFunction)(P0, P1, P2, P3, P4);
1862 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1863 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1864 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1865 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1866 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1867
1868 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4>(args, p1, p2, p3, p4) != 0 )
1869 {
1870 return 0;
1871 }
1872 PyObject* result = Caller<R>::template callFunction<TFunction>(
1873 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) );
1874 return establishMagicalBackLinks(result, object);
1875 }
1876
1877 /** call "free method" with 5 arguments translated from python arguments, passing object as first argument
1878 */
1879 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5>
1880 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5) )
1881 {
1882 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5);
1883 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1884 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1885 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1886 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1887 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1888 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1889
1890 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5>(args, p1, p2, p3, p4, p5) != 0 )
1891 {
1892 return 0;
1893 }
1894 PyObject* result = Caller<R>::template callFunction<TFunction>(
1895 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) );
1896 return establishMagicalBackLinks(result, object);
1897 }
1898
1899 /** call "free method" with 6 arguments translated from python arguments, passing object as first argument
1900 */
1901 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
1902 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6) )
1903 {
1904 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6);
1905 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1906 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1907 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1908 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1909 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1910 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1911 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1912
1913 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6>(args, p1, p2, p3, p4, p5, p6) != 0 )
1914 {
1915 return 0;
1916 }
1917 PyObject* result = Caller<R>::template callFunction<TFunction>(
1918 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) );
1919 return establishMagicalBackLinks(result, object);
1920 }
1921
1922 /** call "free method" with 7 arguments translated from python arguments, passing object as first argument
1923 */
1924 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
1925 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7) )
1926 {
1927 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7);
1928 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1929 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1930 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1931 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1932 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1933 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1934 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1935 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1936
1937 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7>(args, p1, p2, p3, p4, p5, p6, p7) != 0 )
1938 {
1939 return 0;
1940 }
1941 PyObject* result = Caller<R>::template callFunction<TFunction>(
1942 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) );
1943 return establishMagicalBackLinks(result, object);
1944 }
1945
1946 /** call "free method" with 8 arguments translated from python arguments, passing object as first argument
1947 */
1948 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
1949 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8) )
1950 {
1951 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8);
1952 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1953 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1954 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1955 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1956 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1957 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1958 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1959 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1960 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1961
1962 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>(args, p1, p2, p3, p4, p5, p6, p7, p8) != 0 )
1963 {
1964 return 0;
1965 }
1966 PyObject* result = Caller<R>::template callFunction<TFunction>(
1967 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) );
1968 return establishMagicalBackLinks(result, object);
1969 }
1970
1971 /** call "free method" with 9 arguments translated from python arguments, passing object as first argument
1972 */
1973 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
1974 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) )
1975 {
1976 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9);
1977 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
1978 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
1979 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
1980 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
1981 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
1982 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
1983 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
1984 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
1985 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
1986 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
1987
1988 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9) != 0 )
1989 {
1990 return 0;
1991 }
1992 PyObject* result = Caller<R>::template callFunction<TFunction>(
1993 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) );
1994 return establishMagicalBackLinks(result, object);
1995 }
1996
1997 /** call "free method" with 10 arguments translated from python arguments, passing object as first argument
1998 */
1999 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
2000 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) )
2001 {
2002 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10);
2003 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2004 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2005 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2006 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2007 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2008 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2009 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2010 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2011 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2012 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2013 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2014
2015 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) != 0 )
2016 {
2017 return 0;
2018 }
2019 PyObject* result = Caller<R>::template callFunction<TFunction>(
2020 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) );
2021 return establishMagicalBackLinks(result, object);
2022 }
2023
2024 /** call "free method" with 11 arguments translated from python arguments, passing object as first argument
2025 */
2026 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
2027 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) )
2028 {
2029 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11);
2030 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2031 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2032 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2033 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2034 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2035 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2036 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2037 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2038 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2039 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2040 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2041 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2042
2043 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) != 0 )
2044 {
2045 return 0;
2046 }
2047 PyObject* result = Caller<R>::template callFunction<TFunction>(
2048 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) );
2049 return establishMagicalBackLinks(result, object);
2050 }
2051
2052 /** call "free method" with 12 arguments translated from python arguments, passing object as first argument
2053 */
2054 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
2055 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) )
2056 {
2057 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12);
2058 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2059 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2060 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2061 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2062 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2063 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2064 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2065 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2066 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2067 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2068 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2069 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2070 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2071
2072 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) != 0 )
2073 {
2074 return 0;
2075 }
2076 PyObject* result = Caller<R>::template callFunction<TFunction>(
2077 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) );
2078 return establishMagicalBackLinks(result, object);
2079 }
2080
2081 /** call "free method" with 13 arguments translated from python arguments, passing object as first argument
2082 */
2083 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
2084 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) )
2085 {
2086 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13);
2087 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2088 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2089 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2090 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2091 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2092 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2093 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2094 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2095 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2096 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2097 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2098 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2099 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2100 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
2101
2102 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) != 0 )
2103 {
2104 return 0;
2105 }
2106 PyObject* result = Caller<R>::template callFunction<TFunction>(
2107 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) );
2108 return establishMagicalBackLinks(result, object);
2109 }
2110
2111 /** call "free method" with 14 arguments translated from python arguments, passing object as first argument
2112 */
2113 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
2114 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) )
2115 {
2116 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14);
2117 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2118 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2119 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2120 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2121 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2122 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2123 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2124 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2125 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2126 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2127 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2128 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2129 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2130 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
2131 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
2132
2133 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) != 0 )
2134 {
2135 return 0;
2136 }
2137 PyObject* result = Caller<R>::template callFunction<TFunction>(
2138 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) );
2139 return establishMagicalBackLinks(result, object);
2140 }
2141
2142 /** call "free method" with 15 arguments translated from python arguments, passing object as first argument
2143 */
2144 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
2145 static PyObject* callFree( PyObject* args, PyObject* object, R (*freeMethod)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) )
2146 {
2147 typedef R (*TFunction)(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15);
2148 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2149 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2150 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2151 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2152 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2153 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2154 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2155 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2156 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2157 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2158 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2159 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2160 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2161 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
2162 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
2163 typedef ArgumentTraits<P15> TArg15; typedef typename TArg15::TStorage S15; S15 p15 = S15();
2164
2165 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) != 0 )
2166 {
2167 return 0;
2168 }
2169 PyObject* result = Caller<R>::template callFunction<TFunction>(
2170 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) );
2171 return establishMagicalBackLinks(result, object);
2172 }
2173
2174
2175 /** call std::function as "free method" without arguments, passing object as first argument
2176 */
2177 template <typename R, typename P0>
2178 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0)> freeMethod )
2179 {
2180 typedef std::function<R(P0)> TFunction;
2181 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2182 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple(args) != 0 )
2183 {
2184 return 0;
2185 }
2186 PyObject* result = Caller<R>::template callFunction<TFunction>(
2187 freeMethod, TArg0::arg(p0) );
2188 return establishMagicalBackLinks(result, object);
2189 }
2190
2191 /** call "free method" with 1 arguments translated from python arguments, passing object as first argument
2192 */
2193 template <typename R, typename P0, typename P1>
2194 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1)> freeMethod )
2195 {
2196 typedef std::function<R(P0, P1)> TFunction;
2197 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2198 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2199
2200 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1>(args, p1) != 0 )
2201 {
2202 return 0;
2203 }
2204 PyObject* result = Caller<R>::template callFunction<TFunction>(
2205 freeMethod, TArg0::arg(p0), TArg1::arg(p1) );
2206 return establishMagicalBackLinks(result, object);
2207 }
2208
2209 /** call "free method" with 2 arguments translated from python arguments, passing object as first argument
2210 */
2211 template <typename R, typename P0, typename P1, typename P2>
2212 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2)> freeMethod )
2213 {
2214 typedef std::function<R(P0, P1, P2)> TFunction;
2215 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2216 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2217 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2218
2219 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2>(args, p1, p2) != 0 )
2220 {
2221 return 0;
2222 }
2223 PyObject* result = Caller<R>::template callFunction<TFunction>(
2224 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2) );
2225 return establishMagicalBackLinks(result, object);
2226 }
2227
2228 /** call "free method" with 3 arguments translated from python arguments, passing object as first argument
2229 */
2230 template <typename R, typename P0, typename P1, typename P2, typename P3>
2231 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3)> freeMethod )
2232 {
2233 typedef std::function<R(P0, P1, P2, P3)> TFunction;
2234 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2235 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2236 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2237 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2238
2239 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3>(args, p1, p2, p3) != 0 )
2240 {
2241 return 0;
2242 }
2243 PyObject* result = Caller<R>::template callFunction<TFunction>(
2244 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) );
2245 return establishMagicalBackLinks(result, object);
2246 }
2247
2248 /** call "free method" with 4 arguments translated from python arguments, passing object as first argument
2249 */
2250 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4>
2251 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4)> freeMethod )
2252 {
2253 typedef std::function<R(P0, P1, P2, P3, P4)> TFunction;
2254 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2255 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2256 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2257 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2258 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2259
2260 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4>(args, p1, p2, p3, p4) != 0 )
2261 {
2262 return 0;
2263 }
2264 PyObject* result = Caller<R>::template callFunction<TFunction>(
2265 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) );
2266 return establishMagicalBackLinks(result, object);
2267 }
2268
2269 /** call "free method" with 5 arguments translated from python arguments, passing object as first argument
2270 */
2271 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5>
2272 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5)> freeMethod )
2273 {
2274 typedef std::function<R(P0, P1, P2, P3, P4, P5)> TFunction;
2275 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2276 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2277 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2278 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2279 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2280 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2281
2282 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5>(args, p1, p2, p3, p4, p5) != 0 )
2283 {
2284 return 0;
2285 }
2286 PyObject* result = Caller<R>::template callFunction<TFunction>(
2287 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) );
2288 return establishMagicalBackLinks(result, object);
2289 }
2290
2291 /** call "free method" with 6 arguments translated from python arguments, passing object as first argument
2292 */
2293 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
2294 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6)> freeMethod )
2295 {
2296 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6)> TFunction;
2297 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2298 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2299 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2300 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2301 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2302 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2303 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2304
2305 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6>(args, p1, p2, p3, p4, p5, p6) != 0 )
2306 {
2307 return 0;
2308 }
2309 PyObject* result = Caller<R>::template callFunction<TFunction>(
2310 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) );
2311 return establishMagicalBackLinks(result, object);
2312 }
2313
2314 /** call "free method" with 7 arguments translated from python arguments, passing object as first argument
2315 */
2316 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
2317 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7)> freeMethod )
2318 {
2319 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7)> TFunction;
2320 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2321 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2322 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2323 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2324 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2325 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2326 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2327 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2328
2329 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7>(args, p1, p2, p3, p4, p5, p6, p7) != 0 )
2330 {
2331 return 0;
2332 }
2333 PyObject* result = Caller<R>::template callFunction<TFunction>(
2334 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) );
2335 return establishMagicalBackLinks(result, object);
2336 }
2337
2338 /** call "free method" with 8 arguments translated from python arguments, passing object as first argument
2339 */
2340 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
2341 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8)> freeMethod )
2342 {
2343 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8)> TFunction;
2344 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2345 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2346 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2347 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2348 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2349 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2350 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2351 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2352 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2353
2354 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>(args, p1, p2, p3, p4, p5, p6, p7, p8) != 0 )
2355 {
2356 return 0;
2357 }
2358 PyObject* result = Caller<R>::template callFunction<TFunction>(
2359 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) );
2360 return establishMagicalBackLinks(result, object);
2361 }
2362
2363 /** call "free method" with 9 arguments translated from python arguments, passing object as first argument
2364 */
2365 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
2366 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)> freeMethod )
2367 {
2368 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)> TFunction;
2369 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2370 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2371 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2372 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2373 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2374 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2375 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2376 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2377 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2378 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2379
2380 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9) != 0 )
2381 {
2382 return 0;
2383 }
2384 PyObject* result = Caller<R>::template callFunction<TFunction>(
2385 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) );
2386 return establishMagicalBackLinks(result, object);
2387 }
2388
2389 /** call "free method" with 10 arguments translated from python arguments, passing object as first argument
2390 */
2391 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
2392 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)> freeMethod )
2393 {
2394 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)> TFunction;
2395 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2396 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2397 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2398 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2399 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2400 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2401 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2402 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2403 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2404 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2405 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2406
2407 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) != 0 )
2408 {
2409 return 0;
2410 }
2411 PyObject* result = Caller<R>::template callFunction<TFunction>(
2412 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) );
2413 return establishMagicalBackLinks(result, object);
2414 }
2415
2416 /** call "free method" with 11 arguments translated from python arguments, passing object as first argument
2417 */
2418 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
2419 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)> freeMethod )
2420 {
2421 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)> TFunction;
2422 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2423 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2424 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2425 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2426 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2427 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2428 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2429 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2430 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2431 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2432 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2433 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2434
2435 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) != 0 )
2436 {
2437 return 0;
2438 }
2439 PyObject* result = Caller<R>::template callFunction<TFunction>(
2440 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) );
2441 return establishMagicalBackLinks(result, object);
2442 }
2443
2444 /** call "free method" with 12 arguments translated from python arguments, passing object as first argument
2445 */
2446 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
2447 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)> freeMethod )
2448 {
2449 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)> TFunction;
2450 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2451 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2452 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2453 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2454 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2455 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2456 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2457 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2458 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2459 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2460 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2461 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2462 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2463
2464 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) != 0 )
2465 {
2466 return 0;
2467 }
2468 PyObject* result = Caller<R>::template callFunction<TFunction>(
2469 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) );
2470 return establishMagicalBackLinks(result, object);
2471 }
2472
2473 /** call "free method" with 13 arguments translated from python arguments, passing object as first argument
2474 */
2475 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
2476 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)> freeMethod )
2477 {
2478 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)> TFunction;
2479 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2480 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2481 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2482 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2483 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2484 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2485 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2486 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2487 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2488 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2489 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2490 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2491 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2492 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
2493
2494 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) != 0 )
2495 {
2496 return 0;
2497 }
2498 PyObject* result = Caller<R>::template callFunction<TFunction>(
2499 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) );
2500 return establishMagicalBackLinks(result, object);
2501 }
2502
2503 /** call "free method" with 14 arguments translated from python arguments, passing object as first argument
2504 */
2505 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
2506 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)> freeMethod )
2507 {
2508 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)> TFunction;
2509 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2510 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2511 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2512 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2513 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2514 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2515 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2516 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2517 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2518 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2519 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2520 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2521 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2522 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
2523 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
2524
2525 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) != 0 )
2526 {
2527 return 0;
2528 }
2529 PyObject* result = Caller<R>::template callFunction<TFunction>(
2530 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) );
2531 return establishMagicalBackLinks(result, object);
2532 }
2533
2534 /** call "free method" with 15 arguments translated from python arguments, passing object as first argument
2535 */
2536 template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
2537 static PyObject* callFree( PyObject* args, PyObject* object, std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)> freeMethod )
2538 {
2539 typedef std::function<R(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)> TFunction;
2540 typedef ArgumentTraits<P0> TArg0; typedef typename TArg0::TStorage S0; S0 p0 = S0();
2541 typedef ArgumentTraits<P1> TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2542 typedef ArgumentTraits<P2> TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2543 typedef ArgumentTraits<P3> TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2544 typedef ArgumentTraits<P4> TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2545 typedef ArgumentTraits<P5> TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2546 typedef ArgumentTraits<P6> TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2547 typedef ArgumentTraits<P7> TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2548 typedef ArgumentTraits<P8> TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2549 typedef ArgumentTraits<P9> TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
2550 typedef ArgumentTraits<P10> TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
2551 typedef ArgumentTraits<P11> TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
2552 typedef ArgumentTraits<P12> TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
2553 typedef ArgumentTraits<P13> TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
2554 typedef ArgumentTraits<P14> TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
2555 typedef ArgumentTraits<P15> TArg15; typedef typename TArg15::TStorage S15; S15 p15 = S15();
2556
2557 if ( pyGetSimpleObject(object, p0) != 0 || decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) != 0 )
2558 {
2559 return 0;
2560 }
2561 PyObject* result = Caller<R>::template callFunction<TFunction>(
2562 freeMethod, TArg0::arg(p0), TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) );
2563 return establishMagicalBackLinks(result, object);
2564 }
2565
2566
2567 // member getters and setters
2568
2569 /** call const getter function.
2570 *
2571 * Getters and Setters never release the GIL, as it is assumed they're cheap.
2572 */
2573 template <typename C, typename R>
2574 static PyObject* get(PyObject* object, R (C::*method)() const)
2575 {
2576 typename ShadowTraits::TConstCppClassPtr self;
2577 if (ShadowTraits::getObject(object, self) != 0)
2578 {
2579 return 0;
2580 }
2581 try
2582 {
2583 PyObject* result = pyBuildSimpleObject(((*self).*method)());
2584 return establishMagicalBackLinks(result, object);
2585 }
2586 LASS_PYTHON_CATCH_AND_RETURN
2587 }
2588
2589 /** call getter function.
2590 *
2591 * Getters and Setters never release the GIL, as it is assumed they're cheap.
2592 */
2593 template <typename C, typename R>
2594 static PyObject* get(PyObject* object, R (C::*method)())
2595 {
2596 typename ShadowTraits::TCppClassPtr self;
2597 if (ShadowTraits::getObject(object, self) != 0)
2598 {
2599 return 0;
2600 }
2601 try
2602 {
2603 PyObject* result = pyBuildSimpleObject(((*self).*method)());
2604 return establishMagicalBackLinks(result, object);
2605 }
2606 LASS_PYTHON_CATCH_AND_RETURN
2607 }
2608
2609 /** call explicit setter function like <tt>void Foo::setBar(const Bar& iBar)</tt>.
2610 *
2611 * Getters and Setters never release the GIL, as it is assumed they're cheap.
2612 */
2613 template <typename C, typename P>
2614 static int set( PyObject* args, PyObject* object, void (C::*method)(P) )
2615 {
2616 typename ShadowTraits::TCppClassPtr self;
2617 typedef ArgumentTraits<P> TArg; typedef typename TArg::TStorage S; S p = S();
2618 if (ShadowTraits::getObject(object, self) != 0 || pyGetSimpleObject(args, p) != 0)
2619 {
2620 return -1;
2621 }
2622 try
2623 {
2624 ((*self).*method)(TArg::arg(p));
2625 }
2626 LASS_PYTHON_CATCH_AND_RETURN_EX(-1)
2627 return 0;
2628 }
2629
2630 /** call implicit setter function like <tt>Bar& Foo::bar()</tt>.
2631 *
2632 * Getters and Setters never release the GIL, as it is assumed they're cheap.
2633 */
2634 template <typename C, typename P>
2635 static int set( PyObject* args, PyObject* object, P& (C::*method)() )
2636 {
2637 typename ShadowTraits::TCppClassPtr self;
2638 typedef ArgumentTraits<P> TArg; typedef typename TArg::TStorage S; S p = S();
2639 if(ShadowTraits::getObject(object, self) != 0 || pyGetSimpleObject(args, p) != 0)
2640 {
2641 return -1;
2642 }
2643 try
2644 {
2645 ((*self).*method)() = TArg::arg(p);
2646 }
2647 LASS_PYTHON_CATCH_AND_RETURN_EX(-1)
2648 return 0;
2649 }
2650
2651 template <typename C, typename R>
2652 static PyObject* freeGet(PyObject* object, R (*function)(C&) )
2653 {
2654 typedef typename meta::Select<
2655 meta::IsConst<C>,
2656 typename ShadowTraits::TConstCppClassPtr,
2657 typename ShadowTraits::TCppClassPtr
2658 >::Type TSelfPtr;
2659 TSelfPtr self;
2660 if (ShadowTraits::getObject(object, self) != 0)
2661 {
2662 return 0;
2663 }
2664 try
2665 {
2666 PyObject* result = pyBuildSimpleObject(function(*self));
2667 return establishMagicalBackLinks(result, object);
2668 }
2669 LASS_PYTHON_CATCH_AND_RETURN
2670 }
2671
2672 template <typename C, typename P>
2673 static int freeSet( PyObject* args, PyObject* object, void (*function)(C&, P) )
2674 {
2675 typename ShadowTraits::TCppClassPtr self;
2676 typedef ArgumentTraits<P> TArg; typedef typename TArg::TStorage S; S p = S();
2677 if(ShadowTraits::getObject(object, self) != 0 || pyGetSimpleObject(args, p) != 0)
2678 {
2679 return -1;
2680 }
2681 try
2682 {
2683 function(*self, TArg::arg(p));
2684 }
2685 LASS_PYTHON_CATCH_AND_RETURN_EX(-1)
2686 return 0;
2687 }
2688};
2689
2690
2691
2692// --- constructors --------------------------------------------------------------------------------
2693
2694/** allocate a new object with default constructor.
2695 */
2696template <typename ShadowTraits>
2697PyObject* construct( PyTypeObject* subType, PyObject* args )
2698{
2699 typedef typename ShadowTraits::TCppClass TCppClass;
2700 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2701 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2702
2703 if( decodeTuple(args) != 0 )
2704 {
2705 return 0;
2706 }
2707
2708 try
2709 {
2710 const TCppClassPtr cppObject(new TCppClass);
2711 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2712 // actually the iSubType should be used but appearently the tp_dict does not get properly initialized
2713 // so for now, old-style, consequence: no inheritance from extension classes
2714 forceObjectType(result, subType);
2715 return fromSharedPtrToNakedCast(result);
2716 }
2717 LASS_PYTHON_CATCH_AND_RETURN
2718}
2719
2720/** allocate a new object with 1 arguments.
2721 */
2722template <typename ShadowTraits, typename P1>
2723PyObject* construct( PyTypeObject* subType, PyObject* args )
2724{
2725 typedef typename ShadowTraits::TCppClass TCppClass;
2726 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2727 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2728 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2729
2730
2731 if ( decodeTuple<S1>( args, p1 ) != 0 )
2732 {
2733 return 0;
2734 }
2735
2736 try
2737 {
2738 TCppClassPtr cppObject;
2739 {
2740 UnblockThreads LASS_UNUSED(unlock);
2741 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1) ));
2742 }
2743 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2744 forceObjectType(result, subType);
2745 result->ob_type = subType;
2746 return fromSharedPtrToNakedCast(result);
2747 }
2748 LASS_PYTHON_CATCH_AND_RETURN
2749}
2750
2751/** allocate a new object with 2 arguments.
2752 */
2753template <typename ShadowTraits, typename P1, typename P2>
2754PyObject* construct( PyTypeObject* subType, PyObject* args )
2755{
2756 typedef typename ShadowTraits::TCppClass TCppClass;
2757 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2758 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2759 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2760 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2761
2762
2763 if ( decodeTuple<S1, S2>( args, p1, p2 ) != 0 )
2764 {
2765 return 0;
2766 }
2767
2768 try
2769 {
2770 TCppClassPtr cppObject;
2771 {
2772 UnblockThreads LASS_UNUSED(unlock);
2773 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2) ));
2774 }
2775 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2776 forceObjectType(result, subType);
2777 result->ob_type = subType;
2778 return fromSharedPtrToNakedCast(result);
2779 }
2780 LASS_PYTHON_CATCH_AND_RETURN
2781}
2782
2783/** allocate a new object with 3 arguments.
2784 */
2785template <typename ShadowTraits, typename P1, typename P2, typename P3>
2786PyObject* construct( PyTypeObject* subType, PyObject* args )
2787{
2788 typedef typename ShadowTraits::TCppClass TCppClass;
2789 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2790 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2791 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2792 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2793 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2794
2795
2796 if ( decodeTuple<S1, S2, S3>( args, p1, p2, p3 ) != 0 )
2797 {
2798 return 0;
2799 }
2800
2801 try
2802 {
2803 TCppClassPtr cppObject;
2804 {
2805 UnblockThreads LASS_UNUSED(unlock);
2806 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3) ));
2807 }
2808 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2809 forceObjectType(result, subType);
2810 result->ob_type = subType;
2811 return fromSharedPtrToNakedCast(result);
2812 }
2813 LASS_PYTHON_CATCH_AND_RETURN
2814}
2815
2816/** allocate a new object with 4 arguments.
2817 */
2818template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4>
2819PyObject* construct( PyTypeObject* subType, PyObject* args )
2820{
2821 typedef typename ShadowTraits::TCppClass TCppClass;
2822 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2823 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2824 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2825 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2826 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2827 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2828
2829
2830 if ( decodeTuple<S1, S2, S3, S4>( args, p1, p2, p3, p4 ) != 0 )
2831 {
2832 return 0;
2833 }
2834
2835 try
2836 {
2837 TCppClassPtr cppObject;
2838 {
2839 UnblockThreads LASS_UNUSED(unlock);
2840 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4) ));
2841 }
2842 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2843 forceObjectType(result, subType);
2844 result->ob_type = subType;
2845 return fromSharedPtrToNakedCast(result);
2846 }
2847 LASS_PYTHON_CATCH_AND_RETURN
2848}
2849
2850/** allocate a new object with 5 arguments.
2851 */
2852template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5>
2853PyObject* construct( PyTypeObject* subType, PyObject* args )
2854{
2855 typedef typename ShadowTraits::TCppClass TCppClass;
2856 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2857 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2858 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2859 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2860 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2861 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2862 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2863
2864
2865 if ( decodeTuple<S1, S2, S3, S4, S5>( args, p1, p2, p3, p4, p5 ) != 0 )
2866 {
2867 return 0;
2868 }
2869
2870 try
2871 {
2872 TCppClassPtr cppObject;
2873 {
2874 UnblockThreads LASS_UNUSED(unlock);
2875 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5) ));
2876 }
2877 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2878 forceObjectType(result, subType);
2879 result->ob_type = subType;
2880 return fromSharedPtrToNakedCast(result);
2881 }
2882 LASS_PYTHON_CATCH_AND_RETURN
2883}
2884
2885/** allocate a new object with 6 arguments.
2886 */
2887template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
2888PyObject* construct( PyTypeObject* subType, PyObject* args )
2889{
2890 typedef typename ShadowTraits::TCppClass TCppClass;
2891 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2892 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2893 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2894 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2895 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2896 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2897 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2898 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2899
2900
2901 if ( decodeTuple<S1, S2, S3, S4, S5, S6>( args, p1, p2, p3, p4, p5, p6 ) != 0 )
2902 {
2903 return 0;
2904 }
2905
2906 try
2907 {
2908 TCppClassPtr cppObject;
2909 {
2910 UnblockThreads LASS_UNUSED(unlock);
2911 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6) ));
2912 }
2913 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2914 forceObjectType(result, subType);
2915 result->ob_type = subType;
2916 return fromSharedPtrToNakedCast(result);
2917 }
2918 LASS_PYTHON_CATCH_AND_RETURN
2919}
2920
2921/** allocate a new object with 7 arguments.
2922 */
2923template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
2924PyObject* construct( PyTypeObject* subType, PyObject* args )
2925{
2926 typedef typename ShadowTraits::TCppClass TCppClass;
2927 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2928 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2929 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2930 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2931 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2932 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2933 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2934 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2935 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2936
2937
2938 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7>( args, p1, p2, p3, p4, p5, p6, p7 ) != 0 )
2939 {
2940 return 0;
2941 }
2942
2943 try
2944 {
2945 TCppClassPtr cppObject;
2946 {
2947 UnblockThreads LASS_UNUSED(unlock);
2948 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7) ));
2949 }
2950 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2951 forceObjectType(result, subType);
2952 result->ob_type = subType;
2953 return fromSharedPtrToNakedCast(result);
2954 }
2955 LASS_PYTHON_CATCH_AND_RETURN
2956}
2957
2958/** allocate a new object with 8 arguments.
2959 */
2960template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
2961PyObject* construct( PyTypeObject* subType, PyObject* args )
2962{
2963 typedef typename ShadowTraits::TCppClass TCppClass;
2964 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
2965 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
2966 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
2967 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
2968 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
2969 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
2970 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
2971 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
2972 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
2973 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
2974
2975
2976 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>( args, p1, p2, p3, p4, p5, p6, p7, p8 ) != 0 )
2977 {
2978 return 0;
2979 }
2980
2981 try
2982 {
2983 TCppClassPtr cppObject;
2984 {
2985 UnblockThreads LASS_UNUSED(unlock);
2986 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8) ));
2987 }
2988 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
2989 forceObjectType(result, subType);
2990 result->ob_type = subType;
2991 return fromSharedPtrToNakedCast(result);
2992 }
2993 LASS_PYTHON_CATCH_AND_RETURN
2994}
2995
2996/** allocate a new object with 9 arguments.
2997 */
2998template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
2999PyObject* construct( PyTypeObject* subType, PyObject* args )
3000{
3001 typedef typename ShadowTraits::TCppClass TCppClass;
3002 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3003 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3004 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3005 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3006 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3007 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3008 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3009 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3010 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3011 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3012 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3013
3014
3015 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9 ) != 0 )
3016 {
3017 return 0;
3018 }
3019
3020 try
3021 {
3022 TCppClassPtr cppObject;
3023 {
3024 UnblockThreads LASS_UNUSED(unlock);
3025 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9) ));
3026 }
3027 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3028 forceObjectType(result, subType);
3029 result->ob_type = subType;
3030 return fromSharedPtrToNakedCast(result);
3031 }
3032 LASS_PYTHON_CATCH_AND_RETURN
3033}
3034
3035/** allocate a new object with 10 arguments.
3036 */
3037template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
3038PyObject* construct( PyTypeObject* subType, PyObject* args )
3039{
3040 typedef typename ShadowTraits::TCppClass TCppClass;
3041 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3042 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3043 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3044 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3045 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3046 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3047 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3048 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3049 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3050 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3051 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3052 typedef ArgumentTraits< P10 > TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
3053
3054
3055 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ) != 0 )
3056 {
3057 return 0;
3058 }
3059
3060 try
3061 {
3062 TCppClassPtr cppObject;
3063 {
3064 UnblockThreads LASS_UNUSED(unlock);
3065 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10) ));
3066 }
3067 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3068 forceObjectType(result, subType);
3069 result->ob_type = subType;
3070 return fromSharedPtrToNakedCast(result);
3071 }
3072 LASS_PYTHON_CATCH_AND_RETURN
3073}
3074
3075/** allocate a new object with 11 arguments.
3076 */
3077template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
3078PyObject* construct( PyTypeObject* subType, PyObject* args )
3079{
3080 typedef typename ShadowTraits::TCppClass TCppClass;
3081 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3082 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3083 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3084 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3085 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3086 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3087 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3088 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3089 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3090 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3091 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3092 typedef ArgumentTraits< P10 > TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
3093 typedef ArgumentTraits< P11 > TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
3094
3095
3096 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 ) != 0 )
3097 {
3098 return 0;
3099 }
3100
3101 try
3102 {
3103 TCppClassPtr cppObject;
3104 {
3105 UnblockThreads LASS_UNUSED(unlock);
3106 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11) ));
3107 }
3108 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3109 forceObjectType(result, subType);
3110 result->ob_type = subType;
3111 return fromSharedPtrToNakedCast(result);
3112 }
3113 LASS_PYTHON_CATCH_AND_RETURN
3114}
3115
3116/** allocate a new object with 12 arguments.
3117 */
3118template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
3119PyObject* construct( PyTypeObject* subType, PyObject* args )
3120{
3121 typedef typename ShadowTraits::TCppClass TCppClass;
3122 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3123 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3124 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3125 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3126 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3127 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3128 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3129 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3130 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3131 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3132 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3133 typedef ArgumentTraits< P10 > TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
3134 typedef ArgumentTraits< P11 > TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
3135 typedef ArgumentTraits< P12 > TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
3136
3137
3138 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12 ) != 0 )
3139 {
3140 return 0;
3141 }
3142
3143 try
3144 {
3145 TCppClassPtr cppObject;
3146 {
3147 UnblockThreads LASS_UNUSED(unlock);
3148 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12) ));
3149 }
3150 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3151 forceObjectType(result, subType);
3152 result->ob_type = subType;
3153 return fromSharedPtrToNakedCast(result);
3154 }
3155 LASS_PYTHON_CATCH_AND_RETURN
3156}
3157
3158/** allocate a new object with 13 arguments.
3159 */
3160template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
3161PyObject* construct( PyTypeObject* subType, PyObject* args )
3162{
3163 typedef typename ShadowTraits::TCppClass TCppClass;
3164 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3165 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3166 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3167 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3168 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3169 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3170 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3171 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3172 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3173 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3174 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3175 typedef ArgumentTraits< P10 > TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
3176 typedef ArgumentTraits< P11 > TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
3177 typedef ArgumentTraits< P12 > TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
3178 typedef ArgumentTraits< P13 > TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
3179
3180
3181 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13 ) != 0 )
3182 {
3183 return 0;
3184 }
3185
3186 try
3187 {
3188 TCppClassPtr cppObject;
3189 {
3190 UnblockThreads LASS_UNUSED(unlock);
3191 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13) ));
3192 }
3193 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3194 forceObjectType(result, subType);
3195 result->ob_type = subType;
3196 return fromSharedPtrToNakedCast(result);
3197 }
3198 LASS_PYTHON_CATCH_AND_RETURN
3199}
3200
3201/** allocate a new object with 14 arguments.
3202 */
3203template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
3204PyObject* construct( PyTypeObject* subType, PyObject* args )
3205{
3206 typedef typename ShadowTraits::TCppClass TCppClass;
3207 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3208 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3209 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3210 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3211 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3212 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3213 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3214 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3215 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3216 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3217 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3218 typedef ArgumentTraits< P10 > TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
3219 typedef ArgumentTraits< P11 > TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
3220 typedef ArgumentTraits< P12 > TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
3221 typedef ArgumentTraits< P13 > TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
3222 typedef ArgumentTraits< P14 > TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
3223
3224
3225 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14 ) != 0 )
3226 {
3227 return 0;
3228 }
3229
3230 try
3231 {
3232 TCppClassPtr cppObject;
3233 {
3234 UnblockThreads LASS_UNUSED(unlock);
3235 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14) ));
3236 }
3237 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3238 forceObjectType(result, subType);
3239 result->ob_type = subType;
3240 return fromSharedPtrToNakedCast(result);
3241 }
3242 LASS_PYTHON_CATCH_AND_RETURN
3243}
3244
3245/** allocate a new object with 15 arguments.
3246 */
3247template <typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
3248PyObject* construct( PyTypeObject* subType, PyObject* args )
3249{
3250 typedef typename ShadowTraits::TCppClass TCppClass;
3251 typedef typename ShadowTraits::TCppClassPtr TCppClassPtr;
3252 typedef typename ShadowTraits::TPyClassPtr TPyClassPtr;
3253 typedef ArgumentTraits< P1 > TArg1; typedef typename TArg1::TStorage S1; S1 p1 = S1();
3254 typedef ArgumentTraits< P2 > TArg2; typedef typename TArg2::TStorage S2; S2 p2 = S2();
3255 typedef ArgumentTraits< P3 > TArg3; typedef typename TArg3::TStorage S3; S3 p3 = S3();
3256 typedef ArgumentTraits< P4 > TArg4; typedef typename TArg4::TStorage S4; S4 p4 = S4();
3257 typedef ArgumentTraits< P5 > TArg5; typedef typename TArg5::TStorage S5; S5 p5 = S5();
3258 typedef ArgumentTraits< P6 > TArg6; typedef typename TArg6::TStorage S6; S6 p6 = S6();
3259 typedef ArgumentTraits< P7 > TArg7; typedef typename TArg7::TStorage S7; S7 p7 = S7();
3260 typedef ArgumentTraits< P8 > TArg8; typedef typename TArg8::TStorage S8; S8 p8 = S8();
3261 typedef ArgumentTraits< P9 > TArg9; typedef typename TArg9::TStorage S9; S9 p9 = S9();
3262 typedef ArgumentTraits< P10 > TArg10; typedef typename TArg10::TStorage S10; S10 p10 = S10();
3263 typedef ArgumentTraits< P11 > TArg11; typedef typename TArg11::TStorage S11; S11 p11 = S11();
3264 typedef ArgumentTraits< P12 > TArg12; typedef typename TArg12::TStorage S12; S12 p12 = S12();
3265 typedef ArgumentTraits< P13 > TArg13; typedef typename TArg13::TStorage S13; S13 p13 = S13();
3266 typedef ArgumentTraits< P14 > TArg14; typedef typename TArg14::TStorage S14; S14 p14 = S14();
3267 typedef ArgumentTraits< P15 > TArg15; typedef typename TArg15::TStorage S15; S15 p15 = S15();
3268
3269
3270 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>( args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15 ) != 0 )
3271 {
3272 return 0;
3273 }
3274
3275 try
3276 {
3277 TCppClassPtr cppObject;
3278 {
3279 UnblockThreads LASS_UNUSED(unlock);
3280 cppObject = TCppClassPtr(new TCppClass( TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15) ));
3281 }
3282 const TPyClassPtr result = ShadowTraits::buildObject(cppObject);
3283 forceObjectType(result, subType);
3284 result->ob_type = subType;
3285 return fromSharedPtrToNakedCast(result);
3286 }
3287 LASS_PYTHON_CATCH_AND_RETURN
3288}
3289
3290
3291
3292
3293// --- explicit resolver ---------------------------------------------------------------------------
3294
3295template <typename ShadowTraits, typename R, typename... P>
3296struct ExplicitResolver
3297{
3298 static PyObject* callFunction(PyObject* args, R(*iFunction)(P...))
3299 {
3300 return ::lass::python::impl::callFunction<R, P...>(args, iFunction);
3301 }
3302 template <typename C> static PyObject* callMethod(PyObject* args, PyObject* object, R(C::* method)(P...))
3303 {
3304 return CallMethod<ShadowTraits>::call(args, object, method);
3305 }
3306 template <typename C> static PyObject* callMethod(PyObject* args, PyObject* object, R(C::* method)(P...) const)
3307 {
3308 return CallMethod<ShadowTraits>::call(args, object, method);
3309 }
3310 static PyObject* callFreeMethod(PyObject* args, PyObject* object, R(*freeMethod)(P...))
3311 {
3312 return CallMethod<ShadowTraits>::callFree(args, object, freeMethod);
3313 }
3314 static PyObject* callConstructor(PyTypeObject* subType, PyObject* args)
3315 {
3316 return construct<ShadowTraits, P...>(subType, args);
3317 }
3318};
3319
3320// unwrap TypeTuple
3321template <typename ShadowTraits, typename R, typename... P>
3322struct ExplicitResolver<ShadowTraits, R, lass::meta::TypeTuple<P...>>:
3323 public ExplicitResolver<ShadowTraits, R, P...>
3324{
3325};
3326
3327// unwrap TypeList element per element
3328// current Head always comes behind already unwrapped elements
3329template <typename ShadowTraits, typename R, typename Head, typename Tail, typename... P>
3330struct ExplicitResolver<ShadowTraits, R, lass::meta::TypeList<Head, Tail>, P...> :
3331 public ExplicitResolver<ShadowTraits, R, Tail, P..., Head>
3332{
3333};
3334
3335// unwrap NullType as an empty TypeList
3336template <typename ShadowTraits, typename R, typename... P>
3337struct ExplicitResolver<ShadowTraits, R, lass::meta::NullType, P...>:
3338 public ExplicitResolver<ShadowTraits, R, P...>
3339{
3340};
3341
3342}
3343
3344}
3345
3346}
3347
3348#if LASS_COMPILER_TYPE == LASS_COMPILER_TYPE_MSVC
3349# pragma warning(pop)
3350#endif
3351
3352#endif
3353
3354// EOF
PyObject * fromSharedPtrToNakedCast(const util::SharedPtr< T, PyObjectStorage, PyObjectCounter > &object)
fromSharedPtrToNakedCast.
Comprehensive C++ to Python binding library.
Library for Assembled Shared Sources.
Definition config.h:53
PyObject * callFunction(PyObject *args, R(*function)())
calls C++ function without arguments
PyObject * construct(PyTypeObject *subType, PyObject *args)
allocate a new object with default constructor.
PyObject * establishMagicalBackLinks(PyObject *result, PyObject *self)
Here, we try to fix some lifetime issues to guarantee some lifetime requirements on self.
calls the actual function with provided parameters, and returns result as a PyObject pointer.