Library of Assembled Shared Sources
Loading...
Searching...
No Matches
pyobject_macros.h
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_macros.tmpl.h
5
* by param_expander.py on Wed Sep 23 23:11:00 2026.
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-2026 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
// convention for names of macro arguments:
51
//
52
// i_foo: must be an identifier (bar is an identifier, spam::bar is not)
53
// s_foo: must be a string literal ("bar" is a string literal, bar is not)
54
// t_foo: must be an declared type and may be qualified (could be spam::Bar<Ham>)
55
// o_foo: must be an existing object (could be spam::bar if spam::bar exists as object)
56
// f_foo: must be a declared function (could be spam::bar if spam::bar(...) is declared as function)
57
58
#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_MACROS_H
59
#define LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_MACROS_H
60
61
#include "
pyobject_call.inl
"
62
#include "
module_definition.h
"
63
#include "
../meta/is_member.h
"
64
#include "
../meta/is_charptr.h
"
65
66
/** @defgroup PythonMacroName Python Macro Name Conventions
67
* @ingroup Python
68
*
69
* Every export macro is composed as:
70
*
71
* ```
72
* PY_<scope>_[FREE_]<kind>[_R|_RW][_QUALIFIED|_CAST][_NAME][_DOC][_<N>]
73
* PY_<scope>_[FREE_]<kind>[_R|_RW][_QUALIFIED|_CAST]_EX[_<N>]
74
* ```
75
*
76
* where `<scope>` is `MODULE` or `CLASS`, and `<kind>` is `FUNCTION`, `METHOD`, `STATIC_METHOD`
77
* `MEMBER`, `PUBLIC_MEMBER`, `CONSTRUCTOR`, `INNER_CLASS`, ...
78
*
79
* Every element is optional and they always appear in this order. So
80
* `PY_CLASS_FREE_MEMBER_RW_NAME_DOC` parses as *class scope, free function form, property,
81
* read/write, custom name, with docstring.*.
82
*
83
* @par Macro Parameter Prefixes
84
*
85
* The macro parameters use Hungarian prefixes to tell you what is expected of the argument:
86
*
87
* - `t_`: The argument must be a type, and may be qualified with namespaces, like `std::string`.
88
* - `i_`: The argument must be a valid identifier. It cannot be qualified. This is often required
89
* when the identifier must be concatenated to create a unique name.
90
*
91
* - If this argument must also name a type, you must invoke the macro in the correct
92
* namespace, or use a typedef or alias to name the type.
93
* - If this argument must name a class method, just name the method. The class will be
94
* prepended.
95
* - `f_`: The argument must be a function pointer, and may be qualified. It may even be a
96
* std::function.
97
* - `s_`: A null-terminated string literal. `"spam"` is a string literal, `spam` is not.
98
* If `nullptr` is allowed, this will be documented.
99
* - `v_`: some value like an int, float, ...
100
* - `o_`: some existing object.
101
*
102
* @par Name, Docstring, and Dispatcher Name
103
*
104
* Nearly all export macros take common suffixes to add an optional custom Python name or
105
* docstring. They all forward to the `_EX` variant that provides full control over the parameters
106
* and the dispatcher name.
107
*
108
* At the class scope, the `_EX` form is unique in that it allows you to pass fully qualified
109
* class names, which the other forms cannot since they build the dispatcher name from it.
110
*
111
* Normally, you will not be using this `_EX` variant, but one of the top four:
112
*
113
* | Suffix | Adds parameters | Use for ... | Example |
114
* |-------------|-----------------------------------|-------------------------------------|-------------------------------|
115
* | - | - | Python name = C++ name | `PY_MODULE_FUNCTION` |
116
* | `_NAME` | `s_name` | Custom Python name | `PY_MODULE_FUNCTION_NAME` |
117
* | `_DOC` | `s_doc` | With docstring | `PY_MODULE_FUNCTION_DOC` |
118
* | `_NAME_DOC` | `s_name`, `s_doc` | Custom Python name + Docstring | `PY_MODULE_FUNCTION_NAME_DOC` |
119
* | `_EX` | `s_name`, `s_doc`, `i_dispatcher` | Custom dispatcher / Qualified class | `PY_MODULE_FUNCTION_EX` |
120
*
121
* Examples:
122
*
123
* ```cpp
124
* void spam(int a);
125
*
126
* PY_MODULE_FUNCTION (foo, spam) // foo.spam
127
* PY_MODULE_FUNCTION_DOC (foo, spam, "eat it") // foo.spam, documented
128
* PY_MODULE_FUNCTION_NAME (foo, spam, "eggs") // foo.eggs
129
* PY_MODULE_FUNCTION_NAME_DOC(foo, spam, "eggs", "eat it") // foo.eggs, documented
130
* PY_MODULE_FUNCTION_EX (foo, spam, "eggs", "eat it", dsp) // ... + explicit dispatcher
131
* ```
132
*
133
* @par Qualifying Overloaded Signatures
134
*
135
* Macros for exporting functions also come in variants to fully qualify the function signature to
136
* disambiguate overloaded functions, by adding the return type (except for constructors) and all
137
* parameter types.
138
*
139
* The list of parameter types can be passed as a single lass::meta::TypeTuple, or as individual
140
* arguments. For the latter, the `_<N>` tells the number of arguments.
141
*
142
* The `_<N>` form is the most often used one, and simply packs its types into a `TypeTuple`
143
*
144
* | Form | Adds parameters | Example |
145
* |--------------------|-----------------------------|--------------------------------------|
146
* | `_QUALIFIED` | one lass::meta::TypeTuple | `PY_MODULE_FUNCTION_QUALIFIED` |
147
* | `_QUALIFIED_<N>` | `N` loose types, `N` = 0…15 | `PY_MODULE_FUNCTION_QUALIFIED_2` |
148
*
149
* Examples:
150
*
151
* ```cpp
152
* double spam(int a, float b);
153
* void spam(const std::string& c);
154
*
155
* PY_MODULE_FUNCTION_QUALIFIED_2(foo, spam, double, int, float)
156
* PY_MODULE_FUNCTION_QUALIFIED_1(foo, spam, void, const std::string&)
157
* ```
158
*
159
* They combine with the `_NAME` and `_DOC` suffixes, with the `s_name`, `s_doc`, `i_dispatcher`
160
* arguments following the function return and parameter types:
161
*
162
* | Suffix | Use for ... | Example |
163
* |---------------------------|--------------------------------|-------------------------------------------|
164
* | `_QUALIFIED_<N>` | Python name = C++ name | `PY_MODULE_FUNCTION_QUALIFIED_2` |
165
* | `_QUALIFIED_NAME_<N>` | Custom Python name | `PY_MODULE_FUNCTION_QUALIFIED_NAME_2` |
166
* | `_QUALIFIED_DOC_<N>` | With docstring | `PY_MODULE_FUNCTION_QUALIFIED_DOC_2` |
167
* | `_QUALIFIED_NAME_DOC_<N>` | Custom Python name + Docstring | `PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2` |
168
* | `_QUALIFIED_EX_<N>` | Full control | `PY_MODULE_FUNCTION_QUALIFIED_EX_2` |
169
*/
170
171
// --- modules -------------------------------------------------------------------------------------
172
173
/** @defgroup PyModuleDeclaration Module Declaration Macros
174
* @ingroup ModuleDefinition
175
*
176
* These macros declare and define ModuleDefinition objects that represent Python modules.
177
* They create the fundamental module object that serves as the container for all exported
178
* functions, classes, and constants.
179
*/
180
181
/** @brief Declare and define a ModuleDefinition object representing a Python module.
182
* @ingroup PyModuleDeclaration
183
*
184
* Creates a ModuleDefinition instance that can be used to build a Python module
185
* with the specified name and documentation.
186
*
187
* @param i_module Unscoped identifier of the module, used as C++ variable name
188
* @param s_name Python module name (const char* string, will be copied)
189
* @param s_doc module docstring (const char* string, will be copied), or nullptr
190
*
191
* @par Example
192
* ```cpp
193
* PY_DECLARE_MODULE_NAME_DOC(mod_mymodule, "mymodule", "My module with awesome things")
194
* ```
195
*/
196
#define PY_DECLARE_MODULE_NAME_DOC( i_module, s_name, s_doc ) \
197
::lass::python::ModuleDefinition i_module( s_name, s_doc );
198
199
/** @brief Declare a module with name only (no documentation).
200
* @ingroup PyModuleDeclaration
201
*
202
* Wraps PY_DECLARE_MODULE_NAME_DOC() with @a s_doc = `nullptr`.
203
*
204
* @param i_module Unscoped identifier of the module, used as C++ variable name
205
* @param s_name Python module name (const char* string, will be copied)
206
*
207
* @par Example
208
* ```cpp
209
* PY_DECLARE_MODULE_NAME(mod_mymodule, "mymodule")
210
* ```
211
*/
212
#define PY_DECLARE_MODULE_NAME( i_module, s_name ) \
213
PY_DECLARE_MODULE_NAME_DOC( i_module, s_name, 0)
214
215
/** @brief Declare a module with documentation, using the identifier as the module name.
216
* @ingroup PyModuleDeclaration
217
*
218
* Wraps PY_DECLARE_MODULE_NAME_DOC() @a with s_name derived from @a i_module.
219
*
220
* @param i_module Unscoped identifier of the module, used as C++ variable and Python module name
221
* @param s_doc Module documentation string (const char* string, will be copied), or nullptr
222
*
223
* @par Example
224
* ```cpp
225
* PY_DECLARE_MODULE_DOC(mymodule, "My module with awesome things")
226
* ```
227
*/
228
#define PY_DECLARE_MODULE_DOC( i_module, s_doc ) \
229
PY_DECLARE_MODULE_NAME_DOC( i_module, LASS_STRINGIFY(i_module), s_doc)
230
231
/** @brief Declare a module with minimal setup (name derived from identifier, no documentation).
232
* @ingroup PyModuleDeclaration
233
*
234
* Wraps PY_DECLARE_MODULE_NAME_DOC() with defaults.
235
*
236
* @param i_module Unscoped identifier of the module, used as C++ variable and Python module name
237
*
238
* @par Example
239
* ```cpp
240
* PY_DECLARE_MODULE(mymodule)
241
* ```
242
*/
243
#define PY_DECLARE_MODULE( i_module ) \
244
PY_DECLARE_MODULE_NAME_DOC( i_module, LASS_STRINGIFY(i_module), 0)
245
246
247
248
/** @defgroup PyModuleEntrypoint Module Entrypoint and Injection Macros
249
* @ingroup ModuleDefinition
250
*
251
* These macros handle module initialization, injection, and extension module creation. They manage
252
* the Python module lifecycle from creation to registration with the Python interpreter.
253
*
254
* If you're building a Python extension module (a .pyd or .so file), you will typically use
255
* the entrypoint macros to create the required `PyInit_*` function that Python calls:
256
* ```cpp
257
* // Declare module
258
* PY_DECLARE_MODULE_DOC(mymodule, "My example module")
259
*
260
* // Add functions and classes
261
* // ...
262
*
263
* // Create module entrypoint for Python extension
264
* PY_MODULE_ENTRYPOINT(mymodule)
265
* ```
266
*
267
* The injection macros are more low-level and can be used to create modules at runtime to be
268
* registered with an embedded Python interpreter.
269
*/
270
271
/** @brief Create a `PyInit_*` Python module initialization function with custom name.
272
* @ingroup PyModuleEntrypoint
273
*
274
* Generates the `PyInit_*` function required for Python extension modules. This function will be
275
* called by Python when the module is imported.
276
*
277
* @param i_module Module identifier declared with `PY_DECLARE_MODULE_*`
278
* @param i_name Name for the initialization function (`PyInit_<i_name>` will be generated)
279
* Must be the same as your modoule name
280
*
281
* @par Example
282
* ```cpp
283
* PY_DECLARE_MODULE_NAME(mod_mymodule, "mymodule")
284
* // ...
285
* PY_MODULE_ENTRYPOINT_NAME(mod_mymodule, mymodule) // generates PyInit_mymodule()
286
* ```
287
*/
288
#define PY_MODULE_ENTRYPOINT_NAME( i_module, i_name ) \
289
PyMODINIT_FUNC LASS_CONCATENATE(PyInit_, i_name)() { return i_module.inject(); }
290
291
/** @brief Create a Python module initialization function using the module identifier as the name.
292
* @ingroup PyModuleEntrypoint
293
*
294
* Wraps PY_MODULE_ENTRYPOINT_NAME() with @a i_name = @a i_module.
295
*
296
* @param i_module Module identifier (used for both module reference and function name)
297
*
298
* @par Example
299
* ```cpp
300
* PY_DECLARE_MODULE(mymodule)
301
* // ...
302
* PY_MODULE_ENTRYPOINT(mymodule) // generates PyInit_mymodule()
303
* ```
304
*/
305
#define PY_MODULE_ENTRYPOINT( i_module ) PY_MODULE_ENTRYPOINT_NAME( i_module, i_module )
306
307
/** @brief Inject a Python module so Python becomes aware of it.
308
* @ingroup PyModuleEntrypoint
309
*
310
* Creates the actual Python module object with all accumulated definitions (functions, classes,
311
* enums, constants). This should be done at runtime, typically in your `main()` function or
312
* during Python initialization.
313
*
314
* @note This is a specialist function for embedding modules instead of writing extension modules.
315
*
316
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
317
* @return A new reference to the Python module object, or `nullptr` on error (with Python
318
* exception set)
319
*
320
* @par Example
321
* ```cpp
322
* LASS_ASSERT(Py_IsInitialized());
323
* LockGIL lock;
324
* TPyObjPtr mod(PY_INJECT_MODULE(mymodule));
325
* if (mod)
326
* {
327
* PyObject* sysmodules = PyImport_GetModuleDict();
328
* PyDict_SetItemString(sysmodules, "mymodule", mod);
329
* }
330
* // now you can run `import mymodule`
331
* ```
332
*/
333
#define PY_INJECT_MODULE( i_module )\
334
i_module.inject();
335
336
/** @brief Inject a module with name and documentation override.
337
* @ingroup PyModuleEntrypoint
338
*
339
* @deprecated Use PY_DECLARE_MODULE_NAME_DOC and PY_INJECT_MODULE instead
340
*/
341
#define PY_INJECT_MODULE_EX( i_module, s_moduleName, s_doc ) \
342
i_module.setName(s_moduleName); \
343
i_module.setDoc(s_doc); \
344
i_module.inject();
345
346
/** @brief Inject a module with name override.
347
* @ingroup PyModuleEntrypoint
348
*
349
* @deprecated Use PY_DECLARE_MODULE_NAME and PY_INJECT_MODULE instead
350
*/
351
#define PY_INJECT_MODULE_NAME( i_module, s_moduleName )\
352
i_module.setName(s_moduleName); \
353
i_module.inject();
354
355
/** @brief Inject a module with documentation override.
356
* @ingroup PyModuleEntrypoint
357
*
358
* @deprecated Use PY_DECLARE_MODULE_DOC and PY_INJECT_MODULE instead
359
*/
360
#define PY_INJECT_MODULE_DOC( i_module, s_doc )\
361
i_module.setDoc(s_doc);\
362
i_module.inject();
363
364
365
366
/** @ingroup PyModuleEntrypoint
367
* Inject a python module so Python is aware of it and produce all necessary code so a
368
* module can be used as extension of Python. A limitation in comparison with embedded
369
* modules is that the name of the module cannot be changed anymore upon injection.
370
*
371
* @param i_module
372
* the identifier of a module declared by PY_DECLARE_MODULE
373
* @param f_injection
374
* the function that will inject all the classes for this module
375
* @param s_doc
376
* documentation of module as shown in Python (zero terminated C string)
377
*/
378
#define PY_EXTENSION_MODULE_EX( i_module, f_injection, s_doc ) \
379
extern "C" __declspec(dllexport)\
380
void LASS_CONCATENATE(init, i_module) () {\
381
PY_INJECT_MODULE_EX(i_module, const_cast<char*>( LASS_STRINGIFY(i_module) ), s_doc);\
382
f_injection ();\
383
}
384
385
/** @ingroup PyModuleEntrypoint
386
* Create an extension module with documentation.
387
* Wraps PY_EXTENSION_MODULE_EX() with @a s_doc parameter.
388
*
389
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
390
* @param f_injection Injection function to call during module creation
391
* @param s_doc Module documentation string (const char* string with static storage duration)
392
*/
393
#define PY_EXTENSION_MODULE_DOC( i_module, f_injection, s_doc )\
394
PY_EXTENSION_MODULE_EX( i_module, f_injection, s_doc)
395
396
/** @ingroup PyModuleEntrypoint
397
* Create an extension module (no documentation).
398
* Wraps PY_EXTENSION_MODULE_EX() with @a s_doc = `nullptr`.
399
*
400
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
401
* @param f_injection Injection function to call during module creation
402
*/
403
#define PY_EXTENSION_MODULE( i_module, f_injection )\
404
PY_EXTENSION_MODULE_EX( i_module, f_injection, 0)
405
406
407
// --- module variables ----------------------------------------------------------------------------
408
409
/** @defgroup ModuleMembers Module Constants and Objects Macros
410
* @ingroup ModuleDefinition
411
*
412
* These macros add constants, variables, and arbitrary Python objects to modules.
413
* They provide different approaches for exposing C++ values and objects to Python.
414
*/
415
416
/** @brief Add an integer constant to a Python module.
417
* @ingroup ModuleMembers
418
*
419
* The constant will be added to the module during module creation (at injection time).
420
* This is executed before main(), so the constant is available when the module is created.
421
*
422
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
423
* @param s_name Python name of constant (const char* string with static storage duration)
424
* @param s_value Integer value of the constant (long)
425
*
426
* @par Example
427
* ```cpp
428
* PY_MODULE_INTEGER_CONSTANT(mymodule, "ANSWER", 42) // mymodule.ANSWER == 42
429
* ```
430
*/
431
#define PY_MODULE_INTEGER_CONSTANT( i_module, s_name, s_value )\
432
LASS_EXECUTE_BEFORE_MAIN_EX\
433
( LASS_CONCATENATE( lassExecutePyModuleIntegerConstant_, i_module),\
434
i_module.addLong( s_value, s_name); )
435
436
437
438
/** @brief Add a string constant to a Python module.
439
* @ingroup ModuleMembers
440
*
441
* The constant will be added to the module during module creation (at injection time).
442
* This is executed before main(), so the constant is available when the module is created.
443
*
444
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
445
* @param s_name Python name of constant (const char* string with static storage duration)
446
* @param s_value String value of the constant (const char* string with static storage duration)
447
*
448
* @par Example
449
* ```cpp
450
* PY_MODULE_STRING_CONSTANT(mymodule, "GREETING", "hello") // mymodule.GREETING == "hello"
451
* ```
452
*/
453
#define PY_MODULE_STRING_CONSTANT( i_module, s_name, s_value )\
454
LASS_EXECUTE_BEFORE_MAIN_EX\
455
( LASS_CONCATENATE( lassExecutePyModuleIntegerConstant_, i_module),\
456
i_module.addString( s_value, s_name); )
457
458
459
460
/** @brief Inject an arbitrary object into an already created module at runtime.
461
* @ingroup ModuleMembers
462
*
463
* This performs immediate injection into the module namespace, unlike the `PY_MODULE_*_CONSTANT`
464
* macros which defer injection until module creation.
465
*
466
* Must be called after the module has been injected with PY_INJECT_MODULE.
467
*
468
* @param o_object Object/variable to be injected (will be converted to Python object)
469
* @param i_module Module identifier of an already injected module
470
* @param s_objectName Python name of object (const char* string with static storage duration)
471
*
472
* @note This macro must be invoked after the module has been created. It's best to place this in
473
* a postInject function as shown in the example below. The postInject function gets the
474
* module object as a parameter, but don't use that if you want the Lass stubgen tool to
475
* work correctly. Work on the module definition instead (the one you created with
476
* PY_DECLARE_MODULE()).
477
*
478
* @par Example
479
* ```cpp
480
* PY_DECLARE_MODULE( mymodule )
481
* void mymodule_postinject(PyObject*)
482
* {
483
* PY_INJECT_OBJECT_IN_MODULE_EX(spam, mymodule, "SPAM") // mymodule.SPAM
484
* }
485
* LASS_EXECUTE_BEFORE_MAIN( mymodule.setPostInject(mymodule_postinject); )
486
* PY_MODULE_ENTRYPOINT( mymodule)
487
* ```
488
*/
489
#define PY_INJECT_OBJECT_IN_MODULE_EX( o_object, i_module, s_objectName )\
490
{\
491
i_module.injectObject( o_object, s_objectName );\
492
}
493
494
/** @brief Inject an object using its C++ identifier as the Python name.
495
* @ingroup ModuleMembers
496
*
497
* Wraps PY_INJECT_OBJECT_IN_MODULE_EX() with @a s_objectName derived from @a o_object.
498
*
499
* @param o_object Object/variable to be injected (name will be used as Python name)
500
* @param i_module Module identifier of an already injected module
501
*
502
* @note This macro must be invoked after the module has been created. It's best to place this in
503
* a postInject function as shown in the example below. The postInject function gets the
504
* module object as a parameter, but don't use that if you want the Lass stubgen tool to
505
* work correctly. Work on the module definition instead (the one you created with
506
* PY_DECLARE_MODULE()).
507
*
508
* @par Example
509
* ```cpp
510
* PY_DECLARE_MODULE( mymodule )
511
* void mymodule_postinject(PyObject*)
512
* {
513
* PY_INJECT_OBJECT_IN_MODULE(spam, mymodule) // mymodule.spam
514
* }
515
* LASS_EXECUTE_BEFORE_MAIN( mymodule.setPostInject(mymodule_postinject); )
516
* PY_MODULE_ENTRYPOINT( mymodule)
517
* ```
518
*/
519
#define PY_INJECT_OBJECT_IN_MODULE( o_object, i_module )\
520
PY_INJECT_OBJECT_IN_MODULE_EX(o_object, i_module, LASS_STRINGIFY(o_object))
521
522
523
524
/** @brief Inject an integer constant into an already created module at runtime.
525
* @ingroup ModuleMembers
526
*
527
* This performs immediate injection, unlike PY_MODULE_INTEGER_CONSTANT which
528
* registers the constant for inclusion during module creation.
529
*
530
* @param i_module Module identifier of an already injected module
531
* @param s_name Python name of constant (const char* string with static storage duration)
532
* @param v_value Integer value of the constant (long)
533
*
534
* @note This macro must be invoked after the module has been created. It's best to place this in
535
* a postInject function as shown in the example below. The postInject function gets the
536
* module object as a parameter, but don't use that if you want the Lass stubgen tool to
537
* work correctly. Work on the module definition instead (the one you created with
538
* PY_DECLARE_MODULE()).
539
*
540
* @par Example
541
* ```cpp
542
* PY_DECLARE_MODULE( mymodule )
543
* void mymodule_postinject(PyObject*)
544
* {
545
* PY_MODULE_ADD_INTEGER_CONSTANT(mymodule, "ANSWER", 42) // mymodule.ANSWER == 42
546
* }
547
* LASS_EXECUTE_BEFORE_MAIN( mymodule.setPostInject(mymodule_postinject); )
548
* PY_MODULE_ENTRYPOINT( mymodule)
549
* ```
550
*/
551
#define PY_MODULE_ADD_INTEGER_CONSTANT( i_module, s_name, v_value )\
552
{\
553
i_module.injectLong(s_name, v_value);\
554
}
555
556
557
558
/** @brief Inject a string constant into an already created module at runtime.
559
* @ingroup ModuleMembers
560
*
561
* This performs immediate injection, unlike PY_MODULE_STRING_CONSTANT which
562
* registers the constant for inclusion during module creation.
563
*
564
* @param i_module Module identifier of an already injected module
565
* @param s_name Python name of constant (const char* string with static storage duration)
566
* @param s_value String value of the constant (const char* string with static storage duration)
567
*
568
* @note This macro must be invoked after the module has been created. It's best to place this in
569
* a postInject function as shown in the example below. The postInject function gets the
570
* module object as a parameter, but don't use that if you want the Lass stubgen tool to
571
* work correctly. Work on the module definition instead (the one you created with
572
* PY_DECLARE_MODULE()).
573
*
574
* @par Example
575
* ```cpp
576
* PY_DECLARE_MODULE( mymodule )
577
* void mymodule_postinject(PyObject*)
578
* {
579
* PY_MODULE_ADD_STRING_CONSTANT(mymodule, "GREETING", "hello") // mymodule.GREETING == "hello"
580
* }
581
* LASS_EXECUTE_BEFORE_MAIN( mymodule.setPostInject(mymodule_postinject); )
582
* PY_MODULE_ENTRYPOINT( mymodule)
583
* ```
584
*/
585
#define PY_MODULE_ADD_STRING_CONSTANT( i_module, s_name, s_value )\
586
{\
587
i_module.injectString(s_name, s_value);\
588
}
589
590
591
592
// --- free module functions -----------------------------------------------------------------------
593
594
/** @defgroup ModuleFunctions Module Function Macros
595
* @ingroup ModuleDefinition
596
*
597
* These macros export C++ functions to a Python and add them to a Python module.
598
* All macros take a ModuleDefinition as first argument.
599
*
600
* @note For stubgen to work correctly, these macros should be called in the same translation unit
601
* (source file) that declares the module with PY_DECLARE_MODULE_NAME_DOC or similar.
602
*
603
* There are two sets of macros:
604
* - Simple macros in case there's no ambiguity what C++ function is being exported
605
* - Qualified macros that help to disambigue an overloaded C++ function.
606
*/
607
608
609
/** @ingroup ModuleFunctions
610
* Export a C++ function to Python without automatic wrapper generation (deprecated)
611
*
612
* Use this macro for backward compatibility when wrapper functions don't need to be automatically
613
* generated or you want specific Python behavior.
614
*
615
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
616
* @param f_cppFunction C++ function to export (must already be a PyCFunction)
617
* @param s_functionName Python function name
618
* @param s_doc Function documentation string
619
*
620
* @deprecated Use PY_MODULE_FUNCTION_EX instead for automatic wrapper generation
621
*/
622
#define PY_MODULE_PY_FUNCTION_EX( i_module, f_cppFunction, s_functionName, s_doc )\
623
static PyCFunction LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ) = 0;\
624
LASS_EXECUTE_BEFORE_MAIN_EX\
625
( LASS_CONCATENATE_3( lassExecutePyModulePyFunction_, i_module, f_cppFunction ),\
626
i_module.addFunctionDispatcher( \
627
f_cppFunction, s_functionName, s_doc, \
628
LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ) \
629
);\
630
)
631
632
/** @addtogroup ModuleFunctions
633
* @name Simple Function Export Macros
634
*
635
* These macros export C++ functions to Python with automatic type deduction and wrapper
636
* generation. Use these for simple function exports where overloading is not an issue and
637
* automatic type deduction is sufficient.
638
*
639
* The basic form is:
640
*
641
* ```cpp
642
* PY_MODULE_FUNCTION( i_module, f_cppFunction )
643
* ```
644
*
645
* with:
646
* - @a i_module : Module identifier declared by `PY_DECLARE_MODULE_*`
647
* - @a f_cppFunction : C++ function to export
648
*
649
* @par Example
650
*
651
* ```cpp
652
* void spam(int a);
653
* PY_DECLARE_MODULE(foo)
654
* PY_MODULE_FUNCTION(foo, spam) // foo.spam(42)
655
* ```
656
*
657
* @par Common suffixes
658
*
659
* The `_NAME`, `_DOC` and `_EX` suffixes allow you to specify a custom Python name, docstring, or
660
* (in rare cases) a custom dispatcher name.
661
*
662
* | Macro | Adds parameters | Use for ... |
663
* |-------------------------------|-----------------------------------|--------------------------------|
664
* | `PY_MODULE_FUNCTION_NAME` | `s_name` | Custom Python name |
665
* | `PY_MODULE_FUNCTION_DOC` | `s_doc` | With docstring |
666
* | `PY_MODULE_FUNCTION_NAME_DOC` | `s_name`, `s_doc` | Custom Python name + Docstring |
667
* | `PY_MODULE_FUNCTION_EX` | `s_name`, `s_doc`, `i_dispatcher` | Custom dispatcher name |
668
*
669
* @par Example
670
*
671
* ```cpp
672
* void spam(int a);
673
*
674
* PY_MODULE_FUNCTION (foo, spam) // foo.spam
675
* PY_MODULE_FUNCTION_DOC (foo, spam, "eat it") // foo.spam, documented
676
* PY_MODULE_FUNCTION_NAME (foo, spam, "eggs") // foo.eggs
677
* PY_MODULE_FUNCTION_NAME_DOC(foo, spam, "eggs", "eat it") // foo.eggs, documented
678
* PY_MODULE_FUNCTION_EX (foo, spam, "eggs", "eat it", dsp) // ... + explicit dispatcher
679
* ```
680
*
681
* @par Overloading Python functions
682
*
683
* Multiple C++ functions can be exported to the same Python name, to create a Python function that
684
* is overloaded on the parameter types.
685
*
686
* @note Overload resolution uses first-fit, not best-fit like C++. The first exported
687
* overload that matches the arguments will be called.
688
*
689
* @par Example
690
*
691
* ```cpp
692
* void barA(int a);
693
* void barB(const std::string& b);
694
*
695
* PY_MODULE_FUNCTION_NAME(foo, barA, "bar") // foo.bar(123)
696
* PY_MODULE_FUNCTION_NAME(foo, barB, "bar") // foo.bar("123")
697
* ```
698
*
699
* @{
700
*/
701
702
/** @brief Export a C++ function to Python, with full control.
703
* @ingroup ModuleFunctions
704
*
705
* This is the most flexible function export macro, allowing manual dispatcher naming for creating
706
* overloaded Python functions. It should rarely be used in practice, use one of the wrappers that
707
* automatically fill in some of the parameters.
708
*
709
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
710
* @param f_cppFunction C++ function to export
711
* @param s_functionName Python function name (const char* string with static storage duration)
712
* @param s_doc Function docstring (const char* string with static storage duration), or nullptr
713
* @param i_dispatcher Unique name for the generated dispatcher (unscoped, it is concatenated)
714
*
715
* @par Example
716
*
717
* ```cpp
718
* PY_MODULE_FUNCTION_NAME_DOC(foo, doBar, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
719
* ```
720
*/
721
#define PY_MODULE_FUNCTION_EX( i_module, f_cppFunction, s_functionName, s_doc, i_dispatcher )\
722
static PyCFunction LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ) = 0;\
723
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher( PyObject* iIgnore, PyObject* iArgs )\
724
{\
725
if (LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ))\
726
{\
727
PyObject* result = LASS_CONCATENATE( pyOverloadChain_, i_dispatcher )(iIgnore, iArgs);\
728
if (!(PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError)))\
729
{\
730
return result;\
731
}\
732
PyErr_Clear();\
733
Py_XDECREF(result);\
734
}\
735
return ::lass::python::impl::callFunction( iArgs, &f_cppFunction );\
736
}\
737
LASS_EXECUTE_BEFORE_MAIN_EX\
738
( LASS_CONCATENATE_3( lassExecutePyModuleFunction_, i_module, i_dispatcher ), \
739
i_module.addFunctionDispatcher( \
740
i_dispatcher, s_functionName, s_doc, \
741
LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ) \
742
);\
743
)
744
745
/** @brief Export a C++ function to Python, with custom name and docstring.
746
* @ingroup ModuleFunctions
747
*
748
* Wraps PY_MODULE_FUNCTION_EX() with auto-generated dispatcher name.
749
*
750
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
751
* @param f_cppFunction C++ function to export
752
* @param s_name Python function name (const char* string with static storage duration)
753
* @param s_doc Function docstring (const char* string with static storage duration, or nullptr)
754
*
755
* @par Example
756
*
757
* ```cpp
758
* PY_MODULE_FUNCTION_NAME_DOC(foo, doBar, "do_bar", "Do Bar") // foo.do_bar(...)
759
* ```
760
*/
761
#define PY_MODULE_FUNCTION_NAME_DOC( i_module, f_cppFunction, s_name, s_doc )\
762
PY_MODULE_FUNCTION_EX( i_module, f_cppFunction, s_name, s_doc,\
763
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
764
765
/** @brief Export a C++ function to Python, with custom Python name.
766
* @ingroup ModuleFunctions
767
*
768
* Wraps PY_MODULE_FUNCTION_NAME_DOC() with @a s_doc = `nullptr`.
769
*
770
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
771
* @param f_cppFunction C++ function to export
772
* @param s_name Python function name (const char* string with static storage duration)
773
*
774
* @par Example
775
*
776
* ```cpp
777
* PY_MODULE_FUNCTION_NAME(foo, doBar, "do_bar") // foo.do_bar(...)
778
* ```
779
*/
780
#define PY_MODULE_FUNCTION_NAME( i_module, f_cppFunction, s_name)\
781
PY_MODULE_FUNCTION_NAME_DOC( i_module, f_cppFunction, s_name, 0)
782
783
/** @brief Export a C++ function to Python, with docstring.
784
* @ingroup ModuleFunctions
785
*
786
* Wraps PY_MODULE_FUNCTION_NAME_DOC() with @a s_name derived from @a f_cppFunction.
787
*
788
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
789
* @param f_cppFunction C++ function to export (name will be used as Python name)
790
* @param s_doc Function documentation string (const char* string with static storage duration)
791
*
792
* @par Example
793
*
794
* ```cpp
795
* PY_MODULE_FUNCTION_DOC(foo, doBar, "Do Bar") // foo.doBar(...)
796
* ```
797
*/
798
#define PY_MODULE_FUNCTION_DOC( i_module, f_cppFunction, s_doc )\
799
PY_MODULE_FUNCTION_NAME_DOC( i_module, f_cppFunction, LASS_STRINGIFY(f_cppFunction), s_doc)
800
801
/** @brief Export a C++ function to Python.
802
* @ingroup ModuleFunctions
803
*
804
* Wraps PY_MODULE_FUNCTION_NAME_DOC() with defaults.
805
*
806
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
807
* @param f_cppFunction C++ function to export (name will be used as Python name)
808
*
809
* @par Example
810
*
811
* ```cpp
812
* PY_MODULE_FUNCTION(foo, doBar) // foo.doBar(...)
813
* ```
814
*/
815
#define PY_MODULE_FUNCTION( i_module, f_cppFunction)\
816
PY_MODULE_FUNCTION_NAME_DOC( i_module, f_cppFunction, LASS_STRINGIFY(f_cppFunction), 0)
817
818
/** @} */
819
820
// --- casting free functions -----------------------------------------------------------
821
822
/** @defgroup ModuleFunctionCast Function Cast Export Macros (Deprecated)
823
* @ingroup ModuleDefinition
824
*
825
* @deprecated These macros are deprecated. Instead of using casting macros, define explicit
826
* wrapper functions with the desired signatures and export those directly using the
827
* basic function export macros.
828
*
829
* These macros export C++ functions to Python with explicit type casting and support for
830
* default parameters. They create wrapper functions that handle type conversions and
831
* allow exporting functions with default parameters by omitting trailing parameters.
832
*/
833
834
/** @ingroup ModuleFunctionCast
835
* Exports a C++ free functions to Python with on the fly casting on return type and parameters, including omission of default parameters
836
*
837
* @param i_module
838
* the module object
839
* @param f_cppFunction
840
* the name of the function in C++
841
* @param t_return
842
* the return type of @a f_cppFunction
843
* @param t_params
844
* a lass::meta::TypeTuple of the parameter types of @a f_cppFunction
845
* @param s_functionName
846
* the name the method will have in Python
847
* @param s_doc
848
* documentation of function as shown in Python (zero terminated C string)
849
* @param i_dispatcher
850
* A unique name of the static C++ dispatcher function to be generated. This name will be
851
* used for the names of automatic generated variables and functions and should be unique
852
*
853
* You can use this macro instead of PY_MODULE_FUNCTION_EX if you want to use for instance the default parameters of the C++ definition of
854
* @a f_cppFunction. This macro can also help you to resolve ambiguities althought the PY_MODULE_QUALIFIED_EX is the preferred macro for
855
* doing that.
856
*
857
* @code
858
* void bar(int a, int b=555);
859
*
860
* PY_MODULE_FUNCTION_CAST_NAME_1(foo, bar, void, int, "bar" ) // export the function with as default input for b=555
861
* PY_MODULE_FUNCTION_CAST_NAME_2(foo, bar, void, int, int, "bar" )
862
* @endcode
863
*/
864
865
866
/** @ingroup ModuleFunctionCast
867
* @deprecated Define an explicit wrapper function instead of using casting macros
868
* Export a C++ function with explicit return type casting for 0-parameter functions with full control.
869
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
870
*
871
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
872
* @param f_cppFunction C++ function to export (0 parameters)
873
* @param t_return Return type of the function (for explicit casting)
874
* @param s_functionName Python function name (const char* string with static storage duration)
875
* @param s_doc Function documentation string (const char* string with static storage duration)
876
* @param i_dispatcher Unique identifier for the function dispatcher
877
*/
878
#define PY_MODULE_FUNCTION_CAST_EX_0(i_module, f_cppFunction, t_return, s_functionName, s_doc, i_dispatcher) \
879
::lass::python::OwnerCaster<t_return>::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ()\
880
{\
881
return f_cppFunction() ; \
882
}\
883
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
884
885
886
887
/** @ingroup ModuleFunctionCast
888
* @deprecated Define an explicit wrapper function instead of using casting macros
889
* Export a C++ function with explicit type casting for 1-parameter functions with full control.
890
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
891
*
892
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
893
* @param f_cppFunction C++ function to export (1 parameters)
894
* @param t_return Return type of the function (for explicit casting)
895
* @param t_P1 Parameter types for the function (for explicit casting)
896
* @param s_functionName Python function name (const char* string with static storage duration)
897
* @param s_doc Function documentation string (const char* string with static storage duration)
898
* @param i_dispatcher Unique identifier for the function dispatcher
899
*/
900
#define PY_MODULE_FUNCTION_CAST_EX_1( i_module, f_cppFunction, t_return, t_P1, s_functionName, s_doc, i_dispatcher )\
901
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
902
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1 \
903
)\
904
{\
905
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1) );\
906
}\
907
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
908
909
/** @ingroup ModuleFunctionCast
910
* @deprecated Define an explicit wrapper function instead of using casting macros
911
* Export a C++ function with explicit type casting for 2-parameter functions with full control.
912
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
913
*
914
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
915
* @param f_cppFunction C++ function to export (2 parameters)
916
* @param t_return Return type of the function (for explicit casting)
917
* @param t_P1, t_P2 Parameter types for the function (for explicit casting)
918
* @param s_functionName Python function name (const char* string with static storage duration)
919
* @param s_doc Function documentation string (const char* string with static storage duration)
920
* @param i_dispatcher Unique identifier for the function dispatcher
921
*/
922
#define PY_MODULE_FUNCTION_CAST_EX_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, s_doc, i_dispatcher )\
923
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
924
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2 \
925
)\
926
{\
927
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2) );\
928
}\
929
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
930
931
/** @ingroup ModuleFunctionCast
932
* @deprecated Define an explicit wrapper function instead of using casting macros
933
* Export a C++ function with explicit type casting for 3-parameter functions with full control.
934
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
935
*
936
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
937
* @param f_cppFunction C++ function to export (3 parameters)
938
* @param t_return Return type of the function (for explicit casting)
939
* @param t_P1, t_P2, t_P3 Parameter types for the function (for explicit casting)
940
* @param s_functionName Python function name (const char* string with static storage duration)
941
* @param s_doc Function documentation string (const char* string with static storage duration)
942
* @param i_dispatcher Unique identifier for the function dispatcher
943
*/
944
#define PY_MODULE_FUNCTION_CAST_EX_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, s_doc, i_dispatcher )\
945
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
946
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3 \
947
)\
948
{\
949
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3) );\
950
}\
951
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
952
953
/** @ingroup ModuleFunctionCast
954
* @deprecated Define an explicit wrapper function instead of using casting macros
955
* Export a C++ function with explicit type casting for 4-parameter functions with full control.
956
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
957
*
958
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
959
* @param f_cppFunction C++ function to export (4 parameters)
960
* @param t_return Return type of the function (for explicit casting)
961
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for explicit casting)
962
* @param s_functionName Python function name (const char* string with static storage duration)
963
* @param s_doc Function documentation string (const char* string with static storage duration)
964
* @param i_dispatcher Unique identifier for the function dispatcher
965
*/
966
#define PY_MODULE_FUNCTION_CAST_EX_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, s_doc, i_dispatcher )\
967
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
968
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4 \
969
)\
970
{\
971
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4) );\
972
}\
973
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
974
975
/** @ingroup ModuleFunctionCast
976
* @deprecated Define an explicit wrapper function instead of using casting macros
977
* Export a C++ function with explicit type casting for 5-parameter functions with full control.
978
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
979
*
980
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
981
* @param f_cppFunction C++ function to export (5 parameters)
982
* @param t_return Return type of the function (for explicit casting)
983
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for explicit casting)
984
* @param s_functionName Python function name (const char* string with static storage duration)
985
* @param s_doc Function documentation string (const char* string with static storage duration)
986
* @param i_dispatcher Unique identifier for the function dispatcher
987
*/
988
#define PY_MODULE_FUNCTION_CAST_EX_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, s_doc, i_dispatcher )\
989
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
990
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5 \
991
)\
992
{\
993
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5) );\
994
}\
995
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
996
997
/** @ingroup ModuleFunctionCast
998
* @deprecated Define an explicit wrapper function instead of using casting macros
999
* Export a C++ function with explicit type casting for 6-parameter functions with full control.
1000
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1001
*
1002
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1003
* @param f_cppFunction C++ function to export (6 parameters)
1004
* @param t_return Return type of the function (for explicit casting)
1005
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for explicit casting)
1006
* @param s_functionName Python function name (const char* string with static storage duration)
1007
* @param s_doc Function documentation string (const char* string with static storage duration)
1008
* @param i_dispatcher Unique identifier for the function dispatcher
1009
*/
1010
#define PY_MODULE_FUNCTION_CAST_EX_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, s_doc, i_dispatcher )\
1011
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1012
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6 \
1013
)\
1014
{\
1015
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6) );\
1016
}\
1017
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1018
1019
/** @ingroup ModuleFunctionCast
1020
* @deprecated Define an explicit wrapper function instead of using casting macros
1021
* Export a C++ function with explicit type casting for 7-parameter functions with full control.
1022
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1023
*
1024
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1025
* @param f_cppFunction C++ function to export (7 parameters)
1026
* @param t_return Return type of the function (for explicit casting)
1027
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for explicit casting)
1028
* @param s_functionName Python function name (const char* string with static storage duration)
1029
* @param s_doc Function documentation string (const char* string with static storage duration)
1030
* @param i_dispatcher Unique identifier for the function dispatcher
1031
*/
1032
#define PY_MODULE_FUNCTION_CAST_EX_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, s_doc, i_dispatcher )\
1033
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1034
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7 \
1035
)\
1036
{\
1037
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7) );\
1038
}\
1039
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1040
1041
/** @ingroup ModuleFunctionCast
1042
* @deprecated Define an explicit wrapper function instead of using casting macros
1043
* Export a C++ function with explicit type casting for 8-parameter functions with full control.
1044
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1045
*
1046
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1047
* @param f_cppFunction C++ function to export (8 parameters)
1048
* @param t_return Return type of the function (for explicit casting)
1049
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for explicit casting)
1050
* @param s_functionName Python function name (const char* string with static storage duration)
1051
* @param s_doc Function documentation string (const char* string with static storage duration)
1052
* @param i_dispatcher Unique identifier for the function dispatcher
1053
*/
1054
#define PY_MODULE_FUNCTION_CAST_EX_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, s_doc, i_dispatcher )\
1055
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1056
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8 \
1057
)\
1058
{\
1059
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8) );\
1060
}\
1061
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1062
1063
/** @ingroup ModuleFunctionCast
1064
* @deprecated Define an explicit wrapper function instead of using casting macros
1065
* Export a C++ function with explicit type casting for 9-parameter functions with full control.
1066
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1067
*
1068
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1069
* @param f_cppFunction C++ function to export (9 parameters)
1070
* @param t_return Return type of the function (for explicit casting)
1071
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for explicit casting)
1072
* @param s_functionName Python function name (const char* string with static storage duration)
1073
* @param s_doc Function documentation string (const char* string with static storage duration)
1074
* @param i_dispatcher Unique identifier for the function dispatcher
1075
*/
1076
#define PY_MODULE_FUNCTION_CAST_EX_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, s_doc, i_dispatcher )\
1077
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1078
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9 \
1079
)\
1080
{\
1081
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9) );\
1082
}\
1083
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1084
1085
/** @ingroup ModuleFunctionCast
1086
* @deprecated Define an explicit wrapper function instead of using casting macros
1087
* Export a C++ function with explicit type casting for 10-parameter functions with full control.
1088
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1089
*
1090
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1091
* @param f_cppFunction C++ function to export (10 parameters)
1092
* @param t_return Return type of the function (for explicit casting)
1093
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for explicit casting)
1094
* @param s_functionName Python function name (const char* string with static storage duration)
1095
* @param s_doc Function documentation string (const char* string with static storage duration)
1096
* @param i_dispatcher Unique identifier for the function dispatcher
1097
*/
1098
#define PY_MODULE_FUNCTION_CAST_EX_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, s_doc, i_dispatcher )\
1099
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1100
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10 \
1101
)\
1102
{\
1103
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10) );\
1104
}\
1105
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1106
1107
/** @ingroup ModuleFunctionCast
1108
* @deprecated Define an explicit wrapper function instead of using casting macros
1109
* Export a C++ function with explicit type casting for 11-parameter functions with full control.
1110
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1111
*
1112
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1113
* @param f_cppFunction C++ function to export (11 parameters)
1114
* @param t_return Return type of the function (for explicit casting)
1115
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for explicit casting)
1116
* @param s_functionName Python function name (const char* string with static storage duration)
1117
* @param s_doc Function documentation string (const char* string with static storage duration)
1118
* @param i_dispatcher Unique identifier for the function dispatcher
1119
*/
1120
#define PY_MODULE_FUNCTION_CAST_EX_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, s_doc, i_dispatcher )\
1121
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1122
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11 \
1123
)\
1124
{\
1125
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11) );\
1126
}\
1127
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1128
1129
/** @ingroup ModuleFunctionCast
1130
* @deprecated Define an explicit wrapper function instead of using casting macros
1131
* Export a C++ function with explicit type casting for 12-parameter functions with full control.
1132
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1133
*
1134
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1135
* @param f_cppFunction C++ function to export (12 parameters)
1136
* @param t_return Return type of the function (for explicit casting)
1137
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for explicit casting)
1138
* @param s_functionName Python function name (const char* string with static storage duration)
1139
* @param s_doc Function documentation string (const char* string with static storage duration)
1140
* @param i_dispatcher Unique identifier for the function dispatcher
1141
*/
1142
#define PY_MODULE_FUNCTION_CAST_EX_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, s_doc, i_dispatcher )\
1143
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1144
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12 \
1145
)\
1146
{\
1147
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12) );\
1148
}\
1149
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1150
1151
/** @ingroup ModuleFunctionCast
1152
* @deprecated Define an explicit wrapper function instead of using casting macros
1153
* Export a C++ function with explicit type casting for 13-parameter functions with full control.
1154
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1155
*
1156
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1157
* @param f_cppFunction C++ function to export (13 parameters)
1158
* @param t_return Return type of the function (for explicit casting)
1159
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for explicit casting)
1160
* @param s_functionName Python function name (const char* string with static storage duration)
1161
* @param s_doc Function documentation string (const char* string with static storage duration)
1162
* @param i_dispatcher Unique identifier for the function dispatcher
1163
*/
1164
#define PY_MODULE_FUNCTION_CAST_EX_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, s_doc, i_dispatcher )\
1165
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1166
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12, ::lass::python::OwnerCaster< t_P13 >::TCaster::TTarget iArg13 \
1167
)\
1168
{\
1169
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12), ::lass::python::OwnerCaster< t_P13 >::TCaster::cast(iArg13) );\
1170
}\
1171
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1172
1173
/** @ingroup ModuleFunctionCast
1174
* @deprecated Define an explicit wrapper function instead of using casting macros
1175
* Export a C++ function with explicit type casting for 14-parameter functions with full control.
1176
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1177
*
1178
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1179
* @param f_cppFunction C++ function to export (14 parameters)
1180
* @param t_return Return type of the function (for explicit casting)
1181
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for explicit casting)
1182
* @param s_functionName Python function name (const char* string with static storage duration)
1183
* @param s_doc Function documentation string (const char* string with static storage duration)
1184
* @param i_dispatcher Unique identifier for the function dispatcher
1185
*/
1186
#define PY_MODULE_FUNCTION_CAST_EX_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, s_doc, i_dispatcher )\
1187
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1188
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12, ::lass::python::OwnerCaster< t_P13 >::TCaster::TTarget iArg13, ::lass::python::OwnerCaster< t_P14 >::TCaster::TTarget iArg14 \
1189
)\
1190
{\
1191
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12), ::lass::python::OwnerCaster< t_P13 >::TCaster::cast(iArg13), ::lass::python::OwnerCaster< t_P14 >::TCaster::cast(iArg14) );\
1192
}\
1193
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1194
1195
/** @ingroup ModuleFunctionCast
1196
* @deprecated Define an explicit wrapper function instead of using casting macros
1197
* Export a C++ function with explicit type casting for 15-parameter functions with full control.
1198
* This macro allows exporting functions with default parameters or when explicit type casting is needed.
1199
*
1200
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1201
* @param f_cppFunction C++ function to export (15 parameters)
1202
* @param t_return Return type of the function (for explicit casting)
1203
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for explicit casting)
1204
* @param s_functionName Python function name (const char* string with static storage duration)
1205
* @param s_doc Function documentation string (const char* string with static storage duration)
1206
* @param i_dispatcher Unique identifier for the function dispatcher
1207
*/
1208
#define PY_MODULE_FUNCTION_CAST_EX_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, s_doc, i_dispatcher )\
1209
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
1210
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12, ::lass::python::OwnerCaster< t_P13 >::TCaster::TTarget iArg13, ::lass::python::OwnerCaster< t_P14 >::TCaster::TTarget iArg14, ::lass::python::OwnerCaster< t_P15 >::TCaster::TTarget iArg15 \
1211
)\
1212
{\
1213
return f_cppFunction ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12), ::lass::python::OwnerCaster< t_P13 >::TCaster::cast(iArg13), ::lass::python::OwnerCaster< t_P14 >::TCaster::cast(iArg14), ::lass::python::OwnerCaster< t_P15 >::TCaster::cast(iArg15) );\
1214
}\
1215
PY_MODULE_FUNCTION_EX( i_module, LASS_CONCATENATE(i_dispatcher, _caster), s_functionName, s_doc, i_dispatcher );
1216
1217
1218
/** @ingroup ModuleFunctionCast
1219
* @deprecated Define an explicit wrapper function instead of using casting macros
1220
* Export a C++ function with explicit type casting for 0-parameter functions with custom name and documentation.
1221
* Wraps PY_MODULE_FUNCTION_CAST_EX_0() with automatically generated dispatcher name.
1222
*
1223
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1224
* @param f_cppFunction C++ function to export (0 parameters)
1225
* @param t_return Return type of the function (for explicit casting)
1226
* @param t_params Parameter types as lass::meta::TypeTuple (for explicit casting - should be empty TypeTuple<>)
1227
* @param s_functionName Python function name (const char* string with static storage duration)
1228
* @param s_doc Function documentation string (const char* string with static storage duration)
1229
*/
1230
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_0( i_module, f_cppFunction, t_return, t_params, s_functionName, s_doc )\
1231
PY_MODULE_FUNCTION_CAST_EX_0(\
1232
i_module, f_cppFunction, t_return, s_functionName, s_doc,\
1233
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1234
1235
/** @ingroup ModuleFunctionCast
1236
* @deprecated Define an explicit wrapper function instead of using casting macros
1237
* Export a C++ function with explicit type casting for 1-parameter functions with custom name and documentation.
1238
* Wraps PY_MODULE_FUNCTION_CAST_EX_1() with automatically generated dispatcher name.
1239
*
1240
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1241
* @param f_cppFunction C++ function to export (1 parameters)
1242
* @param t_return Return type of the function (for explicit casting)
1243
* @param t_P1 Parameter types for the function (for explicit casting)
1244
* @param s_functionName Python function name (const char* string with static storage duration)
1245
* @param s_doc Function documentation string (const char* string with static storage duration)
1246
*/
1247
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_1( i_module, f_cppFunction, t_return, t_P1, s_functionName, s_doc )\
1248
PY_MODULE_FUNCTION_CAST_EX_1(\
1249
i_module, f_cppFunction, t_return, t_P1, s_functionName, s_doc,\
1250
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1251
1252
/** @ingroup ModuleFunctionCast
1253
* @deprecated Define an explicit wrapper function instead of using casting macros
1254
* Export a C++ function with explicit type casting for 2-parameter functions with custom name and documentation.
1255
* Wraps PY_MODULE_FUNCTION_CAST_EX_2() with automatically generated dispatcher name.
1256
*
1257
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1258
* @param f_cppFunction C++ function to export (2 parameters)
1259
* @param t_return Return type of the function (for explicit casting)
1260
* @param t_P1, t_P2 Parameter types for the function (for explicit casting)
1261
* @param s_functionName Python function name (const char* string with static storage duration)
1262
* @param s_doc Function documentation string (const char* string with static storage duration)
1263
*/
1264
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, s_doc )\
1265
PY_MODULE_FUNCTION_CAST_EX_2(\
1266
i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, s_doc,\
1267
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1268
1269
/** @ingroup ModuleFunctionCast
1270
* @deprecated Define an explicit wrapper function instead of using casting macros
1271
* Export a C++ function with explicit type casting for 3-parameter functions with custom name and documentation.
1272
* Wraps PY_MODULE_FUNCTION_CAST_EX_3() with automatically generated dispatcher name.
1273
*
1274
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1275
* @param f_cppFunction C++ function to export (3 parameters)
1276
* @param t_return Return type of the function (for explicit casting)
1277
* @param t_P1, t_P2, t_P3 Parameter types for the function (for explicit casting)
1278
* @param s_functionName Python function name (const char* string with static storage duration)
1279
* @param s_doc Function documentation string (const char* string with static storage duration)
1280
*/
1281
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, s_doc )\
1282
PY_MODULE_FUNCTION_CAST_EX_3(\
1283
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, s_doc,\
1284
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1285
1286
/** @ingroup ModuleFunctionCast
1287
* @deprecated Define an explicit wrapper function instead of using casting macros
1288
* Export a C++ function with explicit type casting for 4-parameter functions with custom name and documentation.
1289
* Wraps PY_MODULE_FUNCTION_CAST_EX_4() with automatically generated dispatcher name.
1290
*
1291
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1292
* @param f_cppFunction C++ function to export (4 parameters)
1293
* @param t_return Return type of the function (for explicit casting)
1294
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for explicit casting)
1295
* @param s_functionName Python function name (const char* string with static storage duration)
1296
* @param s_doc Function documentation string (const char* string with static storage duration)
1297
*/
1298
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, s_doc )\
1299
PY_MODULE_FUNCTION_CAST_EX_4(\
1300
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, s_doc,\
1301
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1302
1303
/** @ingroup ModuleFunctionCast
1304
* @deprecated Define an explicit wrapper function instead of using casting macros
1305
* Export a C++ function with explicit type casting for 5-parameter functions with custom name and documentation.
1306
* Wraps PY_MODULE_FUNCTION_CAST_EX_5() with automatically generated dispatcher name.
1307
*
1308
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1309
* @param f_cppFunction C++ function to export (5 parameters)
1310
* @param t_return Return type of the function (for explicit casting)
1311
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for explicit casting)
1312
* @param s_functionName Python function name (const char* string with static storage duration)
1313
* @param s_doc Function documentation string (const char* string with static storage duration)
1314
*/
1315
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, s_doc )\
1316
PY_MODULE_FUNCTION_CAST_EX_5(\
1317
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, s_doc,\
1318
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1319
1320
/** @ingroup ModuleFunctionCast
1321
* @deprecated Define an explicit wrapper function instead of using casting macros
1322
* Export a C++ function with explicit type casting for 6-parameter functions with custom name and documentation.
1323
* Wraps PY_MODULE_FUNCTION_CAST_EX_6() with automatically generated dispatcher name.
1324
*
1325
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1326
* @param f_cppFunction C++ function to export (6 parameters)
1327
* @param t_return Return type of the function (for explicit casting)
1328
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for explicit casting)
1329
* @param s_functionName Python function name (const char* string with static storage duration)
1330
* @param s_doc Function documentation string (const char* string with static storage duration)
1331
*/
1332
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, s_doc )\
1333
PY_MODULE_FUNCTION_CAST_EX_6(\
1334
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, s_doc,\
1335
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1336
1337
/** @ingroup ModuleFunctionCast
1338
* @deprecated Define an explicit wrapper function instead of using casting macros
1339
* Export a C++ function with explicit type casting for 7-parameter functions with custom name and documentation.
1340
* Wraps PY_MODULE_FUNCTION_CAST_EX_7() with automatically generated dispatcher name.
1341
*
1342
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1343
* @param f_cppFunction C++ function to export (7 parameters)
1344
* @param t_return Return type of the function (for explicit casting)
1345
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for explicit casting)
1346
* @param s_functionName Python function name (const char* string with static storage duration)
1347
* @param s_doc Function documentation string (const char* string with static storage duration)
1348
*/
1349
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, s_doc )\
1350
PY_MODULE_FUNCTION_CAST_EX_7(\
1351
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, s_doc,\
1352
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1353
1354
/** @ingroup ModuleFunctionCast
1355
* @deprecated Define an explicit wrapper function instead of using casting macros
1356
* Export a C++ function with explicit type casting for 8-parameter functions with custom name and documentation.
1357
* Wraps PY_MODULE_FUNCTION_CAST_EX_8() with automatically generated dispatcher name.
1358
*
1359
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1360
* @param f_cppFunction C++ function to export (8 parameters)
1361
* @param t_return Return type of the function (for explicit casting)
1362
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for explicit casting)
1363
* @param s_functionName Python function name (const char* string with static storage duration)
1364
* @param s_doc Function documentation string (const char* string with static storage duration)
1365
*/
1366
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, s_doc )\
1367
PY_MODULE_FUNCTION_CAST_EX_8(\
1368
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, s_doc,\
1369
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1370
1371
/** @ingroup ModuleFunctionCast
1372
* @deprecated Define an explicit wrapper function instead of using casting macros
1373
* Export a C++ function with explicit type casting for 9-parameter functions with custom name and documentation.
1374
* Wraps PY_MODULE_FUNCTION_CAST_EX_9() with automatically generated dispatcher name.
1375
*
1376
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1377
* @param f_cppFunction C++ function to export (9 parameters)
1378
* @param t_return Return type of the function (for explicit casting)
1379
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for explicit casting)
1380
* @param s_functionName Python function name (const char* string with static storage duration)
1381
* @param s_doc Function documentation string (const char* string with static storage duration)
1382
*/
1383
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, s_doc )\
1384
PY_MODULE_FUNCTION_CAST_EX_9(\
1385
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, s_doc,\
1386
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1387
1388
/** @ingroup ModuleFunctionCast
1389
* @deprecated Define an explicit wrapper function instead of using casting macros
1390
* Export a C++ function with explicit type casting for 10-parameter functions with custom name and documentation.
1391
* Wraps PY_MODULE_FUNCTION_CAST_EX_10() with automatically generated dispatcher name.
1392
*
1393
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1394
* @param f_cppFunction C++ function to export (10 parameters)
1395
* @param t_return Return type of the function (for explicit casting)
1396
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for explicit casting)
1397
* @param s_functionName Python function name (const char* string with static storage duration)
1398
* @param s_doc Function documentation string (const char* string with static storage duration)
1399
*/
1400
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, s_doc )\
1401
PY_MODULE_FUNCTION_CAST_EX_10(\
1402
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, s_doc,\
1403
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1404
1405
/** @ingroup ModuleFunctionCast
1406
* @deprecated Define an explicit wrapper function instead of using casting macros
1407
* Export a C++ function with explicit type casting for 11-parameter functions with custom name and documentation.
1408
* Wraps PY_MODULE_FUNCTION_CAST_EX_11() with automatically generated dispatcher name.
1409
*
1410
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1411
* @param f_cppFunction C++ function to export (11 parameters)
1412
* @param t_return Return type of the function (for explicit casting)
1413
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for explicit casting)
1414
* @param s_functionName Python function name (const char* string with static storage duration)
1415
* @param s_doc Function documentation string (const char* string with static storage duration)
1416
*/
1417
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, s_doc )\
1418
PY_MODULE_FUNCTION_CAST_EX_11(\
1419
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, s_doc,\
1420
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1421
1422
/** @ingroup ModuleFunctionCast
1423
* @deprecated Define an explicit wrapper function instead of using casting macros
1424
* Export a C++ function with explicit type casting for 12-parameter functions with custom name and documentation.
1425
* Wraps PY_MODULE_FUNCTION_CAST_EX_12() with automatically generated dispatcher name.
1426
*
1427
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1428
* @param f_cppFunction C++ function to export (12 parameters)
1429
* @param t_return Return type of the function (for explicit casting)
1430
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for explicit casting)
1431
* @param s_functionName Python function name (const char* string with static storage duration)
1432
* @param s_doc Function documentation string (const char* string with static storage duration)
1433
*/
1434
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, s_doc )\
1435
PY_MODULE_FUNCTION_CAST_EX_12(\
1436
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, s_doc,\
1437
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1438
1439
/** @ingroup ModuleFunctionCast
1440
* @deprecated Define an explicit wrapper function instead of using casting macros
1441
* Export a C++ function with explicit type casting for 13-parameter functions with custom name and documentation.
1442
* Wraps PY_MODULE_FUNCTION_CAST_EX_13() with automatically generated dispatcher name.
1443
*
1444
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1445
* @param f_cppFunction C++ function to export (13 parameters)
1446
* @param t_return Return type of the function (for explicit casting)
1447
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for explicit casting)
1448
* @param s_functionName Python function name (const char* string with static storage duration)
1449
* @param s_doc Function documentation string (const char* string with static storage duration)
1450
*/
1451
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, s_doc )\
1452
PY_MODULE_FUNCTION_CAST_EX_13(\
1453
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, s_doc,\
1454
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1455
1456
/** @ingroup ModuleFunctionCast
1457
* @deprecated Define an explicit wrapper function instead of using casting macros
1458
* Export a C++ function with explicit type casting for 14-parameter functions with custom name and documentation.
1459
* Wraps PY_MODULE_FUNCTION_CAST_EX_14() with automatically generated dispatcher name.
1460
*
1461
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1462
* @param f_cppFunction C++ function to export (14 parameters)
1463
* @param t_return Return type of the function (for explicit casting)
1464
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for explicit casting)
1465
* @param s_functionName Python function name (const char* string with static storage duration)
1466
* @param s_doc Function documentation string (const char* string with static storage duration)
1467
*/
1468
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, s_doc )\
1469
PY_MODULE_FUNCTION_CAST_EX_14(\
1470
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, s_doc,\
1471
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1472
1473
/** @ingroup ModuleFunctionCast
1474
* @deprecated Define an explicit wrapper function instead of using casting macros
1475
* Export a C++ function with explicit type casting for 15-parameter functions with custom name and documentation.
1476
* Wraps PY_MODULE_FUNCTION_CAST_EX_15() with automatically generated dispatcher name.
1477
*
1478
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1479
* @param f_cppFunction C++ function to export (15 parameters)
1480
* @param t_return Return type of the function (for explicit casting)
1481
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for explicit casting)
1482
* @param s_functionName Python function name (const char* string with static storage duration)
1483
* @param s_doc Function documentation string (const char* string with static storage duration)
1484
*/
1485
#define PY_MODULE_FUNCTION_CAST_NAME_DOC_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, s_doc )\
1486
PY_MODULE_FUNCTION_CAST_EX_15(\
1487
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, s_doc,\
1488
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
1489
1490
1491
1492
/** @ingroup ModuleFunctionCast
1493
* @deprecated Define an explicit wrapper function instead of using casting macros
1494
* Export a C++ function with explicit type casting for 0-parameter functions with custom name (no documentation).
1495
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_0() with @a s_doc = `nullptr`.
1496
*
1497
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1498
* @param f_cppFunction C++ function to export (0 parameters)
1499
* @param t_return Return type of the function (for explicit casting)
1500
* @param s_functionName Python function name (const char* string with static storage duration)
1501
*/
1502
#define PY_MODULE_FUNCTION_CAST_NAME_0( i_module, f_cppFunction, t_return, s_functionName )\
1503
PY_MODULE_FUNCTION_CAST_NAME_DOC_0(\
1504
i_module, f_cppFunction, t_return, s_functionName, 0 )
1505
1506
/** @ingroup ModuleFunctionCast
1507
* @deprecated Define an explicit wrapper function instead of using casting macros
1508
* Export a C++ function with explicit type casting for 1-parameter functions with custom name (no documentation).
1509
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_1() with @a s_doc = `nullptr`.
1510
*
1511
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1512
* @param f_cppFunction C++ function to export (1 parameters)
1513
* @param t_return Return type of the function (for explicit casting)
1514
* @param t_P1 Parameter types for the function (for explicit casting)
1515
* @param s_functionName Python function name (const char* string with static storage duration)
1516
*/
1517
#define PY_MODULE_FUNCTION_CAST_NAME_1( i_module, f_cppFunction, t_return, t_P1, s_functionName )\
1518
PY_MODULE_FUNCTION_CAST_NAME_DOC_1(\
1519
i_module, f_cppFunction, t_return, t_P1, s_functionName, 0 )
1520
1521
/** @ingroup ModuleFunctionCast
1522
* @deprecated Define an explicit wrapper function instead of using casting macros
1523
* Export a C++ function with explicit type casting for 2-parameter functions with custom name (no documentation).
1524
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_2() with @a s_doc = `nullptr`.
1525
*
1526
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1527
* @param f_cppFunction C++ function to export (2 parameters)
1528
* @param t_return Return type of the function (for explicit casting)
1529
* @param t_P1, t_P2 Parameter types for the function (for explicit casting)
1530
* @param s_functionName Python function name (const char* string with static storage duration)
1531
*/
1532
#define PY_MODULE_FUNCTION_CAST_NAME_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName )\
1533
PY_MODULE_FUNCTION_CAST_NAME_DOC_2(\
1534
i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, 0 )
1535
1536
/** @ingroup ModuleFunctionCast
1537
* @deprecated Define an explicit wrapper function instead of using casting macros
1538
* Export a C++ function with explicit type casting for 3-parameter functions with custom name (no documentation).
1539
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_3() with @a s_doc = `nullptr`.
1540
*
1541
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1542
* @param f_cppFunction C++ function to export (3 parameters)
1543
* @param t_return Return type of the function (for explicit casting)
1544
* @param t_P1, t_P2, t_P3 Parameter types for the function (for explicit casting)
1545
* @param s_functionName Python function name (const char* string with static storage duration)
1546
*/
1547
#define PY_MODULE_FUNCTION_CAST_NAME_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName )\
1548
PY_MODULE_FUNCTION_CAST_NAME_DOC_3(\
1549
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, 0 )
1550
1551
/** @ingroup ModuleFunctionCast
1552
* @deprecated Define an explicit wrapper function instead of using casting macros
1553
* Export a C++ function with explicit type casting for 4-parameter functions with custom name (no documentation).
1554
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_4() with @a s_doc = `nullptr`.
1555
*
1556
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1557
* @param f_cppFunction C++ function to export (4 parameters)
1558
* @param t_return Return type of the function (for explicit casting)
1559
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for explicit casting)
1560
* @param s_functionName Python function name (const char* string with static storage duration)
1561
*/
1562
#define PY_MODULE_FUNCTION_CAST_NAME_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName )\
1563
PY_MODULE_FUNCTION_CAST_NAME_DOC_4(\
1564
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, 0 )
1565
1566
/** @ingroup ModuleFunctionCast
1567
* @deprecated Define an explicit wrapper function instead of using casting macros
1568
* Export a C++ function with explicit type casting for 5-parameter functions with custom name (no documentation).
1569
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_5() with @a s_doc = `nullptr`.
1570
*
1571
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1572
* @param f_cppFunction C++ function to export (5 parameters)
1573
* @param t_return Return type of the function (for explicit casting)
1574
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for explicit casting)
1575
* @param s_functionName Python function name (const char* string with static storage duration)
1576
*/
1577
#define PY_MODULE_FUNCTION_CAST_NAME_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName )\
1578
PY_MODULE_FUNCTION_CAST_NAME_DOC_5(\
1579
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, 0 )
1580
1581
/** @ingroup ModuleFunctionCast
1582
* @deprecated Define an explicit wrapper function instead of using casting macros
1583
* Export a C++ function with explicit type casting for 6-parameter functions with custom name (no documentation).
1584
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_6() with @a s_doc = `nullptr`.
1585
*
1586
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1587
* @param f_cppFunction C++ function to export (6 parameters)
1588
* @param t_return Return type of the function (for explicit casting)
1589
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for explicit casting)
1590
* @param s_functionName Python function name (const char* string with static storage duration)
1591
*/
1592
#define PY_MODULE_FUNCTION_CAST_NAME_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName )\
1593
PY_MODULE_FUNCTION_CAST_NAME_DOC_6(\
1594
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, 0 )
1595
1596
/** @ingroup ModuleFunctionCast
1597
* @deprecated Define an explicit wrapper function instead of using casting macros
1598
* Export a C++ function with explicit type casting for 7-parameter functions with custom name (no documentation).
1599
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_7() with @a s_doc = `nullptr`.
1600
*
1601
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1602
* @param f_cppFunction C++ function to export (7 parameters)
1603
* @param t_return Return type of the function (for explicit casting)
1604
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for explicit casting)
1605
* @param s_functionName Python function name (const char* string with static storage duration)
1606
*/
1607
#define PY_MODULE_FUNCTION_CAST_NAME_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName )\
1608
PY_MODULE_FUNCTION_CAST_NAME_DOC_7(\
1609
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, 0 )
1610
1611
/** @ingroup ModuleFunctionCast
1612
* @deprecated Define an explicit wrapper function instead of using casting macros
1613
* Export a C++ function with explicit type casting for 8-parameter functions with custom name (no documentation).
1614
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_8() with @a s_doc = `nullptr`.
1615
*
1616
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1617
* @param f_cppFunction C++ function to export (8 parameters)
1618
* @param t_return Return type of the function (for explicit casting)
1619
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for explicit casting)
1620
* @param s_functionName Python function name (const char* string with static storage duration)
1621
*/
1622
#define PY_MODULE_FUNCTION_CAST_NAME_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName )\
1623
PY_MODULE_FUNCTION_CAST_NAME_DOC_8(\
1624
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, 0 )
1625
1626
/** @ingroup ModuleFunctionCast
1627
* @deprecated Define an explicit wrapper function instead of using casting macros
1628
* Export a C++ function with explicit type casting for 9-parameter functions with custom name (no documentation).
1629
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_9() with @a s_doc = `nullptr`.
1630
*
1631
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1632
* @param f_cppFunction C++ function to export (9 parameters)
1633
* @param t_return Return type of the function (for explicit casting)
1634
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for explicit casting)
1635
* @param s_functionName Python function name (const char* string with static storage duration)
1636
*/
1637
#define PY_MODULE_FUNCTION_CAST_NAME_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName )\
1638
PY_MODULE_FUNCTION_CAST_NAME_DOC_9(\
1639
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, 0 )
1640
1641
/** @ingroup ModuleFunctionCast
1642
* @deprecated Define an explicit wrapper function instead of using casting macros
1643
* Export a C++ function with explicit type casting for 10-parameter functions with custom name (no documentation).
1644
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_10() with @a s_doc = `nullptr`.
1645
*
1646
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1647
* @param f_cppFunction C++ function to export (10 parameters)
1648
* @param t_return Return type of the function (for explicit casting)
1649
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for explicit casting)
1650
* @param s_functionName Python function name (const char* string with static storage duration)
1651
*/
1652
#define PY_MODULE_FUNCTION_CAST_NAME_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName )\
1653
PY_MODULE_FUNCTION_CAST_NAME_DOC_10(\
1654
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, 0 )
1655
1656
/** @ingroup ModuleFunctionCast
1657
* @deprecated Define an explicit wrapper function instead of using casting macros
1658
* Export a C++ function with explicit type casting for 11-parameter functions with custom name (no documentation).
1659
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_11() with @a s_doc = `nullptr`.
1660
*
1661
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1662
* @param f_cppFunction C++ function to export (11 parameters)
1663
* @param t_return Return type of the function (for explicit casting)
1664
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for explicit casting)
1665
* @param s_functionName Python function name (const char* string with static storage duration)
1666
*/
1667
#define PY_MODULE_FUNCTION_CAST_NAME_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName )\
1668
PY_MODULE_FUNCTION_CAST_NAME_DOC_11(\
1669
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, 0 )
1670
1671
/** @ingroup ModuleFunctionCast
1672
* @deprecated Define an explicit wrapper function instead of using casting macros
1673
* Export a C++ function with explicit type casting for 12-parameter functions with custom name (no documentation).
1674
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_12() with @a s_doc = `nullptr`.
1675
*
1676
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1677
* @param f_cppFunction C++ function to export (12 parameters)
1678
* @param t_return Return type of the function (for explicit casting)
1679
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for explicit casting)
1680
* @param s_functionName Python function name (const char* string with static storage duration)
1681
*/
1682
#define PY_MODULE_FUNCTION_CAST_NAME_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName )\
1683
PY_MODULE_FUNCTION_CAST_NAME_DOC_12(\
1684
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, 0 )
1685
1686
/** @ingroup ModuleFunctionCast
1687
* @deprecated Define an explicit wrapper function instead of using casting macros
1688
* Export a C++ function with explicit type casting for 13-parameter functions with custom name (no documentation).
1689
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_13() with @a s_doc = `nullptr`.
1690
*
1691
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1692
* @param f_cppFunction C++ function to export (13 parameters)
1693
* @param t_return Return type of the function (for explicit casting)
1694
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for explicit casting)
1695
* @param s_functionName Python function name (const char* string with static storage duration)
1696
*/
1697
#define PY_MODULE_FUNCTION_CAST_NAME_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName )\
1698
PY_MODULE_FUNCTION_CAST_NAME_DOC_13(\
1699
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, 0 )
1700
1701
/** @ingroup ModuleFunctionCast
1702
* @deprecated Define an explicit wrapper function instead of using casting macros
1703
* Export a C++ function with explicit type casting for 14-parameter functions with custom name (no documentation).
1704
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_14() with @a s_doc = `nullptr`.
1705
*
1706
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1707
* @param f_cppFunction C++ function to export (14 parameters)
1708
* @param t_return Return type of the function (for explicit casting)
1709
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for explicit casting)
1710
* @param s_functionName Python function name (const char* string with static storage duration)
1711
*/
1712
#define PY_MODULE_FUNCTION_CAST_NAME_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName )\
1713
PY_MODULE_FUNCTION_CAST_NAME_DOC_14(\
1714
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, 0 )
1715
1716
/** @ingroup ModuleFunctionCast
1717
* @deprecated Define an explicit wrapper function instead of using casting macros
1718
* Export a C++ function with explicit type casting for 15-parameter functions with custom name (no documentation).
1719
* Wraps PY_MODULE_FUNCTION_CAST_NAME_DOC_15() with @a s_doc = `nullptr`.
1720
*
1721
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1722
* @param f_cppFunction C++ function to export (15 parameters)
1723
* @param t_return Return type of the function (for explicit casting)
1724
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for explicit casting)
1725
* @param s_functionName Python function name (const char* string with static storage duration)
1726
*/
1727
#define PY_MODULE_FUNCTION_CAST_NAME_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName )\
1728
PY_MODULE_FUNCTION_CAST_NAME_DOC_15(\
1729
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, 0 )
1730
1731
1732
1733
1734
// --- explicit qualified free functions -----------------------------------------------------------
1735
1736
/** @addtogroup ModuleFunctions
1737
* @name Qualified Free Functions
1738
*
1739
* If the C++ function that you want to export is overloaded, then you need to be able to
1740
* disambiquate what function exactly you want to export.
1741
*
1742
* These macros export C++ functions to Python with explicit type qualification to resolve
1743
* function overload ambiguities. They provide fine-grained control over function signatures to
1744
* disambiguate overloaded functions, by adding the return type (except for constructors) and all
1745
* parameter types.
1746
*
1747
* The list of parameter types can be passed as a single lass::meta::TypeTuple, or as individual
1748
* arguments. For the latter, the `_<N>` tells the number of arguments. The `_<N>` form is the most
1749
* often used one, and simply packs its types into a `TypeTuple`
1750
*
1751
* | Form | Adds parameters |
1752
* |--------------------------------------|-------------------------------------------------|
1753
* | `PY_MODULE_FUNCTION_QUALIFIED` | `t_return`, `t_params` as lass::meta::TypeTuple |
1754
* | `PY_MODULE_FUNCTION_QUALIFIED_<N>` | `t_return`, `t_P1`, `t_P2`, ... ``t_P<N>` |
1755
*
1756
* @par Example
1757
*
1758
* ```cpp
1759
* double spam(int a, float b);
1760
* void spam(const std::string& c);
1761
*
1762
* PY_MODULE_FUNCTION_QUALIFIED_2(foo, spam, double, int, float) // foo.spam(2, 3.14)
1763
* PY_MODULE_FUNCTION_QUALIFIED_1(foo, spam, void, const std::string&) // foo.spam("baz")
1764
* ```
1765
*
1766
* They combine with the `_NAME` and `_DOC` suffixes, with the `s_name`, `s_doc`, `i_dispatcher`
1767
* arguments following the function return and parameter types.
1768
*
1769
* @par Example
1770
*
1771
* ```cpp
1772
* void spam(const std::vector<int>& x);
1773
* double do_spam(int a, float b);
1774
* void do_spam(const std::string& c);
1775
*
1776
* PY_MODULE_FUNCTION_DOC(foo, spam, "Does Spam!!!") // foo.spam([1,2,3])
1777
* PY_MODULE_FUNCTION_QUALIFIED_NAME_2(foo, do_spam, double, int, float, "spam") // foo.spam(2, 3.14)
1778
* PY_MODULE_FUNCTION_QUALIFIED_NAME_1(foo, do_spam, void, const std::string&, "spam") // foo.spam("baz")
1779
* ```
1780
*
1781
* @{
1782
*/
1783
1784
1785
/** @brief Export an overloaded C++ function to Python, with full control.
1786
* @ingroup ModuleFunctions
1787
*
1788
* Use this macro instead of PY_MODULE_FUNCTION_EX when there are overloaded C++ functions that
1789
* would create ambiguity. By explicitly specifying return type and parameter types, you can
1790
* disambiguate which overload to export.
1791
*
1792
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
1793
* @param f_cppFunction C++ function to export (may be overloaded)
1794
* @param t_return Return type of the function (for disambiguation)
1795
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
1796
* @param s_functionName Python function name (const char* string with static storage duration)
1797
* @param s_doc Function docstring (const char* string with static storage duration, or nullptr)
1798
* @param i_dispatcher Unique name for the generated dispatcher function (unscoped identifier for
1799
* token concatenation)
1800
*
1801
* This macro helps resolve function overload ambiguities by explicitly specifying the function
1802
* signature to export.
1803
*
1804
* @par Example
1805
*
1806
* ```cpp
1807
* void bar(int a);
1808
* void bar(const std::string& b);
1809
*
1810
* PY_MODULE_FUNCTION_QUALIFIED_EX(foo, bar, void, meta::TypeTuple<int>, "bar", nullptr, foo_bar_a)
1811
* PY_MODULE_FUNCTION_QUALIFIED_EX(foo, bar, void, meta::TypeTuple<const std::string&>, "bar", nullptr, foo_bar_b)
1812
* ```
1813
*/
1814
1815
#define PY_MODULE_FUNCTION_QUALIFIED_EX(i_module, f_cppFunction, t_return, t_params, s_functionName, s_doc, i_dispatcher)\
1816
static PyCFunction LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ) = 0;\
1817
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher( PyObject* iIgnore, PyObject* iArgs )\
1818
{\
1819
if (LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ))\
1820
{\
1821
PyObject* result = LASS_CONCATENATE( pyOverloadChain_, i_dispatcher )(iIgnore, iArgs);\
1822
if (!(PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError)))\
1823
{\
1824
return result;\
1825
}\
1826
PyErr_Clear();\
1827
Py_XDECREF(result);\
1828
}\
1829
return ::lass::python::impl::ExplicitResolver\
1830
<\
1831
lass::meta::NullType,\
1832
t_return,\
1833
t_params\
1834
>\
1835
::callFunction(iArgs, &f_cppFunction);\
1836
}\
1837
LASS_EXECUTE_BEFORE_MAIN_EX\
1838
( LASS_CONCATENATE_3( lassExecutePyModuleFunction_, i_module, i_dispatcher ),\
1839
i_module.addFunctionDispatcher( \
1840
i_dispatcher, s_functionName, s_doc, \
1841
LASS_CONCATENATE( pyOverloadChain_, i_dispatcher ) \
1842
);\
1843
)
1844
1845
/** @brief Export an overloaded 0-ary C++ function to Python, with full control.
1846
* @ingroup ModuleFunctions
1847
*
1848
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with 0 parameters.
1849
*
1850
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1851
* @param f_cppFunction C++ function to export (may be overloaded)
1852
* @param t_return Return type of the function (for disambiguation)
1853
* @param s_functionName Python function name (const char* string with static storage duration)
1854
* @param s_doc Function documentation string (const char* string with static storage duration)
1855
* @param i_dispatcher Unique identifier for the function dispatcher
1856
*
1857
* @par Example
1858
*
1859
* ```cpp
1860
* PY_MODULE_FUNCTION_QUALIFIED_EX_0(foo, doBar, R, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
1861
* ```
1862
*/
1863
#define PY_MODULE_FUNCTION_QUALIFIED_EX_0( i_module, f_cppFunction, t_return, s_functionName, s_doc, i_dispatcher )\
1864
PY_MODULE_FUNCTION_QUALIFIED_EX(\
1865
i_module, f_cppFunction, t_return, ::lass::meta::TypeTuple<>, s_functionName, s_doc, i_dispatcher )
1866
1867
/** @brief Export an overloaded 1-ary C++ function to Python, with full control.
1868
* @ingroup ModuleFunctions
1869
*
1870
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 1 parameters.
1871
*
1872
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1873
* @param f_cppFunction C++ function to export (may be overloaded)
1874
* @param t_return Return type of the function (for disambiguation)
1875
* @param t_P1 Parameter types for the function (for disambiguation)
1876
* @param s_functionName Python function name (const char* string with static storage duration)
1877
* @param s_doc Function documentation string (const char* string with static storage duration)
1878
* @param i_dispatcher Unique identifier for the function dispatcher
1879
*
1880
* @par Example
1881
*
1882
* ```cpp
1883
* PY_MODULE_FUNCTION_QUALIFIED_EX_1(foo, doBar, R, P1, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
1884
* ```
1885
*/
1886
#define PY_MODULE_FUNCTION_QUALIFIED_EX_1( i_module, f_cppFunction, t_return, t_P1, s_functionName, s_doc, i_dispatcher )\
1887
typedef ::lass::meta::TypeTuple< t_P1 > \
1888
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
1889
PY_MODULE_FUNCTION_QUALIFIED_EX(\
1890
i_module, f_cppFunction, t_return,\
1891
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
1892
s_functionName, s_doc, i_dispatcher )
1893
1894
/** @brief Export an overloaded 2-ary C++ function to Python, with full control.
1895
* @ingroup ModuleFunctions
1896
*
1897
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 2 parameters.
1898
*
1899
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1900
* @param f_cppFunction C++ function to export (may be overloaded)
1901
* @param t_return Return type of the function (for disambiguation)
1902
* @param t_P1, t_P2 Parameter types for the function (for disambiguation)
1903
* @param s_functionName Python function name (const char* string with static storage duration)
1904
* @param s_doc Function documentation string (const char* string with static storage duration)
1905
* @param i_dispatcher Unique identifier for the function dispatcher
1906
*
1907
* @par Example
1908
*
1909
* ```cpp
1910
* PY_MODULE_FUNCTION_QUALIFIED_EX_2(foo, doBar, R, P1, P2, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
1911
* ```
1912
*/
1913
#define PY_MODULE_FUNCTION_QUALIFIED_EX_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, s_doc, i_dispatcher )\
1914
typedef ::lass::meta::TypeTuple< t_P1, t_P2 > \
1915
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
1916
PY_MODULE_FUNCTION_QUALIFIED_EX(\
1917
i_module, f_cppFunction, t_return,\
1918
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
1919
s_functionName, s_doc, i_dispatcher )
1920
1921
/** @brief Export an overloaded 3-ary C++ function to Python, with full control.
1922
* @ingroup ModuleFunctions
1923
*
1924
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 3 parameters.
1925
*
1926
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1927
* @param f_cppFunction C++ function to export (may be overloaded)
1928
* @param t_return Return type of the function (for disambiguation)
1929
* @param t_P1, t_P2, t_P3 Parameter types for the function (for disambiguation)
1930
* @param s_functionName Python function name (const char* string with static storage duration)
1931
* @param s_doc Function documentation string (const char* string with static storage duration)
1932
* @param i_dispatcher Unique identifier for the function dispatcher
1933
*
1934
* @par Example
1935
*
1936
* ```cpp
1937
* PY_MODULE_FUNCTION_QUALIFIED_EX_3(foo, doBar, R, P1, P2, P3, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
1938
* ```
1939
*/
1940
#define PY_MODULE_FUNCTION_QUALIFIED_EX_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, s_doc, i_dispatcher )\
1941
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3 > \
1942
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
1943
PY_MODULE_FUNCTION_QUALIFIED_EX(\
1944
i_module, f_cppFunction, t_return,\
1945
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
1946
s_functionName, s_doc, i_dispatcher )
1947
1948
/** @brief Export an overloaded 4-ary C++ function to Python, with full control.
1949
* @ingroup ModuleFunctions
1950
*
1951
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 4 parameters.
1952
*
1953
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1954
* @param f_cppFunction C++ function to export (may be overloaded)
1955
* @param t_return Return type of the function (for disambiguation)
1956
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for disambiguation)
1957
* @param s_functionName Python function name (const char* string with static storage duration)
1958
* @param s_doc Function documentation string (const char* string with static storage duration)
1959
* @param i_dispatcher Unique identifier for the function dispatcher
1960
*
1961
* @par Example
1962
*
1963
* ```cpp
1964
* PY_MODULE_FUNCTION_QUALIFIED_EX_4(foo, doBar, R, P1, P2, P3, P4, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
1965
* ```
1966
*/
1967
#define PY_MODULE_FUNCTION_QUALIFIED_EX_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, s_doc, i_dispatcher )\
1968
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4 > \
1969
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
1970
PY_MODULE_FUNCTION_QUALIFIED_EX(\
1971
i_module, f_cppFunction, t_return,\
1972
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
1973
s_functionName, s_doc, i_dispatcher )
1974
1975
/** @brief Export an overloaded 5-ary C++ function to Python, with full control.
1976
* @ingroup ModuleFunctions
1977
*
1978
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 5 parameters.
1979
*
1980
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
1981
* @param f_cppFunction C++ function to export (may be overloaded)
1982
* @param t_return Return type of the function (for disambiguation)
1983
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for disambiguation)
1984
* @param s_functionName Python function name (const char* string with static storage duration)
1985
* @param s_doc Function documentation string (const char* string with static storage duration)
1986
* @param i_dispatcher Unique identifier for the function dispatcher
1987
*
1988
* @par Example
1989
*
1990
* ```cpp
1991
* PY_MODULE_FUNCTION_QUALIFIED_EX_5(foo, doBar, R, P1, P2, P3, P4, P5, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
1992
* ```
1993
*/
1994
#define PY_MODULE_FUNCTION_QUALIFIED_EX_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, s_doc, i_dispatcher )\
1995
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5 > \
1996
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
1997
PY_MODULE_FUNCTION_QUALIFIED_EX(\
1998
i_module, f_cppFunction, t_return,\
1999
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2000
s_functionName, s_doc, i_dispatcher )
2001
2002
/** @brief Export an overloaded 6-ary C++ function to Python, with full control.
2003
* @ingroup ModuleFunctions
2004
*
2005
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 6 parameters.
2006
*
2007
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2008
* @param f_cppFunction C++ function to export (may be overloaded)
2009
* @param t_return Return type of the function (for disambiguation)
2010
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for disambiguation)
2011
* @param s_functionName Python function name (const char* string with static storage duration)
2012
* @param s_doc Function documentation string (const char* string with static storage duration)
2013
* @param i_dispatcher Unique identifier for the function dispatcher
2014
*
2015
* @par Example
2016
*
2017
* ```cpp
2018
* PY_MODULE_FUNCTION_QUALIFIED_EX_6(foo, doBar, R, P1, P2, P3, P4, P5, P6, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2019
* ```
2020
*/
2021
#define PY_MODULE_FUNCTION_QUALIFIED_EX_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, s_doc, i_dispatcher )\
2022
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 > \
2023
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2024
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2025
i_module, f_cppFunction, t_return,\
2026
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2027
s_functionName, s_doc, i_dispatcher )
2028
2029
/** @brief Export an overloaded 7-ary C++ function to Python, with full control.
2030
* @ingroup ModuleFunctions
2031
*
2032
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 7 parameters.
2033
*
2034
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2035
* @param f_cppFunction C++ function to export (may be overloaded)
2036
* @param t_return Return type of the function (for disambiguation)
2037
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for disambiguation)
2038
* @param s_functionName Python function name (const char* string with static storage duration)
2039
* @param s_doc Function documentation string (const char* string with static storage duration)
2040
* @param i_dispatcher Unique identifier for the function dispatcher
2041
*
2042
* @par Example
2043
*
2044
* ```cpp
2045
* PY_MODULE_FUNCTION_QUALIFIED_EX_7(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2046
* ```
2047
*/
2048
#define PY_MODULE_FUNCTION_QUALIFIED_EX_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, s_doc, i_dispatcher )\
2049
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 > \
2050
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2051
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2052
i_module, f_cppFunction, t_return,\
2053
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2054
s_functionName, s_doc, i_dispatcher )
2055
2056
/** @brief Export an overloaded 8-ary C++ function to Python, with full control.
2057
* @ingroup ModuleFunctions
2058
*
2059
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 8 parameters.
2060
*
2061
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2062
* @param f_cppFunction C++ function to export (may be overloaded)
2063
* @param t_return Return type of the function (for disambiguation)
2064
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for disambiguation)
2065
* @param s_functionName Python function name (const char* string with static storage duration)
2066
* @param s_doc Function documentation string (const char* string with static storage duration)
2067
* @param i_dispatcher Unique identifier for the function dispatcher
2068
*
2069
* @par Example
2070
*
2071
* ```cpp
2072
* PY_MODULE_FUNCTION_QUALIFIED_EX_8(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2073
* ```
2074
*/
2075
#define PY_MODULE_FUNCTION_QUALIFIED_EX_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, s_doc, i_dispatcher )\
2076
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 > \
2077
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2078
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2079
i_module, f_cppFunction, t_return,\
2080
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2081
s_functionName, s_doc, i_dispatcher )
2082
2083
/** @brief Export an overloaded 9-ary C++ function to Python, with full control.
2084
* @ingroup ModuleFunctions
2085
*
2086
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 9 parameters.
2087
*
2088
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2089
* @param f_cppFunction C++ function to export (may be overloaded)
2090
* @param t_return Return type of the function (for disambiguation)
2091
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for disambiguation)
2092
* @param s_functionName Python function name (const char* string with static storage duration)
2093
* @param s_doc Function documentation string (const char* string with static storage duration)
2094
* @param i_dispatcher Unique identifier for the function dispatcher
2095
*
2096
* @par Example
2097
*
2098
* ```cpp
2099
* PY_MODULE_FUNCTION_QUALIFIED_EX_9(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2100
* ```
2101
*/
2102
#define PY_MODULE_FUNCTION_QUALIFIED_EX_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, s_doc, i_dispatcher )\
2103
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 > \
2104
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2105
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2106
i_module, f_cppFunction, t_return,\
2107
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2108
s_functionName, s_doc, i_dispatcher )
2109
2110
/** @brief Export an overloaded 10-ary C++ function to Python, with full control.
2111
* @ingroup ModuleFunctions
2112
*
2113
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 10 parameters.
2114
*
2115
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2116
* @param f_cppFunction C++ function to export (may be overloaded)
2117
* @param t_return Return type of the function (for disambiguation)
2118
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for disambiguation)
2119
* @param s_functionName Python function name (const char* string with static storage duration)
2120
* @param s_doc Function documentation string (const char* string with static storage duration)
2121
* @param i_dispatcher Unique identifier for the function dispatcher
2122
*
2123
* @par Example
2124
*
2125
* ```cpp
2126
* PY_MODULE_FUNCTION_QUALIFIED_EX_10(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2127
* ```
2128
*/
2129
#define PY_MODULE_FUNCTION_QUALIFIED_EX_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, s_doc, i_dispatcher )\
2130
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 > \
2131
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2132
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2133
i_module, f_cppFunction, t_return,\
2134
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2135
s_functionName, s_doc, i_dispatcher )
2136
2137
/** @brief Export an overloaded 11-ary C++ function to Python, with full control.
2138
* @ingroup ModuleFunctions
2139
*
2140
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 11 parameters.
2141
*
2142
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2143
* @param f_cppFunction C++ function to export (may be overloaded)
2144
* @param t_return Return type of the function (for disambiguation)
2145
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for disambiguation)
2146
* @param s_functionName Python function name (const char* string with static storage duration)
2147
* @param s_doc Function documentation string (const char* string with static storage duration)
2148
* @param i_dispatcher Unique identifier for the function dispatcher
2149
*
2150
* @par Example
2151
*
2152
* ```cpp
2153
* PY_MODULE_FUNCTION_QUALIFIED_EX_11(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2154
* ```
2155
*/
2156
#define PY_MODULE_FUNCTION_QUALIFIED_EX_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, s_doc, i_dispatcher )\
2157
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 > \
2158
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2159
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2160
i_module, f_cppFunction, t_return,\
2161
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2162
s_functionName, s_doc, i_dispatcher )
2163
2164
/** @brief Export an overloaded 12-ary C++ function to Python, with full control.
2165
* @ingroup ModuleFunctions
2166
*
2167
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 12 parameters.
2168
*
2169
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2170
* @param f_cppFunction C++ function to export (may be overloaded)
2171
* @param t_return Return type of the function (for disambiguation)
2172
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for disambiguation)
2173
* @param s_functionName Python function name (const char* string with static storage duration)
2174
* @param s_doc Function documentation string (const char* string with static storage duration)
2175
* @param i_dispatcher Unique identifier for the function dispatcher
2176
*
2177
* @par Example
2178
*
2179
* ```cpp
2180
* PY_MODULE_FUNCTION_QUALIFIED_EX_12(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2181
* ```
2182
*/
2183
#define PY_MODULE_FUNCTION_QUALIFIED_EX_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, s_doc, i_dispatcher )\
2184
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 > \
2185
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2186
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2187
i_module, f_cppFunction, t_return,\
2188
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2189
s_functionName, s_doc, i_dispatcher )
2190
2191
/** @brief Export an overloaded 13-ary C++ function to Python, with full control.
2192
* @ingroup ModuleFunctions
2193
*
2194
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 13 parameters.
2195
*
2196
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2197
* @param f_cppFunction C++ function to export (may be overloaded)
2198
* @param t_return Return type of the function (for disambiguation)
2199
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for disambiguation)
2200
* @param s_functionName Python function name (const char* string with static storage duration)
2201
* @param s_doc Function documentation string (const char* string with static storage duration)
2202
* @param i_dispatcher Unique identifier for the function dispatcher
2203
*
2204
* @par Example
2205
*
2206
* ```cpp
2207
* PY_MODULE_FUNCTION_QUALIFIED_EX_13(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2208
* ```
2209
*/
2210
#define PY_MODULE_FUNCTION_QUALIFIED_EX_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, s_doc, i_dispatcher )\
2211
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 > \
2212
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2213
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2214
i_module, f_cppFunction, t_return,\
2215
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2216
s_functionName, s_doc, i_dispatcher )
2217
2218
/** @brief Export an overloaded 14-ary C++ function to Python, with full control.
2219
* @ingroup ModuleFunctions
2220
*
2221
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 14 parameters.
2222
*
2223
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2224
* @param f_cppFunction C++ function to export (may be overloaded)
2225
* @param t_return Return type of the function (for disambiguation)
2226
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for disambiguation)
2227
* @param s_functionName Python function name (const char* string with static storage duration)
2228
* @param s_doc Function documentation string (const char* string with static storage duration)
2229
* @param i_dispatcher Unique identifier for the function dispatcher
2230
*
2231
* @par Example
2232
*
2233
* ```cpp
2234
* PY_MODULE_FUNCTION_QUALIFIED_EX_14(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2235
* ```
2236
*/
2237
#define PY_MODULE_FUNCTION_QUALIFIED_EX_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, s_doc, i_dispatcher )\
2238
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 > \
2239
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2240
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2241
i_module, f_cppFunction, t_return,\
2242
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2243
s_functionName, s_doc, i_dispatcher )
2244
2245
/** @brief Export an overloaded 15-ary C++ function to Python, with full control.
2246
* @ingroup ModuleFunctions
2247
*
2248
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() for functions with exactly 15 parameters.
2249
*
2250
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2251
* @param f_cppFunction C++ function to export (may be overloaded)
2252
* @param t_return Return type of the function (for disambiguation)
2253
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for disambiguation)
2254
* @param s_functionName Python function name (const char* string with static storage duration)
2255
* @param s_doc Function documentation string (const char* string with static storage duration)
2256
* @param i_dispatcher Unique identifier for the function dispatcher
2257
*
2258
* @par Example
2259
*
2260
* ```cpp
2261
* PY_MODULE_FUNCTION_QUALIFIED_EX_15(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, "do_bar", "Do Bar", foo_do_bar) // foo.do_bar(...)
2262
* ```
2263
*/
2264
#define PY_MODULE_FUNCTION_QUALIFIED_EX_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, s_doc, i_dispatcher )\
2265
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 > \
2266
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
2267
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2268
i_module, f_cppFunction, t_return,\
2269
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)),\
2270
s_functionName, s_doc, i_dispatcher )
2271
2272
2273
/** @brief Export an overloaded C++ function to Python, with custom name and docstring.
2274
* @ingroup ModuleFunctions
2275
*
2276
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX() with automatically generated dispatcher name.
2277
*
2278
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2279
* @param f_cppFunction C++ function to export (may be overloaded)
2280
* @param t_return Return type of the function (for disambiguation)
2281
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
2282
* @param s_functionName Python function name (const char* string with static storage duration)
2283
* @param s_doc Function documentation string (const char* string with static storage duration)
2284
*
2285
* @par Example
2286
*
2287
* ```cpp
2288
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC(foo, doBar, R, (TypeTuple<P1, P2, P3>), "do_bar", "Do Bar") // foo.do_bar(...)
2289
* ```
2290
*/
2291
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC( i_module, f_cppFunction, t_return, t_params, s_functionName, s_doc )\
2292
PY_MODULE_FUNCTION_QUALIFIED_EX(\
2293
i_module, f_cppFunction, t_return, t_params, s_functionName, s_doc,\
2294
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2295
2296
2297
/** @brief Export an overloaded 0-ary C++ function to Python, with custom name and docstring.
2298
* @ingroup ModuleFunctions
2299
*
2300
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_0() with automatically generated dispatcher name.
2301
*
2302
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2303
* @param f_cppFunction C++ function to export (may be overloaded)
2304
* @param t_return Return type of the function (for disambiguation)
2305
* @param t_params Unused, you can set it to `void`
2306
* @param s_functionName Python function name (const char* string with static storage duration)
2307
* @param s_doc Function documentation string (const char* string with static storage duration)
2308
*
2309
* @note `t_params` is a stray parameter that deviates from the pattern. It's here for historical
2310
* backward compatibility.
2311
*
2312
* @par Example
2313
*
2314
* ```cpp
2315
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_015(foo, doBar, R, void, "do_bar", "Do Bar") // foo.do_bar(...)
2316
* ```
2317
*/
2318
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_0( i_module, f_cppFunction, t_return, t_params, s_functionName, s_doc )\
2319
PY_MODULE_FUNCTION_QUALIFIED_EX_0(\
2320
i_module, f_cppFunction, t_return, s_functionName, s_doc,\
2321
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2322
2323
/** @brief Export an overloaded 1-ary C++ function to Python, with custom name and docstring.
2324
* @ingroup ModuleFunctions
2325
*
2326
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_1() with automatically generated dispatcher name.
2327
*
2328
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2329
* @param f_cppFunction C++ function to export (may be overloaded)
2330
* @param t_return Return type of the function (for disambiguation)
2331
* @param t_P1 Parameter types for the function (for disambiguation)
2332
* @param s_functionName Python function name (const char* string with static storage duration)
2333
* @param s_doc Function documentation string (const char* string with static storage duration)
2334
*
2335
* @par Example
2336
*
2337
* ```cpp
2338
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_1(foo, doBar, R, P1, "do_bar", "Do Bar") // foo.do_bar(...)
2339
* ```
2340
*/
2341
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_1( i_module, f_cppFunction, t_return, t_P1, s_functionName, s_doc )\
2342
PY_MODULE_FUNCTION_QUALIFIED_EX_1(\
2343
i_module, f_cppFunction, t_return, t_P1, s_functionName, s_doc,\
2344
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2345
2346
/** @brief Export an overloaded 2-ary C++ function to Python, with custom name and docstring.
2347
* @ingroup ModuleFunctions
2348
*
2349
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_2() with automatically generated dispatcher name.
2350
*
2351
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2352
* @param f_cppFunction C++ function to export (may be overloaded)
2353
* @param t_return Return type of the function (for disambiguation)
2354
* @param t_P1, t_P2 Parameter types for the function (for disambiguation)
2355
* @param s_functionName Python function name (const char* string with static storage duration)
2356
* @param s_doc Function documentation string (const char* string with static storage duration)
2357
*
2358
* @par Example
2359
*
2360
* ```cpp
2361
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2(foo, doBar, R, P1, P2, "do_bar", "Do Bar") // foo.do_bar(...)
2362
* ```
2363
*/
2364
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, s_doc )\
2365
PY_MODULE_FUNCTION_QUALIFIED_EX_2(\
2366
i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, s_doc,\
2367
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2368
2369
/** @brief Export an overloaded 3-ary C++ function to Python, with custom name and docstring.
2370
* @ingroup ModuleFunctions
2371
*
2372
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_3() with automatically generated dispatcher name.
2373
*
2374
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2375
* @param f_cppFunction C++ function to export (may be overloaded)
2376
* @param t_return Return type of the function (for disambiguation)
2377
* @param t_P1, t_P2, t_P3 Parameter types for the function (for disambiguation)
2378
* @param s_functionName Python function name (const char* string with static storage duration)
2379
* @param s_doc Function documentation string (const char* string with static storage duration)
2380
*
2381
* @par Example
2382
*
2383
* ```cpp
2384
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_3(foo, doBar, R, P1, P2, P3, "do_bar", "Do Bar") // foo.do_bar(...)
2385
* ```
2386
*/
2387
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, s_doc )\
2388
PY_MODULE_FUNCTION_QUALIFIED_EX_3(\
2389
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, s_doc,\
2390
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2391
2392
/** @brief Export an overloaded 4-ary C++ function to Python, with custom name and docstring.
2393
* @ingroup ModuleFunctions
2394
*
2395
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_4() with automatically generated dispatcher name.
2396
*
2397
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2398
* @param f_cppFunction C++ function to export (may be overloaded)
2399
* @param t_return Return type of the function (for disambiguation)
2400
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for disambiguation)
2401
* @param s_functionName Python function name (const char* string with static storage duration)
2402
* @param s_doc Function documentation string (const char* string with static storage duration)
2403
*
2404
* @par Example
2405
*
2406
* ```cpp
2407
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_4(foo, doBar, R, P1, P2, P3, P4, "do_bar", "Do Bar") // foo.do_bar(...)
2408
* ```
2409
*/
2410
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, s_doc )\
2411
PY_MODULE_FUNCTION_QUALIFIED_EX_4(\
2412
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, s_doc,\
2413
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2414
2415
/** @brief Export an overloaded 5-ary C++ function to Python, with custom name and docstring.
2416
* @ingroup ModuleFunctions
2417
*
2418
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_5() with automatically generated dispatcher name.
2419
*
2420
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2421
* @param f_cppFunction C++ function to export (may be overloaded)
2422
* @param t_return Return type of the function (for disambiguation)
2423
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for disambiguation)
2424
* @param s_functionName Python function name (const char* string with static storage duration)
2425
* @param s_doc Function documentation string (const char* string with static storage duration)
2426
*
2427
* @par Example
2428
*
2429
* ```cpp
2430
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_5(foo, doBar, R, P1, P2, P3, P4, P5, "do_bar", "Do Bar") // foo.do_bar(...)
2431
* ```
2432
*/
2433
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, s_doc )\
2434
PY_MODULE_FUNCTION_QUALIFIED_EX_5(\
2435
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, s_doc,\
2436
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2437
2438
/** @brief Export an overloaded 6-ary C++ function to Python, with custom name and docstring.
2439
* @ingroup ModuleFunctions
2440
*
2441
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_6() with automatically generated dispatcher name.
2442
*
2443
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2444
* @param f_cppFunction C++ function to export (may be overloaded)
2445
* @param t_return Return type of the function (for disambiguation)
2446
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for disambiguation)
2447
* @param s_functionName Python function name (const char* string with static storage duration)
2448
* @param s_doc Function documentation string (const char* string with static storage duration)
2449
*
2450
* @par Example
2451
*
2452
* ```cpp
2453
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_6(foo, doBar, R, P1, P2, P3, P4, P5, P6, "do_bar", "Do Bar") // foo.do_bar(...)
2454
* ```
2455
*/
2456
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, s_doc )\
2457
PY_MODULE_FUNCTION_QUALIFIED_EX_6(\
2458
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, s_doc,\
2459
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2460
2461
/** @brief Export an overloaded 7-ary C++ function to Python, with custom name and docstring.
2462
* @ingroup ModuleFunctions
2463
*
2464
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_7() with automatically generated dispatcher name.
2465
*
2466
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2467
* @param f_cppFunction C++ function to export (may be overloaded)
2468
* @param t_return Return type of the function (for disambiguation)
2469
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for disambiguation)
2470
* @param s_functionName Python function name (const char* string with static storage duration)
2471
* @param s_doc Function documentation string (const char* string with static storage duration)
2472
*
2473
* @par Example
2474
*
2475
* ```cpp
2476
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_7(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, "do_bar", "Do Bar") // foo.do_bar(...)
2477
* ```
2478
*/
2479
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, s_doc )\
2480
PY_MODULE_FUNCTION_QUALIFIED_EX_7(\
2481
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, s_doc,\
2482
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2483
2484
/** @brief Export an overloaded 8-ary C++ function to Python, with custom name and docstring.
2485
* @ingroup ModuleFunctions
2486
*
2487
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_8() with automatically generated dispatcher name.
2488
*
2489
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2490
* @param f_cppFunction C++ function to export (may be overloaded)
2491
* @param t_return Return type of the function (for disambiguation)
2492
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for disambiguation)
2493
* @param s_functionName Python function name (const char* string with static storage duration)
2494
* @param s_doc Function documentation string (const char* string with static storage duration)
2495
*
2496
* @par Example
2497
*
2498
* ```cpp
2499
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_8(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, "do_bar", "Do Bar") // foo.do_bar(...)
2500
* ```
2501
*/
2502
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, s_doc )\
2503
PY_MODULE_FUNCTION_QUALIFIED_EX_8(\
2504
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, s_doc,\
2505
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2506
2507
/** @brief Export an overloaded 9-ary C++ function to Python, with custom name and docstring.
2508
* @ingroup ModuleFunctions
2509
*
2510
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_9() with automatically generated dispatcher name.
2511
*
2512
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2513
* @param f_cppFunction C++ function to export (may be overloaded)
2514
* @param t_return Return type of the function (for disambiguation)
2515
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for disambiguation)
2516
* @param s_functionName Python function name (const char* string with static storage duration)
2517
* @param s_doc Function documentation string (const char* string with static storage duration)
2518
*
2519
* @par Example
2520
*
2521
* ```cpp
2522
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_9(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, "do_bar", "Do Bar") // foo.do_bar(...)
2523
* ```
2524
*/
2525
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, s_doc )\
2526
PY_MODULE_FUNCTION_QUALIFIED_EX_9(\
2527
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, s_doc,\
2528
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2529
2530
/** @brief Export an overloaded 10-ary C++ function to Python, with custom name and docstring.
2531
* @ingroup ModuleFunctions
2532
*
2533
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_10() with automatically generated dispatcher name.
2534
*
2535
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2536
* @param f_cppFunction C++ function to export (may be overloaded)
2537
* @param t_return Return type of the function (for disambiguation)
2538
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for disambiguation)
2539
* @param s_functionName Python function name (const char* string with static storage duration)
2540
* @param s_doc Function documentation string (const char* string with static storage duration)
2541
*
2542
* @par Example
2543
*
2544
* ```cpp
2545
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_10(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, "do_bar", "Do Bar") // foo.do_bar(...)
2546
* ```
2547
*/
2548
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, s_doc )\
2549
PY_MODULE_FUNCTION_QUALIFIED_EX_10(\
2550
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, s_doc,\
2551
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2552
2553
/** @brief Export an overloaded 11-ary C++ function to Python, with custom name and docstring.
2554
* @ingroup ModuleFunctions
2555
*
2556
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_11() with automatically generated dispatcher name.
2557
*
2558
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2559
* @param f_cppFunction C++ function to export (may be overloaded)
2560
* @param t_return Return type of the function (for disambiguation)
2561
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for disambiguation)
2562
* @param s_functionName Python function name (const char* string with static storage duration)
2563
* @param s_doc Function documentation string (const char* string with static storage duration)
2564
*
2565
* @par Example
2566
*
2567
* ```cpp
2568
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_11(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, "do_bar", "Do Bar") // foo.do_bar(...)
2569
* ```
2570
*/
2571
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, s_doc )\
2572
PY_MODULE_FUNCTION_QUALIFIED_EX_11(\
2573
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, s_doc,\
2574
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2575
2576
/** @brief Export an overloaded 12-ary C++ function to Python, with custom name and docstring.
2577
* @ingroup ModuleFunctions
2578
*
2579
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_12() with automatically generated dispatcher name.
2580
*
2581
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2582
* @param f_cppFunction C++ function to export (may be overloaded)
2583
* @param t_return Return type of the function (for disambiguation)
2584
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for disambiguation)
2585
* @param s_functionName Python function name (const char* string with static storage duration)
2586
* @param s_doc Function documentation string (const char* string with static storage duration)
2587
*
2588
* @par Example
2589
*
2590
* ```cpp
2591
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_12(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, "do_bar", "Do Bar") // foo.do_bar(...)
2592
* ```
2593
*/
2594
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, s_doc )\
2595
PY_MODULE_FUNCTION_QUALIFIED_EX_12(\
2596
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, s_doc,\
2597
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2598
2599
/** @brief Export an overloaded 13-ary C++ function to Python, with custom name and docstring.
2600
* @ingroup ModuleFunctions
2601
*
2602
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_13() with automatically generated dispatcher name.
2603
*
2604
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2605
* @param f_cppFunction C++ function to export (may be overloaded)
2606
* @param t_return Return type of the function (for disambiguation)
2607
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for disambiguation)
2608
* @param s_functionName Python function name (const char* string with static storage duration)
2609
* @param s_doc Function documentation string (const char* string with static storage duration)
2610
*
2611
* @par Example
2612
*
2613
* ```cpp
2614
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_13(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, "do_bar", "Do Bar") // foo.do_bar(...)
2615
* ```
2616
*/
2617
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, s_doc )\
2618
PY_MODULE_FUNCTION_QUALIFIED_EX_13(\
2619
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, s_doc,\
2620
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2621
2622
/** @brief Export an overloaded 14-ary C++ function to Python, with custom name and docstring.
2623
* @ingroup ModuleFunctions
2624
*
2625
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_14() with automatically generated dispatcher name.
2626
*
2627
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2628
* @param f_cppFunction C++ function to export (may be overloaded)
2629
* @param t_return Return type of the function (for disambiguation)
2630
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for disambiguation)
2631
* @param s_functionName Python function name (const char* string with static storage duration)
2632
* @param s_doc Function documentation string (const char* string with static storage duration)
2633
*
2634
* @par Example
2635
*
2636
* ```cpp
2637
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_14(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, "do_bar", "Do Bar") // foo.do_bar(...)
2638
* ```
2639
*/
2640
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, s_doc )\
2641
PY_MODULE_FUNCTION_QUALIFIED_EX_14(\
2642
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, s_doc,\
2643
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2644
2645
/** @brief Export an overloaded 15-ary C++ function to Python, with custom name and docstring.
2646
* @ingroup ModuleFunctions
2647
*
2648
* Wraps PY_MODULE_FUNCTION_QUALIFIED_EX_15() with automatically generated dispatcher name.
2649
*
2650
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2651
* @param f_cppFunction C++ function to export (may be overloaded)
2652
* @param t_return Return type of the function (for disambiguation)
2653
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for disambiguation)
2654
* @param s_functionName Python function name (const char* string with static storage duration)
2655
* @param s_doc Function documentation string (const char* string with static storage duration)
2656
*
2657
* @par Example
2658
*
2659
* ```cpp
2660
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_15(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, "do_bar", "Do Bar") // foo.do_bar(...)
2661
* ```
2662
*/
2663
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, s_doc )\
2664
PY_MODULE_FUNCTION_QUALIFIED_EX_15(\
2665
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, s_doc,\
2666
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_function_, i_module)))
2667
2668
2669
/** @brief Export an overloaded C++ function to Python, with custom Python name.
2670
* @ingroup ModuleFunctions
2671
*
2672
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC() with @a s_doc = `nullptr`.
2673
*
2674
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
2675
* @param f_cppFunction C++ function to export (may be overloaded)
2676
* @param t_return Return type of the function (for disambiguation)
2677
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
2678
* @param s_functionName Python function name (const char* string with static storage duration)
2679
*
2680
* @par Example
2681
*
2682
* ```cpp
2683
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC(foo, doBar, R, (TypeTuple<P1, P2, P3>), "do_bar") // foo.do_bar(...)
2684
* ```
2685
*/
2686
#define PY_MODULE_FUNCTION_QUALIFIED_NAME( i_module, f_cppFunction, t_return, t_params, s_functionName )\
2687
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC(\
2688
i_module, f_cppFunction, t_return, t_params, s_functionName, 0 )
2689
2690
/** @brief Export an overloaded 0-ary C++ function to Python, with custom Python name.
2691
* @ingroup ModuleFunctions
2692
*
2693
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_0() with @a s_doc = `nullptr`.
2694
*
2695
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
2696
* @param f_cppFunction C++ function to export (may be overloaded)
2697
* @param t_return Return type of the function (for disambiguation)
2698
* @param s_functionName Python function name (const char* string with static storage duration)
2699
*
2700
* @par Example
2701
*
2702
* ```cpp
2703
* PY_MODULE_FUNCTION_QUALIFIED_NAME_0(foo, doBar, R, "do_bar") // foo.do_bar(...)
2704
* ```
2705
*/
2706
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_0( i_module, f_cppFunction, t_return, s_functionName )\
2707
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_0(\
2708
i_module, f_cppFunction, t_return, s_functionName, 0 )
2709
2710
/** @brief Export an overloaded 1-ary C++ function to Python, with custom Python name.
2711
* @ingroup ModuleFunctions
2712
*
2713
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_1() with @a s_doc = `nullptr`.
2714
*
2715
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2716
* @param f_cppFunction C++ function to export (may be overloaded)
2717
* @param t_return Return type of the function (for disambiguation)
2718
* @param t_P1 Parameter types for the function (for disambiguation)
2719
* @param s_functionName Python function name (const char* string with static storage duration)
2720
*
2721
* @par Example
2722
*
2723
* ```cpp
2724
* PY_MODULE_FUNCTION_QUALIFIED_NAME_1(foo, doBar, R, P1, "do_bar") // foo.do_bar(...)
2725
* ```
2726
*/
2727
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_1( i_module, f_cppFunction, t_return, t_P1, s_functionName )\
2728
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_1(\
2729
i_module, f_cppFunction, t_return, t_P1, s_functionName, 0 )
2730
2731
/** @brief Export an overloaded 2-ary C++ function to Python, with custom Python name.
2732
* @ingroup ModuleFunctions
2733
*
2734
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2() with @a s_doc = `nullptr`.
2735
*
2736
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2737
* @param f_cppFunction C++ function to export (may be overloaded)
2738
* @param t_return Return type of the function (for disambiguation)
2739
* @param t_P1, t_P2 Parameter types for the function (for disambiguation)
2740
* @param s_functionName Python function name (const char* string with static storage duration)
2741
*
2742
* @par Example
2743
*
2744
* ```cpp
2745
* PY_MODULE_FUNCTION_QUALIFIED_NAME_2(foo, doBar, R, P1, P2, "do_bar") // foo.do_bar(...)
2746
* ```
2747
*/
2748
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName )\
2749
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2(\
2750
i_module, f_cppFunction, t_return, t_P1, t_P2, s_functionName, 0 )
2751
2752
/** @brief Export an overloaded 3-ary C++ function to Python, with custom Python name.
2753
* @ingroup ModuleFunctions
2754
*
2755
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_3() with @a s_doc = `nullptr`.
2756
*
2757
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2758
* @param f_cppFunction C++ function to export (may be overloaded)
2759
* @param t_return Return type of the function (for disambiguation)
2760
* @param t_P1, t_P2, t_P3 Parameter types for the function (for disambiguation)
2761
* @param s_functionName Python function name (const char* string with static storage duration)
2762
*
2763
* @par Example
2764
*
2765
* ```cpp
2766
* PY_MODULE_FUNCTION_QUALIFIED_NAME_3(foo, doBar, R, P1, P2, P3, "do_bar") // foo.do_bar(...)
2767
* ```
2768
*/
2769
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName )\
2770
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_3(\
2771
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_functionName, 0 )
2772
2773
/** @brief Export an overloaded 4-ary C++ function to Python, with custom Python name.
2774
* @ingroup ModuleFunctions
2775
*
2776
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_4() with @a s_doc = `nullptr`.
2777
*
2778
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2779
* @param f_cppFunction C++ function to export (may be overloaded)
2780
* @param t_return Return type of the function (for disambiguation)
2781
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for disambiguation)
2782
* @param s_functionName Python function name (const char* string with static storage duration)
2783
*
2784
* @par Example
2785
*
2786
* ```cpp
2787
* PY_MODULE_FUNCTION_QUALIFIED_NAME_4(foo, doBar, R, P1, P2, P3, P4, "do_bar") // foo.do_bar(...)
2788
* ```
2789
*/
2790
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName )\
2791
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_4(\
2792
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_functionName, 0 )
2793
2794
/** @brief Export an overloaded 5-ary C++ function to Python, with custom Python name.
2795
* @ingroup ModuleFunctions
2796
*
2797
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_5() with @a s_doc = `nullptr`.
2798
*
2799
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2800
* @param f_cppFunction C++ function to export (may be overloaded)
2801
* @param t_return Return type of the function (for disambiguation)
2802
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for disambiguation)
2803
* @param s_functionName Python function name (const char* string with static storage duration)
2804
*
2805
* @par Example
2806
*
2807
* ```cpp
2808
* PY_MODULE_FUNCTION_QUALIFIED_NAME_5(foo, doBar, R, P1, P2, P3, P4, P5, "do_bar") // foo.do_bar(...)
2809
* ```
2810
*/
2811
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName )\
2812
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_5(\
2813
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_functionName, 0 )
2814
2815
/** @brief Export an overloaded 6-ary C++ function to Python, with custom Python name.
2816
* @ingroup ModuleFunctions
2817
*
2818
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_6() with @a s_doc = `nullptr`.
2819
*
2820
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2821
* @param f_cppFunction C++ function to export (may be overloaded)
2822
* @param t_return Return type of the function (for disambiguation)
2823
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for disambiguation)
2824
* @param s_functionName Python function name (const char* string with static storage duration)
2825
*
2826
* @par Example
2827
*
2828
* ```cpp
2829
* PY_MODULE_FUNCTION_QUALIFIED_NAME_6(foo, doBar, R, P1, P2, P3, P4, P5, P6, "do_bar") // foo.do_bar(...)
2830
* ```
2831
*/
2832
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName )\
2833
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_6(\
2834
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_functionName, 0 )
2835
2836
/** @brief Export an overloaded 7-ary C++ function to Python, with custom Python name.
2837
* @ingroup ModuleFunctions
2838
*
2839
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_7() with @a s_doc = `nullptr`.
2840
*
2841
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2842
* @param f_cppFunction C++ function to export (may be overloaded)
2843
* @param t_return Return type of the function (for disambiguation)
2844
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for disambiguation)
2845
* @param s_functionName Python function name (const char* string with static storage duration)
2846
*
2847
* @par Example
2848
*
2849
* ```cpp
2850
* PY_MODULE_FUNCTION_QUALIFIED_NAME_7(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, "do_bar") // foo.do_bar(...)
2851
* ```
2852
*/
2853
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName )\
2854
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_7(\
2855
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_functionName, 0 )
2856
2857
/** @brief Export an overloaded 8-ary C++ function to Python, with custom Python name.
2858
* @ingroup ModuleFunctions
2859
*
2860
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_8() with @a s_doc = `nullptr`.
2861
*
2862
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2863
* @param f_cppFunction C++ function to export (may be overloaded)
2864
* @param t_return Return type of the function (for disambiguation)
2865
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for disambiguation)
2866
* @param s_functionName Python function name (const char* string with static storage duration)
2867
*
2868
* @par Example
2869
*
2870
* ```cpp
2871
* PY_MODULE_FUNCTION_QUALIFIED_NAME_8(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, "do_bar") // foo.do_bar(...)
2872
* ```
2873
*/
2874
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName )\
2875
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_8(\
2876
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_functionName, 0 )
2877
2878
/** @brief Export an overloaded 9-ary C++ function to Python, with custom Python name.
2879
* @ingroup ModuleFunctions
2880
*
2881
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_9() with @a s_doc = `nullptr`.
2882
*
2883
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2884
* @param f_cppFunction C++ function to export (may be overloaded)
2885
* @param t_return Return type of the function (for disambiguation)
2886
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for disambiguation)
2887
* @param s_functionName Python function name (const char* string with static storage duration)
2888
*
2889
* @par Example
2890
*
2891
* ```cpp
2892
* PY_MODULE_FUNCTION_QUALIFIED_NAME_9(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, "do_bar") // foo.do_bar(...)
2893
* ```
2894
*/
2895
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName )\
2896
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_9(\
2897
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_functionName, 0 )
2898
2899
/** @brief Export an overloaded 10-ary C++ function to Python, with custom Python name.
2900
* @ingroup ModuleFunctions
2901
*
2902
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_10() with @a s_doc = `nullptr`.
2903
*
2904
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2905
* @param f_cppFunction C++ function to export (may be overloaded)
2906
* @param t_return Return type of the function (for disambiguation)
2907
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for disambiguation)
2908
* @param s_functionName Python function name (const char* string with static storage duration)
2909
*
2910
* @par Example
2911
*
2912
* ```cpp
2913
* PY_MODULE_FUNCTION_QUALIFIED_NAME_10(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, "do_bar") // foo.do_bar(...)
2914
* ```
2915
*/
2916
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName )\
2917
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_10(\
2918
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_functionName, 0 )
2919
2920
/** @brief Export an overloaded 11-ary C++ function to Python, with custom Python name.
2921
* @ingroup ModuleFunctions
2922
*
2923
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_11() with @a s_doc = `nullptr`.
2924
*
2925
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2926
* @param f_cppFunction C++ function to export (may be overloaded)
2927
* @param t_return Return type of the function (for disambiguation)
2928
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for disambiguation)
2929
* @param s_functionName Python function name (const char* string with static storage duration)
2930
*
2931
* @par Example
2932
*
2933
* ```cpp
2934
* PY_MODULE_FUNCTION_QUALIFIED_NAME_11(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, "do_bar") // foo.do_bar(...)
2935
* ```
2936
*/
2937
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName )\
2938
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_11(\
2939
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_functionName, 0 )
2940
2941
/** @brief Export an overloaded 12-ary C++ function to Python, with custom Python name.
2942
* @ingroup ModuleFunctions
2943
*
2944
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_12() with @a s_doc = `nullptr`.
2945
*
2946
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2947
* @param f_cppFunction C++ function to export (may be overloaded)
2948
* @param t_return Return type of the function (for disambiguation)
2949
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for disambiguation)
2950
* @param s_functionName Python function name (const char* string with static storage duration)
2951
*
2952
* @par Example
2953
*
2954
* ```cpp
2955
* PY_MODULE_FUNCTION_QUALIFIED_NAME_12(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, "do_bar") // foo.do_bar(...)
2956
* ```
2957
*/
2958
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName )\
2959
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_12(\
2960
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_functionName, 0 )
2961
2962
/** @brief Export an overloaded 13-ary C++ function to Python, with custom Python name.
2963
* @ingroup ModuleFunctions
2964
*
2965
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_13() with @a s_doc = `nullptr`.
2966
*
2967
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2968
* @param f_cppFunction C++ function to export (may be overloaded)
2969
* @param t_return Return type of the function (for disambiguation)
2970
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for disambiguation)
2971
* @param s_functionName Python function name (const char* string with static storage duration)
2972
*
2973
* @par Example
2974
*
2975
* ```cpp
2976
* PY_MODULE_FUNCTION_QUALIFIED_NAME_13(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, "do_bar") // foo.do_bar(...)
2977
* ```
2978
*/
2979
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName )\
2980
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_13(\
2981
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_functionName, 0 )
2982
2983
/** @brief Export an overloaded 14-ary C++ function to Python, with custom Python name.
2984
* @ingroup ModuleFunctions
2985
*
2986
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_14() with @a s_doc = `nullptr`.
2987
*
2988
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
2989
* @param f_cppFunction C++ function to export (may be overloaded)
2990
* @param t_return Return type of the function (for disambiguation)
2991
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for disambiguation)
2992
* @param s_functionName Python function name (const char* string with static storage duration)
2993
*
2994
* @par Example
2995
*
2996
* ```cpp
2997
* PY_MODULE_FUNCTION_QUALIFIED_NAME_14(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, "do_bar") // foo.do_bar(...)
2998
* ```
2999
*/
3000
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName )\
3001
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_14(\
3002
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_functionName, 0 )
3003
3004
/** @brief Export an overloaded 15-ary C++ function to Python, with custom Python name.
3005
* @ingroup ModuleFunctions
3006
*
3007
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_15() with @a s_doc = `nullptr`.
3008
*
3009
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3010
* @param f_cppFunction C++ function to export (may be overloaded)
3011
* @param t_return Return type of the function (for disambiguation)
3012
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for disambiguation)
3013
* @param s_functionName Python function name (const char* string with static storage duration)
3014
*
3015
* @par Example
3016
*
3017
* ```cpp
3018
* PY_MODULE_FUNCTION_QUALIFIED_NAME_15(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, "do_bar") // foo.do_bar(...)
3019
* ```
3020
*/
3021
#define PY_MODULE_FUNCTION_QUALIFIED_NAME_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName )\
3022
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_15(\
3023
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_functionName, 0 )
3024
3025
3026
/** @brief Export an overloaded C++ function to Python, with docstring.
3027
* @ingroup ModuleFunctions
3028
*
3029
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC() with @a s_functionName derived from
3030
* @a f_cppFunction.
3031
*
3032
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
3033
* @param f_cppFunction C++ function to export (may be overloaded, name will be used as Python name)
3034
* @param t_return Return type of the function (for disambiguation)
3035
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
3036
* @param s_doc Function documentation string (const char* string with static storage duration)
3037
*
3038
* @par Example
3039
*
3040
* ```cpp
3041
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC(foo, doBar, R, (TypeTuple<P1, P2, P3>), "Do Bar") // foo.doBar(...)
3042
* ```
3043
*/
3044
#define PY_MODULE_FUNCTION_QUALIFIED_DOC( i_module, f_cppFunction, t_return, t_params, s_doc )\
3045
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC( \
3046
i_module, f_cppFunction, t_return, t_params, LASS_STRINGIFY(f_cppFunction), s_doc)
3047
3048
/** @brief Export an overloaded 0-ary C++ function to Python, with docstring.
3049
* @ingroup ModuleFunctions
3050
*
3051
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_0() with @a s_functionName derived from
3052
* @a f_cppFunction.
3053
*
3054
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
3055
* @param f_cppFunction C++ function to export (0 parameters, name will be used as Python name)
3056
* @param t_return Return type of the function (for disambiguation)
3057
* @param s_doc Function documentation string (const char* string with static storage duration)
3058
*
3059
* @par Example
3060
*
3061
* ```cpp
3062
* PY_MODULE_FUNCTION_QUALIFIED_DOC_0(foo, doBar, R, "Do Bar") // foo.doBar(...)
3063
* ```
3064
*/
3065
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_0( i_module, f_cppFunction, t_return, s_doc )\
3066
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_0( \
3067
i_module, f_cppFunction, t_return, LASS_STRINGIFY(f_cppFunction), s_doc)
3068
3069
/** @brief Export an overloaded 1-ary C++ function to Python, with docstring.
3070
* @ingroup ModuleFunctions
3071
*
3072
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_1() with @a s_functionName derived from
3073
* @a f_cppFunction.
3074
*
3075
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3076
* @param f_cppFunction C++ function to export (1 parameters, name will be used as Python name)
3077
* @param t_return Return type of the function (for disambiguation)
3078
* @param t_P1 Parameter types for the function (for disambiguation)
3079
* @param s_doc Function documentation string (const char* string with static storage duration)
3080
*
3081
* @par Example
3082
*
3083
* ```cpp
3084
* PY_MODULE_FUNCTION_QUALIFIED_DOC_1(foo, doBar, R, P1, "Do Bar") // foo.doBar(...)
3085
* ```
3086
*/
3087
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_1( i_module, f_cppFunction, t_return, t_P1, s_doc )\
3088
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_1( \
3089
i_module, f_cppFunction, t_return, t_P1, LASS_STRINGIFY(f_cppFunction), s_doc)
3090
3091
/** @brief Export an overloaded 2-ary C++ function to Python, with docstring.
3092
* @ingroup ModuleFunctions
3093
*
3094
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2() with @a s_functionName derived from
3095
* @a f_cppFunction.
3096
*
3097
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3098
* @param f_cppFunction C++ function to export (2 parameters, name will be used as Python name)
3099
* @param t_return Return type of the function (for disambiguation)
3100
* @param t_P1, t_P2 Parameter types for the function (for disambiguation)
3101
* @param s_doc Function documentation string (const char* string with static storage duration)
3102
*
3103
* @par Example
3104
*
3105
* ```cpp
3106
* PY_MODULE_FUNCTION_QUALIFIED_DOC_2(foo, doBar, R, P1, P2, "Do Bar") // foo.doBar(...)
3107
* ```
3108
*/
3109
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_2( i_module, f_cppFunction, t_return, t_P1, t_P2, s_doc )\
3110
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_2( \
3111
i_module, f_cppFunction, t_return, t_P1, t_P2, LASS_STRINGIFY(f_cppFunction), s_doc)
3112
3113
/** @brief Export an overloaded 3-ary C++ function to Python, with docstring.
3114
* @ingroup ModuleFunctions
3115
*
3116
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_3() with @a s_functionName derived from
3117
* @a f_cppFunction.
3118
*
3119
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3120
* @param f_cppFunction C++ function to export (3 parameters, name will be used as Python name)
3121
* @param t_return Return type of the function (for disambiguation)
3122
* @param t_P1, t_P2, t_P3 Parameter types for the function (for disambiguation)
3123
* @param s_doc Function documentation string (const char* string with static storage duration)
3124
*
3125
* @par Example
3126
*
3127
* ```cpp
3128
* PY_MODULE_FUNCTION_QUALIFIED_DOC_3(foo, doBar, R, P1, P2, P3, "Do Bar") // foo.doBar(...)
3129
* ```
3130
*/
3131
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, s_doc )\
3132
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_3( \
3133
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, LASS_STRINGIFY(f_cppFunction), s_doc)
3134
3135
/** @brief Export an overloaded 4-ary C++ function to Python, with docstring.
3136
* @ingroup ModuleFunctions
3137
*
3138
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_4() with @a s_functionName derived from
3139
* @a f_cppFunction.
3140
*
3141
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3142
* @param f_cppFunction C++ function to export (4 parameters, name will be used as Python name)
3143
* @param t_return Return type of the function (for disambiguation)
3144
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for disambiguation)
3145
* @param s_doc Function documentation string (const char* string with static storage duration)
3146
*
3147
* @par Example
3148
*
3149
* ```cpp
3150
* PY_MODULE_FUNCTION_QUALIFIED_DOC_4(foo, doBar, R, P1, P2, P3, P4, "Do Bar") // foo.doBar(...)
3151
* ```
3152
*/
3153
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, s_doc )\
3154
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_4( \
3155
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, LASS_STRINGIFY(f_cppFunction), s_doc)
3156
3157
/** @brief Export an overloaded 5-ary C++ function to Python, with docstring.
3158
* @ingroup ModuleFunctions
3159
*
3160
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_5() with @a s_functionName derived from
3161
* @a f_cppFunction.
3162
*
3163
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3164
* @param f_cppFunction C++ function to export (5 parameters, name will be used as Python name)
3165
* @param t_return Return type of the function (for disambiguation)
3166
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for disambiguation)
3167
* @param s_doc Function documentation string (const char* string with static storage duration)
3168
*
3169
* @par Example
3170
*
3171
* ```cpp
3172
* PY_MODULE_FUNCTION_QUALIFIED_DOC_5(foo, doBar, R, P1, P2, P3, P4, P5, "Do Bar") // foo.doBar(...)
3173
* ```
3174
*/
3175
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_doc )\
3176
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_5( \
3177
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, LASS_STRINGIFY(f_cppFunction), s_doc)
3178
3179
/** @brief Export an overloaded 6-ary C++ function to Python, with docstring.
3180
* @ingroup ModuleFunctions
3181
*
3182
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_6() with @a s_functionName derived from
3183
* @a f_cppFunction.
3184
*
3185
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3186
* @param f_cppFunction C++ function to export (6 parameters, name will be used as Python name)
3187
* @param t_return Return type of the function (for disambiguation)
3188
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for disambiguation)
3189
* @param s_doc Function documentation string (const char* string with static storage duration)
3190
*
3191
* @par Example
3192
*
3193
* ```cpp
3194
* PY_MODULE_FUNCTION_QUALIFIED_DOC_6(foo, doBar, R, P1, P2, P3, P4, P5, P6, "Do Bar") // foo.doBar(...)
3195
* ```
3196
*/
3197
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_doc )\
3198
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_6( \
3199
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, LASS_STRINGIFY(f_cppFunction), s_doc)
3200
3201
/** @brief Export an overloaded 7-ary C++ function to Python, with docstring.
3202
* @ingroup ModuleFunctions
3203
*
3204
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_7() with @a s_functionName derived from
3205
* @a f_cppFunction.
3206
*
3207
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3208
* @param f_cppFunction C++ function to export (7 parameters, name will be used as Python name)
3209
* @param t_return Return type of the function (for disambiguation)
3210
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for disambiguation)
3211
* @param s_doc Function documentation string (const char* string with static storage duration)
3212
*
3213
* @par Example
3214
*
3215
* ```cpp
3216
* PY_MODULE_FUNCTION_QUALIFIED_DOC_7(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, "Do Bar") // foo.doBar(...)
3217
* ```
3218
*/
3219
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_doc )\
3220
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_7( \
3221
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, LASS_STRINGIFY(f_cppFunction), s_doc)
3222
3223
/** @brief Export an overloaded 8-ary C++ function to Python, with docstring.
3224
* @ingroup ModuleFunctions
3225
*
3226
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_8() with @a s_functionName derived from
3227
* @a f_cppFunction.
3228
*
3229
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3230
* @param f_cppFunction C++ function to export (8 parameters, name will be used as Python name)
3231
* @param t_return Return type of the function (for disambiguation)
3232
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for disambiguation)
3233
* @param s_doc Function documentation string (const char* string with static storage duration)
3234
*
3235
* @par Example
3236
*
3237
* ```cpp
3238
* PY_MODULE_FUNCTION_QUALIFIED_DOC_8(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, "Do Bar") // foo.doBar(...)
3239
* ```
3240
*/
3241
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_doc )\
3242
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_8( \
3243
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, LASS_STRINGIFY(f_cppFunction), s_doc)
3244
3245
/** @brief Export an overloaded 9-ary C++ function to Python, with docstring.
3246
* @ingroup ModuleFunctions
3247
*
3248
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_9() with @a s_functionName derived from
3249
* @a f_cppFunction.
3250
*
3251
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3252
* @param f_cppFunction C++ function to export (9 parameters, name will be used as Python name)
3253
* @param t_return Return type of the function (for disambiguation)
3254
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for disambiguation)
3255
* @param s_doc Function documentation string (const char* string with static storage duration)
3256
*
3257
* @par Example
3258
*
3259
* ```cpp
3260
* PY_MODULE_FUNCTION_QUALIFIED_DOC_9(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, "Do Bar") // foo.doBar(...)
3261
* ```
3262
*/
3263
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_doc )\
3264
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_9( \
3265
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, LASS_STRINGIFY(f_cppFunction), s_doc)
3266
3267
/** @brief Export an overloaded 10-ary C++ function to Python, with docstring.
3268
* @ingroup ModuleFunctions
3269
*
3270
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_10() with @a s_functionName derived from
3271
* @a f_cppFunction.
3272
*
3273
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3274
* @param f_cppFunction C++ function to export (10 parameters, name will be used as Python name)
3275
* @param t_return Return type of the function (for disambiguation)
3276
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for disambiguation)
3277
* @param s_doc Function documentation string (const char* string with static storage duration)
3278
*
3279
* @par Example
3280
*
3281
* ```cpp
3282
* PY_MODULE_FUNCTION_QUALIFIED_DOC_10(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, "Do Bar") // foo.doBar(...)
3283
* ```
3284
*/
3285
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_doc )\
3286
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_10( \
3287
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, LASS_STRINGIFY(f_cppFunction), s_doc)
3288
3289
/** @brief Export an overloaded 11-ary C++ function to Python, with docstring.
3290
* @ingroup ModuleFunctions
3291
*
3292
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_11() with @a s_functionName derived from
3293
* @a f_cppFunction.
3294
*
3295
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3296
* @param f_cppFunction C++ function to export (11 parameters, name will be used as Python name)
3297
* @param t_return Return type of the function (for disambiguation)
3298
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for disambiguation)
3299
* @param s_doc Function documentation string (const char* string with static storage duration)
3300
*
3301
* @par Example
3302
*
3303
* ```cpp
3304
* PY_MODULE_FUNCTION_QUALIFIED_DOC_11(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, "Do Bar") // foo.doBar(...)
3305
* ```
3306
*/
3307
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_doc )\
3308
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_11( \
3309
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, LASS_STRINGIFY(f_cppFunction), s_doc)
3310
3311
/** @brief Export an overloaded 12-ary C++ function to Python, with docstring.
3312
* @ingroup ModuleFunctions
3313
*
3314
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_12() with @a s_functionName derived from
3315
* @a f_cppFunction.
3316
*
3317
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3318
* @param f_cppFunction C++ function to export (12 parameters, name will be used as Python name)
3319
* @param t_return Return type of the function (for disambiguation)
3320
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for disambiguation)
3321
* @param s_doc Function documentation string (const char* string with static storage duration)
3322
*
3323
* @par Example
3324
*
3325
* ```cpp
3326
* PY_MODULE_FUNCTION_QUALIFIED_DOC_12(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, "Do Bar") // foo.doBar(...)
3327
* ```
3328
*/
3329
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_doc )\
3330
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_12( \
3331
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, LASS_STRINGIFY(f_cppFunction), s_doc)
3332
3333
/** @brief Export an overloaded 13-ary C++ function to Python, with docstring.
3334
* @ingroup ModuleFunctions
3335
*
3336
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_13() with @a s_functionName derived from
3337
* @a f_cppFunction.
3338
*
3339
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3340
* @param f_cppFunction C++ function to export (13 parameters, name will be used as Python name)
3341
* @param t_return Return type of the function (for disambiguation)
3342
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for disambiguation)
3343
* @param s_doc Function documentation string (const char* string with static storage duration)
3344
*
3345
* @par Example
3346
*
3347
* ```cpp
3348
* PY_MODULE_FUNCTION_QUALIFIED_DOC_13(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, "Do Bar") // foo.doBar(...)
3349
* ```
3350
*/
3351
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_doc )\
3352
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_13( \
3353
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, LASS_STRINGIFY(f_cppFunction), s_doc)
3354
3355
/** @brief Export an overloaded 14-ary C++ function to Python, with docstring.
3356
* @ingroup ModuleFunctions
3357
*
3358
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_14() with @a s_functionName derived from
3359
* @a f_cppFunction.
3360
*
3361
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3362
* @param f_cppFunction C++ function to export (14 parameters, name will be used as Python name)
3363
* @param t_return Return type of the function (for disambiguation)
3364
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for disambiguation)
3365
* @param s_doc Function documentation string (const char* string with static storage duration)
3366
*
3367
* @par Example
3368
*
3369
* ```cpp
3370
* PY_MODULE_FUNCTION_QUALIFIED_DOC_14(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, "Do Bar") // foo.doBar(...)
3371
* ```
3372
*/
3373
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_doc )\
3374
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_14( \
3375
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, LASS_STRINGIFY(f_cppFunction), s_doc)
3376
3377
/** @brief Export an overloaded 15-ary C++ function to Python, with docstring.
3378
* @ingroup ModuleFunctions
3379
*
3380
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_15() with @a s_functionName derived from
3381
* @a f_cppFunction.
3382
*
3383
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3384
* @param f_cppFunction C++ function to export (15 parameters, name will be used as Python name)
3385
* @param t_return Return type of the function (for disambiguation)
3386
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for disambiguation)
3387
* @param s_doc Function documentation string (const char* string with static storage duration)
3388
*
3389
* @par Example
3390
*
3391
* ```cpp
3392
* PY_MODULE_FUNCTION_QUALIFIED_DOC_15(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, "Do Bar") // foo.doBar(...)
3393
* ```
3394
*/
3395
#define PY_MODULE_FUNCTION_QUALIFIED_DOC_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_doc )\
3396
PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC_15( \
3397
i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, LASS_STRINGIFY(f_cppFunction), s_doc)
3398
3399
3400
/** @brief Export an overloaded C++ function to Python.
3401
* @ingroup ModuleFunctions
3402
*
3403
* Wraps PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC() with defaults.
3404
*
3405
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
3406
* @param f_cppFunction C++ function to export (may be overloaded, name will be used as Python name)
3407
* @param t_return Return type of the function (for disambiguation)
3408
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
3409
*
3410
* @par Example
3411
*
3412
* ```cpp
3413
* PY_MODULE_FUNCTION_QUALIFIED_NAME_DOC(foo, doBar, R, (TypeTuple<P1, P2, P3>)) // foo.doBar(...)
3414
* ```
3415
*/
3416
#define PY_MODULE_FUNCTION_QUALIFIED( i_module, f_cppFunction, t_return, t_params )\
3417
PY_MODULE_FUNCTION_QUALIFIED_DOC( i_module, f_cppFunction, t_return, t_params, 0 )
3418
3419
/** @brief Export an overloaded 0-ary C++ function to Python.
3420
* @ingroup ModuleFunctions
3421
*
3422
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_0() with @a s_doc = `nullptr`.
3423
*
3424
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
3425
* @param f_cppFunction C++ function to export (0 parameters, name will be used as Python name)
3426
* @param t_return Return type of the function (for disambiguation)
3427
*
3428
* @par Example
3429
*
3430
* ```cpp
3431
* PY_MODULE_FUNCTION_QUALIFIED_0(foo, doBar, R) // foo.doBar(...)
3432
* ```
3433
*/
3434
#define PY_MODULE_FUNCTION_QUALIFIED_0( i_module, f_cppFunction, t_return )\
3435
PY_MODULE_FUNCTION_QUALIFIED_DOC_0( i_module, f_cppFunction, t_return, 0 )
3436
3437
/** @brief Export an overloaded 1-ary C++ function to Python.
3438
* @ingroup ModuleFunctions
3439
*
3440
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_1() with @a s_doc = `nullptr`.
3441
*
3442
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3443
* @param f_cppFunction C++ function to export (1 parameters, name will be used as Python name)
3444
* @param t_return Return type of the function (for disambiguation)
3445
* @param t_P1 Parameter types for the function (for disambiguation)
3446
*
3447
* @par Example
3448
*
3449
* ```cpp
3450
* PY_MODULE_FUNCTION_QUALIFIED_1(foo, doBar, R, P1) // foo.doBar(...)
3451
* ```
3452
*/
3453
#define PY_MODULE_FUNCTION_QUALIFIED_1( i_module, f_cppFunction, t_return, t_P1 )\
3454
PY_MODULE_FUNCTION_QUALIFIED_DOC_1( i_module, f_cppFunction, t_return, t_P1, 0 )
3455
3456
/** @brief Export an overloaded 2-ary C++ function to Python.
3457
* @ingroup ModuleFunctions
3458
*
3459
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_2() with @a s_doc = `nullptr`.
3460
*
3461
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3462
* @param f_cppFunction C++ function to export (2 parameters, name will be used as Python name)
3463
* @param t_return Return type of the function (for disambiguation)
3464
* @param t_P1, t_P2 Parameter types for the function (for disambiguation)
3465
*
3466
* @par Example
3467
*
3468
* ```cpp
3469
* PY_MODULE_FUNCTION_QUALIFIED_2(foo, doBar, R, P1, P2) // foo.doBar(...)
3470
* ```
3471
*/
3472
#define PY_MODULE_FUNCTION_QUALIFIED_2( i_module, f_cppFunction, t_return, t_P1, t_P2 )\
3473
PY_MODULE_FUNCTION_QUALIFIED_DOC_2( i_module, f_cppFunction, t_return, t_P1, t_P2, 0 )
3474
3475
/** @brief Export an overloaded 3-ary C++ function to Python.
3476
* @ingroup ModuleFunctions
3477
*
3478
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_3() with @a s_doc = `nullptr`.
3479
*
3480
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3481
* @param f_cppFunction C++ function to export (3 parameters, name will be used as Python name)
3482
* @param t_return Return type of the function (for disambiguation)
3483
* @param t_P1, t_P2, t_P3 Parameter types for the function (for disambiguation)
3484
*
3485
* @par Example
3486
*
3487
* ```cpp
3488
* PY_MODULE_FUNCTION_QUALIFIED_3(foo, doBar, R, P1, P2, P3) // foo.doBar(...)
3489
* ```
3490
*/
3491
#define PY_MODULE_FUNCTION_QUALIFIED_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3 )\
3492
PY_MODULE_FUNCTION_QUALIFIED_DOC_3( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, 0 )
3493
3494
/** @brief Export an overloaded 4-ary C++ function to Python.
3495
* @ingroup ModuleFunctions
3496
*
3497
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_4() with @a s_doc = `nullptr`.
3498
*
3499
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3500
* @param f_cppFunction C++ function to export (4 parameters, name will be used as Python name)
3501
* @param t_return Return type of the function (for disambiguation)
3502
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the function (for disambiguation)
3503
*
3504
* @par Example
3505
*
3506
* ```cpp
3507
* PY_MODULE_FUNCTION_QUALIFIED_4(foo, doBar, R, P1, P2, P3, P4) // foo.doBar(...)
3508
* ```
3509
*/
3510
#define PY_MODULE_FUNCTION_QUALIFIED_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4 )\
3511
PY_MODULE_FUNCTION_QUALIFIED_DOC_4( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, 0 )
3512
3513
/** @brief Export an overloaded 5-ary C++ function to Python.
3514
* @ingroup ModuleFunctions
3515
*
3516
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_5() with @a s_doc = `nullptr`.
3517
*
3518
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3519
* @param f_cppFunction C++ function to export (5 parameters, name will be used as Python name)
3520
* @param t_return Return type of the function (for disambiguation)
3521
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the function (for disambiguation)
3522
*
3523
* @par Example
3524
*
3525
* ```cpp
3526
* PY_MODULE_FUNCTION_QUALIFIED_5(foo, doBar, R, P1, P2, P3, P4, P5) // foo.doBar(...)
3527
* ```
3528
*/
3529
#define PY_MODULE_FUNCTION_QUALIFIED_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5 )\
3530
PY_MODULE_FUNCTION_QUALIFIED_DOC_5( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, 0 )
3531
3532
/** @brief Export an overloaded 6-ary C++ function to Python.
3533
* @ingroup ModuleFunctions
3534
*
3535
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_6() with @a s_doc = `nullptr`.
3536
*
3537
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3538
* @param f_cppFunction C++ function to export (6 parameters, name will be used as Python name)
3539
* @param t_return Return type of the function (for disambiguation)
3540
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the function (for disambiguation)
3541
*
3542
* @par Example
3543
*
3544
* ```cpp
3545
* PY_MODULE_FUNCTION_QUALIFIED_6(foo, doBar, R, P1, P2, P3, P4, P5, P6) // foo.doBar(...)
3546
* ```
3547
*/
3548
#define PY_MODULE_FUNCTION_QUALIFIED_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 )\
3549
PY_MODULE_FUNCTION_QUALIFIED_DOC_6( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, 0 )
3550
3551
/** @brief Export an overloaded 7-ary C++ function to Python.
3552
* @ingroup ModuleFunctions
3553
*
3554
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_7() with @a s_doc = `nullptr`.
3555
*
3556
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3557
* @param f_cppFunction C++ function to export (7 parameters, name will be used as Python name)
3558
* @param t_return Return type of the function (for disambiguation)
3559
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the function (for disambiguation)
3560
*
3561
* @par Example
3562
*
3563
* ```cpp
3564
* PY_MODULE_FUNCTION_QUALIFIED_7(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7) // foo.doBar(...)
3565
* ```
3566
*/
3567
#define PY_MODULE_FUNCTION_QUALIFIED_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 )\
3568
PY_MODULE_FUNCTION_QUALIFIED_DOC_7( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, 0 )
3569
3570
/** @brief Export an overloaded 8-ary C++ function to Python.
3571
* @ingroup ModuleFunctions
3572
*
3573
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_8() with @a s_doc = `nullptr`.
3574
*
3575
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3576
* @param f_cppFunction C++ function to export (8 parameters, name will be used as Python name)
3577
* @param t_return Return type of the function (for disambiguation)
3578
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the function (for disambiguation)
3579
*
3580
* @par Example
3581
*
3582
* ```cpp
3583
* PY_MODULE_FUNCTION_QUALIFIED_8(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8) // foo.doBar(...)
3584
* ```
3585
*/
3586
#define PY_MODULE_FUNCTION_QUALIFIED_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 )\
3587
PY_MODULE_FUNCTION_QUALIFIED_DOC_8( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, 0 )
3588
3589
/** @brief Export an overloaded 9-ary C++ function to Python.
3590
* @ingroup ModuleFunctions
3591
*
3592
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_9() with @a s_doc = `nullptr`.
3593
*
3594
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3595
* @param f_cppFunction C++ function to export (9 parameters, name will be used as Python name)
3596
* @param t_return Return type of the function (for disambiguation)
3597
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the function (for disambiguation)
3598
*
3599
* @par Example
3600
*
3601
* ```cpp
3602
* PY_MODULE_FUNCTION_QUALIFIED_9(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9) // foo.doBar(...)
3603
* ```
3604
*/
3605
#define PY_MODULE_FUNCTION_QUALIFIED_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 )\
3606
PY_MODULE_FUNCTION_QUALIFIED_DOC_9( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, 0 )
3607
3608
/** @brief Export an overloaded 10-ary C++ function to Python.
3609
* @ingroup ModuleFunctions
3610
*
3611
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_10() with @a s_doc = `nullptr`.
3612
*
3613
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3614
* @param f_cppFunction C++ function to export (10 parameters, name will be used as Python name)
3615
* @param t_return Return type of the function (for disambiguation)
3616
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the function (for disambiguation)
3617
*
3618
* @par Example
3619
*
3620
* ```cpp
3621
* PY_MODULE_FUNCTION_QUALIFIED_10(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) // foo.doBar(...)
3622
* ```
3623
*/
3624
#define PY_MODULE_FUNCTION_QUALIFIED_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 )\
3625
PY_MODULE_FUNCTION_QUALIFIED_DOC_10( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, 0 )
3626
3627
/** @brief Export an overloaded 11-ary C++ function to Python.
3628
* @ingroup ModuleFunctions
3629
*
3630
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_11() with @a s_doc = `nullptr`.
3631
*
3632
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3633
* @param f_cppFunction C++ function to export (11 parameters, name will be used as Python name)
3634
* @param t_return Return type of the function (for disambiguation)
3635
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the function (for disambiguation)
3636
*
3637
* @par Example
3638
*
3639
* ```cpp
3640
* PY_MODULE_FUNCTION_QUALIFIED_11(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) // foo.doBar(...)
3641
* ```
3642
*/
3643
#define PY_MODULE_FUNCTION_QUALIFIED_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 )\
3644
PY_MODULE_FUNCTION_QUALIFIED_DOC_11( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, 0 )
3645
3646
/** @brief Export an overloaded 12-ary C++ function to Python.
3647
* @ingroup ModuleFunctions
3648
*
3649
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_12() with @a s_doc = `nullptr`.
3650
*
3651
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3652
* @param f_cppFunction C++ function to export (12 parameters, name will be used as Python name)
3653
* @param t_return Return type of the function (for disambiguation)
3654
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the function (for disambiguation)
3655
*
3656
* @par Example
3657
*
3658
* ```cpp
3659
* PY_MODULE_FUNCTION_QUALIFIED_12(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) // foo.doBar(...)
3660
* ```
3661
*/
3662
#define PY_MODULE_FUNCTION_QUALIFIED_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 )\
3663
PY_MODULE_FUNCTION_QUALIFIED_DOC_12( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, 0 )
3664
3665
/** @brief Export an overloaded 13-ary C++ function to Python.
3666
* @ingroup ModuleFunctions
3667
*
3668
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_13() with @a s_doc = `nullptr`.
3669
*
3670
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3671
* @param f_cppFunction C++ function to export (13 parameters, name will be used as Python name)
3672
* @param t_return Return type of the function (for disambiguation)
3673
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the function (for disambiguation)
3674
*
3675
* @par Example
3676
*
3677
* ```cpp
3678
* PY_MODULE_FUNCTION_QUALIFIED_13(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) // foo.doBar(...)
3679
* ```
3680
*/
3681
#define PY_MODULE_FUNCTION_QUALIFIED_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 )\
3682
PY_MODULE_FUNCTION_QUALIFIED_DOC_13( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, 0 )
3683
3684
/** @brief Export an overloaded 14-ary C++ function to Python.
3685
* @ingroup ModuleFunctions
3686
*
3687
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_14() with @a s_doc = `nullptr`.
3688
*
3689
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3690
* @param f_cppFunction C++ function to export (14 parameters, name will be used as Python name)
3691
* @param t_return Return type of the function (for disambiguation)
3692
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the function (for disambiguation)
3693
*
3694
* @par Example
3695
*
3696
* ```cpp
3697
* PY_MODULE_FUNCTION_QUALIFIED_14(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) // foo.doBar(...)
3698
* ```
3699
*/
3700
#define PY_MODULE_FUNCTION_QUALIFIED_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 )\
3701
PY_MODULE_FUNCTION_QUALIFIED_DOC_14( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, 0 )
3702
3703
/** @brief Export an overloaded 15-ary C++ function to Python.
3704
* @ingroup ModuleFunctions
3705
*
3706
* Wraps PY_MODULE_FUNCTION_QUALIFIED_DOC_15() with @a s_doc = `nullptr`.
3707
*
3708
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*()`
3709
* @param f_cppFunction C++ function to export (15 parameters, name will be used as Python name)
3710
* @param t_return Return type of the function (for disambiguation)
3711
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the function (for disambiguation)
3712
*
3713
* @par Example
3714
*
3715
* ```cpp
3716
* PY_MODULE_FUNCTION_QUALIFIED_15(foo, doBar, R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) // foo.doBar(...)
3717
* ```
3718
*/
3719
#define PY_MODULE_FUNCTION_QUALIFIED_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 )\
3720
PY_MODULE_FUNCTION_QUALIFIED_DOC_15( i_module, f_cppFunction, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, 0 )
3721
3722
3723
/** @} */
3724
3725
3726
3727
// --- classes -------------------------------------------------------------------------------------
3728
3729
/** @addtogroup ClassDefinition
3730
* @name Class Declaration & Setup
3731
*
3732
* Macros to declare and configure Python classes from C++ types.
3733
*
3734
* These macros create the internal class definition objects that aggregate all the information
3735
* needed to generate a Python type. Every C++ class that needs to be exposed to Python must be
3736
* declared using one of these macros.
3737
*
3738
* LASS supports two approaches for exporting C++ classes to Python:
3739
*
3740
* 1. **Direct Python classes**: C++ classes that directly inherit from lass::python::PyObjectPlus
3741
* and are designed to be Python-aware from the start.
3742
*
3743
* 2. **@ref ShadowClasses**: Wrapper classes created for existing native C++ types using the
3744
* shadow system.
3745
*
3746
* @note In both cases, the class parameter in these declaration macros refers to the Python
3747
* binding class (either PyObjectPlus-derived or shadow wrapper), never the underlying native
3748
* C++ type being shadowed.
3749
*
3750
* The basic form is
3751
*
3752
* ```cpp
3753
* PY_DECLARE_CLASS( i_cppClass )
3754
* ```
3755
*
3756
* with:
3757
* - @a i_cppClass : Python binding class, either a @ref ShadowClasses "shadow class" or a class
3758
* deriving from lass::python::PyObjectPlus
3759
*
3760
* @par Common suffixes
3761
*
3762
* The `_NAME` and `_DOC` suffixes allow you to specify a custom Python name and docstring.
3763
*
3764
* | Macro | Fixed parameters | Adds parameters | Use for ... |
3765
* |-----------------------------|------------------|-------------------------------------|--------------------------------|
3766
* | `PY_DECLARE_CLASS_NAME` | `t_cppClass` | `s_name` | Custom Python name |
3767
* | `PY_DECLARE_CLASS_DOC` | `i_cppClass` | `s_doc` | With docstring |
3768
* | `PY_DECLARE_CLASS_NAME_DOC` | `t_cppClass` | `s_name`, `s_doc` | Custom Python name + Docstring |
3769
* | `PY_DECLARE_CLASS_EX` | `t_cppClass` | `s_name`, `i_uniqueClassIdentifier` | (deprecated) |
3770
*
3771
* @par Direct Python Class Example:
3772
* ```cpp
3773
* // In header file (MyClass.h):
3774
* class MyClass: public PyObjectPlus
3775
* {
3776
* PY_HEADER(PyObjectPlus)
3777
* public:
3778
* MyClass();
3779
* void someMethod();
3780
* };
3781
*
3782
* // In source file (MyClass.cpp):
3783
* PY_DECLARE_CLASS_NAME_DOC(MyClass, "MyClass", "A sample class")
3784
* // ... add methods, constructors, properties etc.
3785
* ```
3786
*
3787
* @par Shadow Class Example:
3788
* ```cpp
3789
* // Existing non-Python-aware C++ class:
3790
* class LegacyClass
3791
* {
3792
* public:
3793
* void doSomething();
3794
* };
3795
*
3796
* // Shadow wrapper class:
3797
* PY_SHADOW_CLASS(LASS_DLL_EXPORT, PyShadowLegacyClass, LegacyClass)
3798
*
3799
* // Declaration (note: we declare the shadow class, not LegacyClass):
3800
* PY_DECLARE_CLASS_NAME_DOC(PyShadowLegacyClass, "LegacyClass", "Legacy class wrapper")
3801
* ```
3802
*
3803
* @{
3804
*/
3805
3806
/** @brief Declare a Python class with full control over name and documentation.
3807
*
3808
* This is the primary class declaration macro that creates the internal ClassDefinition object for
3809
* a C++ class. All other class declaration macros ultimately call this one. The class definition
3810
* collects constructors, methods, properties, and other elements that will be added later using
3811
* `PY_CLASS_*` macros.
3812
*
3813
* @param t_cppClass Python binding class type. This must be either:
3814
* - A class directly inheriting from PyObjectPlus, or
3815
* - A shadow class created with PY_SHADOW_CLASS macros.
3816
* Never pass the underlying native C++ shadowed type.
3817
* @param s_name Python class name as string literal
3818
* @param s_doc Class documentation string (or nullptr for no doc)
3819
*
3820
* @note This macro must be used exactly once per class and only in source files, never in headers!
3821
*
3822
* @par Direct Python Class Example:
3823
* ```cpp
3824
* PY_DECLARE_CLASS_NAME_DOC(MyClass, "MyClass", "A sample direct Python class")
3825
* ```
3826
*
3827
* @par Shadow Class Example:
3828
* ```cpp
3829
* PY_DECLARE_CLASS_NAME_DOC(PyShadowLegacy, "LegacyClass", "Wrapper for LegacyClass")
3830
* ```
3831
*
3832
* @ingroup ClassDefinition
3833
*/
3834
#define PY_DECLARE_CLASS_NAME_DOC( t_cppClass, s_name, s_doc ) \
3835
::lass::python::impl::ClassDefinition t_cppClass ::_lassPyClassDef( \
3836
s_name, s_doc, sizeof(t_cppClass), \
3837
::lass::python::impl::richCompareDispatcher< t_cppClass >,\
3838
& t_cppClass ::_lassPyParentType::_lassPyClassDef, \
3839
& t_cppClass ::_lassPyClassRegisterHook);
3840
3841
/** @brief Declare a Python class with custom name but no documentation.
3842
*
3843
* Convenience wrapper around PY_DECLARE_CLASS_NAME_DOC that omits the documentation string.
3844
* Use this when you want to control the Python class name but don't need documentation.
3845
*
3846
* @param t_cppClass Python binding class type (PyObjectPlus-derived or shadow class)
3847
* @param s_name Python class name as string literal
3848
*
3849
* @par Example
3850
* ```cpp
3851
* PY_DECLARE_CLASS_NAME(MyClass, "MyClass")
3852
* ```
3853
*
3854
* @ingroup ClassDefinition
3855
*/
3856
#define PY_DECLARE_CLASS_NAME( t_cppClass, s_name )\
3857
PY_DECLARE_CLASS_NAME_DOC( t_cppClass, s_name, 0 )
3858
3859
/** @brief Declare a Python class with automatic name and custom documentation.
3860
*
3861
* Convenience wrapper that uses the C++ class name as the Python class name but allows custom
3862
* documentation. The class name is automatically stringified.
3863
*
3864
* @param i_cppClass Python-exportable C++ class identifier (unqualified name)
3865
* @param s_doc Class documentation string
3866
*
3867
* @par Example
3868
* ```cpp
3869
* PY_DECLARE_CLASS_DOC(MyClass, "A sample class for demonstration") // Creates Python class named "MyClass"
3870
* ```
3871
*
3872
* @ingroup ClassDefinition
3873
*/
3874
#define PY_DECLARE_CLASS_DOC( i_cppClass, s_doc ) \
3875
PY_DECLARE_CLASS_NAME_DOC( i_cppClass, LASS_STRINGIFY(i_cppClass), s_doc )
3876
3877
/** @brief Declare a Python class with automatic name and no documentation.
3878
*
3879
* The simplest class declaration macro. Uses the C++ class name as the Python class name and
3880
* provides no documentation string. Most commonly used for basic class exports.
3881
*
3882
* @param i_cppClass Python binding class identifier (unqualified name)
3883
*
3884
* @par Example
3885
* ```cpp
3886
* PY_DECLARE_CLASS(MyClass) // Creates Python class named "MyClass" with no documentation
3887
* ```
3888
*
3889
* @ingroup ClassDefinition
3890
*/
3891
#define PY_DECLARE_CLASS( i_cppClass ) \
3892
PY_DECLARE_CLASS_NAME_DOC( i_cppClass, LASS_STRINGIFY(i_cppClass), 0 )
3893
3894
/** @brief Legacy class declaration macro.
3895
*
3896
* @param t_cppClass Python binding class type
3897
* @param s_name Python class name
3898
* @param i_uniqueClassIdentifier Unused parameter (legacy)
3899
*
3900
* @deprecated This macro is deprecated and should not be used in new code. Use
3901
* PY_DECLARE_CLASS_NAME_DOC() instead.
3902
*
3903
* @ingroup ClassDefinition
3904
*/
3905
#define PY_DECLARE_CLASS_EX( t_cppClass, s_name, i_uniqueClassIdentifier )\
3906
PY_DECLARE_CLASS_NAME_DOC( t_cppClass, s_name, 0 )
3907
3908
/** @} */
3909
3910
3911
3912
/** @addtogroup ModuleDefinition
3913
* @name Class Integration
3914
*
3915
* Macros to add Python classes to modules.
3916
*
3917
* These macros integrate class definitions with module definitions, making the classes available
3918
* as types within the module namespace. Classes must first be declared using `PY_DECLARE_CLASS_*`
3919
* macros before they can be added to modules.
3920
*
3921
* @{
3922
*/
3923
3924
/** @brief Inject a class into a module at runtime
3925
* @ingroup ModuleDefinition
3926
*
3927
* This is the legacy runtime approach for adding classes to modules. Use PY_MODULE_CLASS() instead
3928
* for compile-time registration.
3929
*
3930
* @param t_cppClass Python binding class type that has been declared with PY_DECLARE_CLASS_*
3931
* @param i_module Module object identifier to inject the class into
3932
* @param s_doc Optional class documentation string (or nullptr)
3933
*
3934
* @note This macro must be invoked after the module has been created. It's best to place this in
3935
* a postInject function as shown in the example below. The postInject function gets the
3936
* module object as a parameter, but don't use that if you want the Lass stubgen tool to
3937
* work correctly. Work on the module definition instead (the one you created with
3938
* PY_DECLARE_MODULE()).
3939
*
3940
* @par Example
3941
* ```cpp
3942
* PY_DECLARE_MODULE( mymodule )
3943
* PY_DECLARE_CLASS(MyClass)
3944
* void mymodule_postinject(PyObject*)
3945
* {
3946
* PY_INJECT_CLASS_IN_MODULE(MyClass, mymodule, "Sample class") // mymodule.MyClass
3947
* }
3948
* LASS_EXECUTE_BEFORE_MAIN( mymodule.setPostInject(mymodule_postinject); )
3949
* PY_MODULE_ENTRYPOINT( mymodule)
3950
* ```
3951
*/
3952
#define PY_INJECT_CLASS_IN_MODULE( t_cppClass, i_module, s_doc ) \
3953
t_cppClass::_lassPyClassDef.setDocIfNotNull(s_doc);\
3954
i_module.injectClass(t_cppClass::_lassPyClassDef);
3955
3956
/** @brief Add a Python class to a module.
3957
* @ingroup ModuleDefinition
3958
*
3959
* Registers a class definition to be included in the module when it is created.
3960
* The class must have been declared with `PY_DECLARE_CLASS_*` macros.
3961
* This is executed before `main()`, so the class is available when the module is created.
3962
*
3963
* @param i_module Module identifier declared by `PY_DECLARE_MODULE_*`
3964
* (must be unscoped identifier for token concatenation)
3965
* @param t_cppClass Python binding class type that has been declared with `PY_DECLARE_CLASS_*`
3966
*
3967
* @par Example
3968
* ```cpp
3969
* PY_DECLARE_CLASS_NAME_DOC(MyClass, "MyClass", "Sample class")
3970
* PY_MODULE_CLASS(mymodule, MyClass)
3971
* ```
3972
*/
3973
#define PY_MODULE_CLASS( i_module, t_cppClass ) \
3974
LASS_EXECUTE_BEFORE_MAIN_EX\
3975
( LASS_CONCATENATE( lassExecutePyModuleClass_, i_module ),\
3976
i_module.addClass( t_cppClass ::_lassPyClassDef); \
3977
)
3978
3979
/** @} */
3980
3981
3982
3983
/** @defgroup ClassAttributes Class Attribute Export Macros
3984
* @ingroup ClassDefinition
3985
*
3986
* Export values and nested types as attributes on the Python class itself.
3987
*
3988
* Unlike @ref ClassMembers "properties" which install descriptors that get or set member data from
3989
* or on instances, these attributes are set directly on the Python type object when the class is
3990
* frozen and are immutable. In Python, they are reached as `Foo.CONSTANT` or `Outer.Inner`,
3991
* without an instance.
3992
*
3993
* Nested enums work the same way, but are exported with PY_CLASS_ENUM(), which is documented in
3994
* @ref EnumDefinition.
3995
*/
3996
3997
/** @addtogroup ClassAttributes
3998
* @name Static Constants
3999
*
4000
* These macros allow you to expose compile-time constant values as static attributes of Python
4001
* classes. The values are converted to Python objects using PyExportTraits and become accessible
4002
* as class-level attributes in Python.
4003
*
4004
* @{
4005
*/
4006
4007
/** @brief Export a static constant value as a class attribute.
4008
* @ingroup ClassAttributes
4009
*
4010
* Adds a static constant to a Python class that can be accessed as a class attribute. The constant
4011
* value is converted to a Python object at module initialization time and becomes accessible via
4012
* the class in Python.
4013
*
4014
* @param i_cppClass Python binding class identifier (must be declared with `PY_DECLARE_CLASS_*`)
4015
* @param s_name Name of the constant as it will appear in Python (string literal)
4016
* @param v_value The constant value to export (must be convertible via `PyExportTraits::build`)
4017
*
4018
* @par Example
4019
* ```cpp
4020
* class MyClass: public PyObjectPlus { ... };
4021
* PY_DECLARE_CLASS(MyClass)
4022
* PY_CLASS_STATIC_CONST(MyClass, "PI", 3.14159)
4023
* PY_CLASS_STATIC_CONST(MyClass, "MAX_SIZE", 1024)
4024
*
4025
* // In Python:
4026
* // MyClass.PI == 3.14159
4027
* // MyClass.MAX_SIZE == 1024
4028
* ```
4029
*/
4030
#define PY_CLASS_STATIC_CONST( i_cppClass, s_name, v_value )\
4031
LASS_EXECUTE_BEFORE_MAIN_EX\
4032
( LASS_CONCATENATE( lassExecutePyClassStaticConst, i_cppClass ),\
4033
i_cppClass ::_lassPyClassDef.addStaticConst(s_name, v_value);\
4034
)
4035
4036
/** @} */
4037
4038
4039
4040
// --- inner class ---------------------------------------------------------------------------------
4041
4042
4043
4044
/** @addtogroup ClassAttributes
4045
* @name Inner Classes
4046
*
4047
* Macros for adding inner classes (nested classes) to Python-exported classes.
4048
*
4049
* These macros establish class relationships where inner classes become attributes of their outer
4050
* class in Python.
4051
*
4052
* The basic form is
4053
*
4054
* ```cpp
4055
* PY_CLASS_INNER_CLASS( i_outerCppClass, i_innerCppClass )
4056
* ```
4057
*
4058
* with:
4059
* - @a i_outerCppClass : C++ class that will contain the inner class
4060
* - @a i_innerCppClass : C++ class to be exported as inner class
4061
*
4062
* @par Common suffixes
4063
*
4064
* The `_NAME`, `_DOC` and `_EX` suffixes allow you to specify a custom Python name, docstring, or
4065
* (in rare cases) fully qualified typenames.
4066
*
4067
* | Macro | Fixed parameters | Adds parameters | Use for ... |
4068
* |---------------------------------|--------------------------------------|-------------------------------------|---------------------------------------------|
4069
* | `PY_CLASS_INNER_CLASS_NAME` | `i_outerCppClass`, `i_innerCppClass` | `s_name` | Custom Python name |
4070
* | `PY_CLASS_INNER_CLASS_DOC` | `i_outerCppClass`, `i_innerCppClass` | `s_doc` | With docstring (deprecated) |
4071
* | `PY_CLASS_INNER_CLASS_NAME_DOC` | `i_outerCppClass`, `i_innerCppClass` | `s_name`, `s_doc` | Custom Python name + Docstring (deprecated) |
4072
* | `PY_CLASS_INNER_CLASS_EX` | `t_outerCppClass`, `t_innerCppClass` | `s_name`, `s_doc`, `i_uniqueSuffix` | Fully qualified typenames |
4073
*
4074
* @note Inner classes must be declared with `PY_DECLARE_CLASS*` macros before using these macros.
4075
*
4076
* @note The outer class may also be the parent class of the inner class.
4077
*
4078
* @note The two `*_DOC` forms are deprecated as you should set the docstring when declaring
4079
* the innerclass using PY_DECLARE_CLASS_DOC() or PY_DECLARE_CLASS_NAME_DOC()
4080
*
4081
* @par Example
4082
* ```cpp
4083
* // Declare both classes first
4084
* PY_DECLARE_CLASS_DOC(Outer, "Outer class")
4085
* PY_DECLARE_CLASS_DOC(Inner, "Inner class")
4086
*
4087
* // Establish inner class relationship
4088
* PY_CLASS_INNER_CLASS(Outer, Inner)
4089
* ```
4090
*
4091
* @{
4092
*/
4093
4094
/** @ingroup ClassAttributes
4095
* @brief Exports an inner class with full customization of name, documentation, and symbol suffix.
4096
*
4097
* This is the most flexible inner class macro, allowing complete control over all parameters.
4098
* The inner class becomes accessible as an attribute of the outer class in Python.
4099
* In contrast to the convenience macros, here you can provide fully qualified typenames, at the
4100
* cost of having to provide a unique suffix.
4101
*
4102
* @param t_outerCppClass C++ class that will contain the inner class
4103
* @param t_innerCppClass C++ class to be exported as inner class
4104
* @param s_name Python name for the inner class (null-terminated C string literal)
4105
* @param s_doc Python docstring for the inner class (null-terminated C string literal, deprecated:
4106
* should be nullptr)
4107
* @param i_uniqueSuffix Unique C++ identifier to generate unique symbols for the registration code.
4108
* This prevents symbol collisions when multiple inner class exports exist.
4109
*
4110
* @note Setting a docstring on the inner class using this macro is deprecated. You should be
4111
* setting the doc when declaring the innerclass using PY_DECLARE_CLASS_DOC() or
4112
* PY_DECLARE_CLASS_NAME_DOC().
4113
*
4114
* @par Example
4115
* ```cpp
4116
* PY_CLASS_INNER_CLASS_EX(Outer, Inner, "CustomInner", nullptr, MyUniqueSuffix) // Outer.CustomInner
4117
* ```
4118
*/
4119
#define PY_CLASS_INNER_CLASS_EX( t_outerCppClass, t_innerCppClass, s_name, s_doc, i_uniqueSuffix )\
4120
LASS_EXECUTE_BEFORE_MAIN_EX( LASS_CONCATENATE(lassPythonImplExecuteBeforeMain_, i_uniqueSuffix),\
4121
t_innerCppClass::_lassPyClassDef.setDocIfNotNull(s_doc);\
4122
t_outerCppClass::_lassPyClassDef.addInnerClass(t_innerCppClass::_lassPyClassDef);\
4123
)
4124
4125
/** @ingroup ClassAttributes
4126
* @brief Exports an inner class with custom name and documentation.
4127
*
4128
* Convenience macro that automatically generates a unique suffix from the class names.
4129
* Provides full control over the Python name and documentation string.
4130
*
4131
* @param i_outerCppClass C++ class that will contain the inner class (unqualified name)
4132
* @param i_innerCppClass C++ class to be exported as inner class (unqualified name)
4133
* @param s_name Python name for the inner class (null-terminated C string literal)
4134
* @param s_doc Python docstring for the inner class (null-terminated C string literal, may be nullptr)
4135
*
4136
* @deprecated You should be setting the doc when declaring the innerclass using
4137
* PY_DECLARE_CLASS_DOC() or PY_DECLARE_CLASS_NAME_DOC()
4138
*
4139
* @par Example
4140
* ```cpp
4141
* PY_CLASS_INNER_CLASS_NAME_DOC(Outer, Inner, "NestedClass", "Documentation") // Outer.NestedClass
4142
* ```
4143
*/
4144
#define PY_CLASS_INNER_CLASS_NAME_DOC( i_outerCppClass, i_innerCppClass, s_name, s_doc )\
4145
PY_CLASS_INNER_CLASS_EX( i_outerCppClass, i_innerCppClass, s_name, s_doc,\
4146
LASS_CONCATENATE(i_outerCppClass, i_innerCppClass) )
4147
4148
/** @ingroup ClassAttributes
4149
* @brief Exports an inner class with custom name but no documentation.
4150
*
4151
* Convenience macro for cases where you want to customize the Python name, but don't need to
4152
* provide additional documentation.
4153
*
4154
* @param i_outerCppClass C++ class that will contain the inner class (unqualified name)
4155
* @param i_innerCppClass C++ class to be exported as inner class (unqualified name)
4156
* @param s_name Python name for the inner class (null-terminated C string literal)
4157
*
4158
* @par Example
4159
* ```cpp
4160
* PY_CLASS_INNER_CLASS_NAME(Outer, Inner, "CustomName") // Outer.CustomName
4161
* ```
4162
*/
4163
#define PY_CLASS_INNER_CLASS_NAME( i_outerCppClass, i_innerCppClass, s_name)\
4164
PY_CLASS_INNER_CLASS_NAME_DOC( i_outerCppClass, i_innerCppClass, s_name, 0)
4165
4166
/** @ingroup ClassAttributes
4167
* @brief Exports an inner class with default name and custom documentation.
4168
*
4169
* The inner class will use its C++ class name as the Python name, but allows you to provide custom
4170
* documentation.
4171
*
4172
* @param i_outerCppClass C++ class that will contain the inner class (unqualified name)
4173
* @param i_innerCppClass C++ class to be exported as inner class (unqualified name)
4174
* @param s_doc Python docstring for the inner class (null-terminated C string literal)
4175
*
4176
* @deprecated You should be setting the doc when declaring the innerclass using
4177
* PY_DECLARE_CLASS_DOC() or PY_DECLARE_CLASS_NAME_DOC()
4178
*
4179
* @par Example
4180
* ```cpp
4181
* PY_CLASS_INNER_CLASS_DOC(Outer, Inner, "Custom documentation") // Outer.Inner
4182
* ```
4183
*/
4184
#define PY_CLASS_INNER_CLASS_DOC( i_outerCppClass, i_innerCppClass, s_doc )\
4185
PY_CLASS_INNER_CLASS_NAME_DOC( i_outerCppClass, i_innerCppClass, LASS_STRINGIFY(i_innerCppClass), s_doc)
4186
4187
/** @ingroup ClassAttributes
4188
* @brief Exports an inner class with default name and no documentation.
4189
*
4190
* The simplest inner class export macro. Uses the C++ class name as the Python name and doesn't
4191
* provide additional documentation beyond what was set during class declaration.
4192
*
4193
* @param i_outerCppClass C++ class that will contain the inner class (unqualified name)
4194
* @param i_innerCppClass C++ class to be exported as inner class (unqualified name)
4195
*
4196
* @par Example
4197
* ```cpp
4198
* PY_CLASS_INNER_CLASS(Outer, Inner) // Outer.Inner
4199
* ```
4200
*/
4201
#define PY_CLASS_INNER_CLASS( i_outerCppClass, i_innerCppClass)\
4202
PY_CLASS_INNER_CLASS_NAME_DOC( i_outerCppClass, i_innerCppClass, LASS_STRINGIFY(i_innerCppClass), 0)
4203
4204
/** @} */
4205
4206
4207
4208
// --- methods -------------------------------------------------------------------------------------
4209
4210
/** @defgroup ClassMethods Method Export Macros
4211
* @ingroup ClassDefinition
4212
*
4213
* @brief These macros export C++ methods on a class to Python.
4214
*
4215
* All macros take either the C++ class (in case it derives from lass::python::PyObjectPlus) or its
4216
* @ref ShadowClasses "shadow class" as first argument.
4217
*
4218
* @par Class methods
4219
*
4220
* There are two sets of macros to directly export C++ methods defined on the class itself:
4221
*
4222
* - Simple macros in case there's no ambiguity what C++ method is being exported
4223
* - Qualified macros that help to disambiguate overloaded C++ methods.
4224
*
4225
* @par Free Methods
4226
*
4227
* Additionally, you can export a free function that takes an instance of a class as a method on
4228
* the Python class. This is extremely useful using @ref ShadowClasses to export existing classes,
4229
* and you want to add a Python method that doesn't exist on the original C++ class. Or if you need
4230
* to add a wrapper to an existing method.
4231
*
4232
* There's again two sets of macros for C++ free methods:
4233
*
4234
* - Simple macros in case there's no ambiguity what C++ free method is being exported
4235
* - Qualified macros that help to disambiguate overloaded C++ free methods.
4236
*
4237
* @par Overloading
4238
*
4239
* By exporting multiple (free) methods to the same Python method name, you will effectively
4240
* overload the Python method on the parameter types. You can mix simple method exports, qualified
4241
* exports and free method exports: they can all overload on the same Python method name.
4242
*
4243
* @note Overload resolution uses first-fit, not best-fit like C++. The first exported overload
4244
* that matches the arguments will be called.
4245
*
4246
* @note The documentation of an overloaded Python method will be the s_doc of the first exported
4247
* overload.
4248
*
4249
* @par Operator and special methods
4250
*
4251
* @note For most special methods (like `__add__`, `__str__`, etc.), you **must** use the special
4252
* method names defined in lass::python::methods namespace to ensure correct behavior.
4253
* Regular string names like `"__add__"` will not work for these special methods.
4254
*
4255
* @par Example
4256
*
4257
* ```cpp
4258
* class Menu {
4259
* PY_HEADER(lass::python::PyObjectPlus)
4260
* public:
4261
* void spam(int a);
4262
* void baconA(double a);
4263
* void baconB(const std::string& b);
4264
* long eggs(int a, int b) const;
4265
* std::vector<std::string> eggs(const std::string& a, const std::string& b) const;
4266
* Menu operator+(const Menu& other) const;
4267
* void operator()(int number);
4268
* };
4269
* using TMenuPtr = PyObjectPtr<Menu>::Type;
4270
*
4271
* void sausage(const Menu& self, int a);
4272
* void moreBacon(Menu* self, std::complex<double> c);
4273
* long bakedBeans(const TMenuPtr& self, int a, int b);
4274
* std::vector<std::string> bakedBeans(TMenuPtr self, const std::string& a, const std::string& b);
4275
*
4276
* PY_DECLARE_CLASS(Menu)
4277
*
4278
* // Simple method export
4279
* PY_CLASS_METHOD(Menu, spam) // menu.spam(42)
4280
*
4281
* // Overloaded method export with custom name and docstring
4282
* PY_CLASS_METHOD_NAME_DOC(Menu, baconA, "bacon", "Add bacon") // menu.bacon(3.14)
4283
* PY_CLASS_METHOD_NAME(Menu, baconB, "bacon") // menu.bacon("pi")
4284
*
4285
* // Special method export using lass::python::methods constants
4286
* PY_CLASS_METHOD_NAME(Menu, operator+, lass::python::methods::_add_) // menu3 = menu1 + menu2
4287
* PY_CLASS_METHOD_NAME(Menu, operator(), lass::python::methods::_call_) // menu(4)
4288
*
4289
* // Type-qualified overloads
4290
* PY_CLASS_METHOD_QUALIFIED_2(Menu, eggs, long, int, int) // i = menu.eggs(1, 2)
4291
* PY_CLASS_METHOD_QUALIFIED_2(Menu, eggs, std::vector<std::string>, const std::string&, const std::string&) // s = menu.eggs("a", "b")
4292
*
4293
* // Free methods
4294
* PY_CLASS_FREE_METHOD(Menu, sausage) // menu.sausage(42)
4295
* PY_CLASS_FREE_METHOD_NAME(Menu, moreBacon, "bacon") // menu.bacon(3+4j)
4296
*
4297
* // Type-qualified free function overloads (note we need to state the self parameter too)
4298
* PY_CLASS_FREE_METHOD_QUALIFIED_3(Menu, bakedBeans, long, const TMenuPtr&, int, int) // i = menu.bakedBeans(1, 2)
4299
* PY_CLASS_FREE_METHOD_QUALIFIED_3(Menu, bakedBeans, std::vector<std::string>, TMenuPtr, const std::string&, const std::string&) // s = menu.bakedBeans("a", "b")
4300
* ```
4301
*/
4302
4303
4304
/** @ingroup ClassMethods
4305
* @brief Export a C++ method that returns raw PyObject* to Python (deprecated)
4306
*
4307
* Use this macro when you need a method that returns Python-specific objects or handles Python
4308
* types directly. The C++ method must return `PyObject*` and accept `PyObject*` arguments.
4309
*
4310
* @param i_cppClass C++ class containing the method (unqualified name)
4311
* @param i_cppMethod C++ method name to export (must return PyObject* and take PyObject* args)
4312
* @param s_methodName Python method name (string literal), or special method from
4313
* lass::python::methods
4314
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4315
*
4316
* @deprecated Use PY_CLASS_METHOD_EX() instead for automatic wrapper generation
4317
*
4318
* ```cpp
4319
* class Foo {
4320
* PY_HEADER(python::PyObjectPlus)
4321
* public:
4322
* PyObject* specialPythonMethod(PyObject* args); // Returns PyObject* directly
4323
* };
4324
*
4325
* PY_CLASS_PY_METHOD_EX(Foo, specialPythonMethod, "special", nullptr)
4326
* // Python: foo_instance.special(args)
4327
* ```
4328
*/
4329
#define PY_CLASS_PY_METHOD_EX( i_cppClass, i_cppMethod, s_methodName, s_doc )\
4330
static ::lass::python::impl::OverloadLink LASS_CONCATENATE_3( staticDispatchOverloadChain, i_cppClass, i_cppMethod);\
4331
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE_3( staticDispatch, i_cppClass, i_cppMethod) ( PyObject* iObject, PyObject* iArgs )\
4332
{\
4333
if (!PyType_IsSubtype(iObject->ob_type , i_cppClass::_lassPyClassDef.type() ))\
4334
{\
4335
PyErr_Format(PyExc_TypeError,"PyObject not castable to %s", i_cppClass::_lassPyClassDef.name());\
4336
return 0;\
4337
}\
4338
i_cppClass* object = static_cast<i_cppClass*>(iObject);\
4339
return object->i_cppMethod( iArgs );\
4340
}\
4341
LASS_EXECUTE_BEFORE_MAIN_EX\
4342
( LASS_CONCATENATE_3( lassExecutePyClassPyMethod_, i_cppClass, i_cppMethod ),\
4343
i_cppClass::_lassPyClassDef.addMethod(\
4344
s_methodName, s_doc, \
4345
LASS_CONCATENATE_3( staticDispatch, i_cppClass, i_cppMethod),\
4346
LASS_CONCATENATE_3( staticDispatchOverloadChain, i_cppClass, i_cppMethod));\
4347
)
4348
4349
4350
4351
/** @addtogroup ClassMethods
4352
* @name Simple Class Method Export Macros
4353
*
4354
* These macros export C++ methods to Python with automatic type deduction and wrapper generation.
4355
*
4356
* The basic form is:
4357
*
4358
* ```cpp
4359
* PY_CLASS_METHOD( i_cppClass, i_cppMethod )
4360
* ```
4361
*
4362
* with:
4363
* - @a i_cppClass : C++ class containing the method, or its @ref ShadowClasses "shadow class"
4364
* - @a i_cppMethod : C++ method name to export
4365
*
4366
* @par Common suffixes
4367
*
4368
* The `_NAME`, `_DOC` and `_EX` suffixes allow you to specify a custom Python name, docstring, or
4369
* (in rare cases) a custom dispatcher name.
4370
*
4371
* | Macro | Fixed parameters | Adds parameters | Use for ... |
4372
* |----------------------------|-----------------------------|-----------------------------------|--------------------------------|
4373
* | `PY_CLASS_METHOD_NAME` | `i_cppClass`, `i_cppMethod` | `s_name` | Custom Python name |
4374
* | `PY_CLASS_METHOD_DOC` | `i_cppClass`, `i_cppMethod` | `s_doc` | With docstring |
4375
* | `PY_CLASS_METHOD_NAME_DOC` | `i_cppClass`, `i_cppMethod` | `s_name`, `s_doc` | Custom Python name + Docstring |
4376
* | `PY_CLASS_METHOD_EX` | `t_cppClass`, `i_cppMethod` | `s_name`, `s_doc`, `i_dispatcher` | Custom dispatcher name |
4377
*
4378
* See above in @ref ClassMethods for more details about overloading and special operators.
4379
*
4380
* @{
4381
*/
4382
4383
/** @brief Export a C++ method to Python, with full control.
4384
* @ingroup ClassMethods
4385
*
4386
* This is the most flexible method export macro. In contrast to the convenience macros, here you
4387
* can provide the fully qualified class name, at the cost of having to provide a unique suffix.
4388
*
4389
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4390
* @param i_cppMethod C++ method name to export
4391
* @param s_methodName Python method name (string literal), or special method from
4392
* lass::python::methods
4393
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4394
* @param i_dispatcher Unique identifier for the generated dispatcher function
4395
*
4396
* @par Example
4397
* ```cpp
4398
* PY_CLASS_METHOD_EX(Menu, spam, "do_spam", "Do Spam", menu_spam) // menu.do_spam(42)
4399
* ```
4400
*/
4401
#define PY_CLASS_METHOD_EX(t_cppClass, i_cppMethod, s_methodName, s_doc, i_dispatcher)\
4402
PY_CLASS_METHOD_IMPL(t_cppClass, &TCppClass::i_cppMethod, s_methodName, s_doc, i_dispatcher,\
4403
::lass::python::impl::CallMethod<TShadowTraits>::call)
4404
4405
/** @brief Export a C++ method to Python, with custom name and docstring.
4406
* @ingroup ClassMethods
4407
*
4408
* Wraps PY_CLASS_METHOD_EX() with auto-generated dispatcher name.
4409
*
4410
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4411
* @param i_cppMethod C++ method name to export
4412
* @param s_methodName Python method name (string literal), or special method from
4413
* lass::python::methods
4414
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4415
*
4416
* @par Example
4417
* ```cpp
4418
* PY_CLASS_METHOD_NAME_DOC(Menu, spam, "do_spam", "Do Spam") // menu.do_spam(42)
4419
* ```
4420
*/
4421
#define PY_CLASS_METHOD_NAME_DOC( i_cppClass, i_cppMethod, s_methodName, s_doc )\
4422
PY_CLASS_METHOD_EX(\
4423
i_cppClass, i_cppMethod, s_methodName, s_doc,\
4424
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
4425
4426
/** @brief Export a C++ method to Python, with custom Python name.
4427
* @ingroup ClassMethods
4428
*
4429
* Wraps PY_CLASS_METHOD_NAME_DOC() with @a s_doc = `nullptr`.
4430
*
4431
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4432
* @param i_cppMethod C++ method name to export
4433
* @param s_methodName Python method name (string literal), or special method from
4434
* lass::python::methods
4435
*
4436
* @par Example
4437
* ```cpp
4438
* PY_CLASS_METHOD_NAME(Menu, spam, "do_spam") // menu.do_spam(42)
4439
* ```
4440
*/
4441
#define PY_CLASS_METHOD_NAME( i_cppClass, i_cppMethod, s_methodName )\
4442
PY_CLASS_METHOD_NAME_DOC( i_cppClass, i_cppMethod, s_methodName, 0 )
4443
4444
/** @brief Export a C++ method to Python, with docstring.
4445
* @ingroup ClassMethods
4446
*
4447
* Wraps PY_CLASS_METHOD_NAME_DOC() with @a s_methodName derived from @a i_cppMethod.
4448
*
4449
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4450
* @param i_cppMethod C++ method name to export (name will be used as Python name)
4451
* @param s_doc Method documentation string (null-terminated C string literal)
4452
*
4453
* @par Example
4454
* ```cpp
4455
* PY_CLASS_METHOD_DOC(Menu, spam, "Do Spam") // menu.spam(42)
4456
* ```
4457
*/
4458
#define PY_CLASS_METHOD_DOC( i_cppClass, i_cppMethod, s_doc )\
4459
PY_CLASS_METHOD_NAME_DOC( i_cppClass, i_cppMethod, LASS_STRINGIFY(i_cppMethod), s_doc)
4460
4461
/** @brief Export a C++ method to Python
4462
* @ingroup ClassMethods
4463
*
4464
* The simplest method export macro. Uses the C++ method name as the Python name and doesn't
4465
* provide additional documentation.
4466
*
4467
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4468
* @param i_cppMethod C++ method name to export (name will be used as Python name)
4469
*
4470
* @par Example
4471
* ```cpp
4472
* PY_CLASS_METHOD(Menu, spam) // menu.spam(42)
4473
* ```
4474
*/
4475
#define PY_CLASS_METHOD( i_cppClass, i_cppMethod )\
4476
PY_CLASS_METHOD_DOC( i_cppClass, i_cppMethod, 0 )
4477
4478
/** @} */
4479
4480
// --- explicit qualified methods ------------------------------------------------------------------
4481
4482
/** @addtogroup ClassMethods
4483
* @name Type-Qualified Method Export Macros
4484
*
4485
* These macros export C++ class methods to Python with explicit type qualification to resolve
4486
* method overload ambiguities. They provide fine-grained control over method signatures and are
4487
* essential when exporting overloaded methods that would otherwise be ambiguous.
4488
*
4489
* Use these macros when you have overloaded C++ methods and need to specify exactly which overload
4490
* to export to Python by providing explicit return and parameter types.
4491
*
4492
* The list of parameter types can be passed as a single lass::meta::TypeTuple, or as individual
4493
* arguments. For the latter, the `_<N>` tells the number of arguments. The `_<N>` form is the most
4494
* often used one, and simply packs its types into a `TypeTuple`
4495
*
4496
* | Form | Adds parameters |
4497
* |-----------------------------------|-------------------------------------------------|
4498
* | `PY_CLASS_METHOD_QUALIFIED` | `t_return`, `t_params` as lass::meta::TypeTuple |
4499
* | `PY_CLASS_METHOD_QUALIFIED_<N>` | `t_return`, `t_P1`, `t_P2`, ... ``t_P<N>` |
4500
*
4501
* They combine with the `_NAME` and `_DOC` suffixes, with the `s_name`, `s_doc`, `i_dispatcher`
4502
* arguments following the function return and parameter types.
4503
*
4504
* See above in @ref ClassMethods for more details about overloading and special operators.
4505
*
4506
* @{
4507
*/
4508
4509
/** @brief Export an overloaded C++ method to Python, with full control.
4510
* @ingroup ClassMethods
4511
*
4512
* Use this macro instead of PY_CLASS_METHOD_EX when there are overloaded C++ methods that would
4513
* create ambiguity. By explicitly specifying return type and parameter types, you can disambiguate
4514
* which overload to export.
4515
*
4516
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4517
*
4518
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4519
* @param i_cppMethod C++ method name to export (may be overloaded)
4520
* @param t_return Return type of the method (for disambiguation)
4521
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
4522
* @param s_methodName Python method name (string literal), or special method from
4523
* lass::python::methods
4524
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4525
* @param i_dispatcher Unique identifier for the generated dispatcher function
4526
*
4527
* This macro helps resolve method overload ambiguities by explicitly specifying
4528
* the method signature to export. Overloads can be mixed with PY_CLASS_METHOD_EX methods.
4529
*
4530
* @par Example
4531
* ```cpp
4532
* using TArgs1 = lass::meta::TypeTuple<int, int>;
4533
* PY_CLASS_METHOD_QUALIFIED_EX(Menu, eggs, long, TArgs1, "add_eggs", "Add eggs", menu_eggs1) // i = menu.add_eggs(1, 2)
4534
* using TArgs2 = lass::meta::TypeTuple<const std::string&, const std::string&>;
4535
* PY_CLASS_METHOD_QUALIFIED_EX(Menu, eggs, std::vector<std::string>, TArgs2, "add_eggs", "Add eggs", menu_eggs2) // s = menu.add_eggs("a", "b")
4536
* ```
4537
*/
4538
#define PY_CLASS_METHOD_QUALIFIED_EX(t_cppClass, i_cppMethod, t_return, t_params, s_methodName, s_doc, i_dispatcher)\
4539
static ::lass::python::impl::OverloadLink LASS_CONCATENATE(i_dispatcher, _overloadChain);\
4540
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher(PyObject* iObject, PyObject* iArgs)\
4541
{\
4542
PyObject* result = 0;\
4543
if (LASS_CONCATENATE(i_dispatcher, _overloadChain)(iObject, iArgs, result))\
4544
{\
4545
return result;\
4546
}\
4547
LASS_ASSERT(result == 0);\
4548
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
4549
typedef TShadowTraits::TCppClass TCppClass;\
4550
return ::lass::python::impl::ExplicitResolver<TShadowTraits,t_return,t_params>::callMethod(\
4551
iArgs, iObject, &TCppClass::i_cppMethod); \
4552
}\
4553
LASS_EXECUTE_BEFORE_MAIN_EX(LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
4554
t_cppClass ::_lassPyClassDef.addMethod(\
4555
s_methodName, s_doc, \
4556
::lass::python::impl::FunctionTypeDispatcher< SPECIAL_SLOT_TYPE(s_methodName) , i_dispatcher>::fun,\
4557
LASS_CONCATENATE(i_dispatcher, _overloadChain));\
4558
)
4559
/**/
4560
4561
/** @brief Export an overloaded 0-ary C++ method to Python, with full control.
4562
* @ingroup ClassMethods
4563
*
4564
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with 0 parameters.
4565
*
4566
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4567
*
4568
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4569
* @param i_cppMethod C++ method name to export (may be overloaded)
4570
* @param t_return Return type of the method (for disambiguation)
4571
* @param s_methodName Python method name (string literal), or special method from
4572
* lass::python::methods
4573
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4574
* @param i_dispatcher Unique identifier for the generated dispatcher function
4575
*
4576
* @par Example
4577
* ```cpp
4578
* PY_CLASS_METHOD_QUALIFIED_EX_0(Menu, eggs, long, "add_eggs", "Add eggs", foo_bar_a)
4579
* ```
4580
*/
4581
#define PY_CLASS_METHOD_QUALIFIED_EX_0( t_cppClass, i_cppMethod, t_return, s_methodName, s_doc, i_dispatcher )\
4582
PY_CLASS_METHOD_QUALIFIED_EX(\
4583
t_cppClass, i_cppMethod, t_return, ::lass::meta::TypeTuple<>, s_methodName, s_doc, i_dispatcher )
4584
4585
/** @brief Export an overloaded 1-ary C++ method to Python, with full control.
4586
* @ingroup ClassMethods
4587
*
4588
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 1 parameters.
4589
*
4590
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4591
*
4592
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4593
* @param i_cppMethod C++ method name to export (may be overloaded)
4594
* @param t_return Return type of the method (for disambiguation)
4595
* @param t_P1 Parameter types for the method (for disambiguation)
4596
* @param s_methodName Python method name (string literal), or special method from
4597
* lass::python::methods
4598
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4599
* @param i_dispatcher Unique identifier for the generated dispatcher function
4600
*
4601
* @par Example
4602
* ```cpp
4603
* PY_CLASS_METHOD_QUALIFIED_EX_1(Menu, eggs, long, T1, "add_eggs", "Add eggs", foo_bar_a)
4604
* ```
4605
*/
4606
#define PY_CLASS_METHOD_QUALIFIED_EX_1( t_cppClass, i_cppMethod, t_return, t_P1, s_methodName, s_doc, i_dispatcher )\
4607
typedef ::lass::meta::TypeTuple< t_P1 > \
4608
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4609
PY_CLASS_METHOD_QUALIFIED_EX(\
4610
t_cppClass, i_cppMethod, t_return,\
4611
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4612
i_dispatcher )
4613
4614
/** @brief Export an overloaded 2-ary C++ method to Python, with full control.
4615
* @ingroup ClassMethods
4616
*
4617
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 2 parameters.
4618
*
4619
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4620
*
4621
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4622
* @param i_cppMethod C++ method name to export (may be overloaded)
4623
* @param t_return Return type of the method (for disambiguation)
4624
* @param t_P1, t_P2 Parameter types for the method (for disambiguation)
4625
* @param s_methodName Python method name (string literal), or special method from
4626
* lass::python::methods
4627
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4628
* @param i_dispatcher Unique identifier for the generated dispatcher function
4629
*
4630
* @par Example
4631
* ```cpp
4632
* PY_CLASS_METHOD_QUALIFIED_EX_2(Menu, eggs, long, T1, T2, "add_eggs", "Add eggs", foo_bar_a)
4633
* ```
4634
*/
4635
#define PY_CLASS_METHOD_QUALIFIED_EX_2( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, s_doc, i_dispatcher )\
4636
typedef ::lass::meta::TypeTuple< t_P1, t_P2 > \
4637
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4638
PY_CLASS_METHOD_QUALIFIED_EX(\
4639
t_cppClass, i_cppMethod, t_return,\
4640
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4641
i_dispatcher )
4642
4643
/** @brief Export an overloaded 3-ary C++ method to Python, with full control.
4644
* @ingroup ClassMethods
4645
*
4646
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 3 parameters.
4647
*
4648
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4649
*
4650
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4651
* @param i_cppMethod C++ method name to export (may be overloaded)
4652
* @param t_return Return type of the method (for disambiguation)
4653
* @param t_P1, t_P2, t_P3 Parameter types for the method (for disambiguation)
4654
* @param s_methodName Python method name (string literal), or special method from
4655
* lass::python::methods
4656
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4657
* @param i_dispatcher Unique identifier for the generated dispatcher function
4658
*
4659
* @par Example
4660
* ```cpp
4661
* PY_CLASS_METHOD_QUALIFIED_EX_3(Menu, eggs, long, T1, T2, T3, "add_eggs", "Add eggs", foo_bar_a)
4662
* ```
4663
*/
4664
#define PY_CLASS_METHOD_QUALIFIED_EX_3( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc, i_dispatcher )\
4665
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3 > \
4666
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4667
PY_CLASS_METHOD_QUALIFIED_EX(\
4668
t_cppClass, i_cppMethod, t_return,\
4669
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4670
i_dispatcher )
4671
4672
/** @brief Export an overloaded 4-ary C++ method to Python, with full control.
4673
* @ingroup ClassMethods
4674
*
4675
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 4 parameters.
4676
*
4677
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4678
*
4679
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4680
* @param i_cppMethod C++ method name to export (may be overloaded)
4681
* @param t_return Return type of the method (for disambiguation)
4682
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the method (for disambiguation)
4683
* @param s_methodName Python method name (string literal), or special method from
4684
* lass::python::methods
4685
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4686
* @param i_dispatcher Unique identifier for the generated dispatcher function
4687
*
4688
* @par Example
4689
* ```cpp
4690
* PY_CLASS_METHOD_QUALIFIED_EX_4(Menu, eggs, long, T1, T2, T3, T4, "add_eggs", "Add eggs", foo_bar_a)
4691
* ```
4692
*/
4693
#define PY_CLASS_METHOD_QUALIFIED_EX_4( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc, i_dispatcher )\
4694
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4 > \
4695
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4696
PY_CLASS_METHOD_QUALIFIED_EX(\
4697
t_cppClass, i_cppMethod, t_return,\
4698
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4699
i_dispatcher )
4700
4701
/** @brief Export an overloaded 5-ary C++ method to Python, with full control.
4702
* @ingroup ClassMethods
4703
*
4704
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 5 parameters.
4705
*
4706
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4707
*
4708
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4709
* @param i_cppMethod C++ method name to export (may be overloaded)
4710
* @param t_return Return type of the method (for disambiguation)
4711
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the method (for disambiguation)
4712
* @param s_methodName Python method name (string literal), or special method from
4713
* lass::python::methods
4714
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4715
* @param i_dispatcher Unique identifier for the generated dispatcher function
4716
*
4717
* @par Example
4718
* ```cpp
4719
* PY_CLASS_METHOD_QUALIFIED_EX_5(Menu, eggs, long, T1, T2, T3, T4, T5, "add_eggs", "Add eggs", foo_bar_a)
4720
* ```
4721
*/
4722
#define PY_CLASS_METHOD_QUALIFIED_EX_5( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc, i_dispatcher )\
4723
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5 > \
4724
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4725
PY_CLASS_METHOD_QUALIFIED_EX(\
4726
t_cppClass, i_cppMethod, t_return,\
4727
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4728
i_dispatcher )
4729
4730
/** @brief Export an overloaded 6-ary C++ method to Python, with full control.
4731
* @ingroup ClassMethods
4732
*
4733
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 6 parameters.
4734
*
4735
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4736
*
4737
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4738
* @param i_cppMethod C++ method name to export (may be overloaded)
4739
* @param t_return Return type of the method (for disambiguation)
4740
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the method (for disambiguation)
4741
* @param s_methodName Python method name (string literal), or special method from
4742
* lass::python::methods
4743
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4744
* @param i_dispatcher Unique identifier for the generated dispatcher function
4745
*
4746
* @par Example
4747
* ```cpp
4748
* PY_CLASS_METHOD_QUALIFIED_EX_6(Menu, eggs, long, T1, T2, T3, T4, T5, T6, "add_eggs", "Add eggs", foo_bar_a)
4749
* ```
4750
*/
4751
#define PY_CLASS_METHOD_QUALIFIED_EX_6( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc, i_dispatcher )\
4752
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 > \
4753
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4754
PY_CLASS_METHOD_QUALIFIED_EX(\
4755
t_cppClass, i_cppMethod, t_return,\
4756
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4757
i_dispatcher )
4758
4759
/** @brief Export an overloaded 7-ary C++ method to Python, with full control.
4760
* @ingroup ClassMethods
4761
*
4762
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 7 parameters.
4763
*
4764
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4765
*
4766
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4767
* @param i_cppMethod C++ method name to export (may be overloaded)
4768
* @param t_return Return type of the method (for disambiguation)
4769
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the method (for disambiguation)
4770
* @param s_methodName Python method name (string literal), or special method from
4771
* lass::python::methods
4772
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4773
* @param i_dispatcher Unique identifier for the generated dispatcher function
4774
*
4775
* @par Example
4776
* ```cpp
4777
* PY_CLASS_METHOD_QUALIFIED_EX_7(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, "add_eggs", "Add eggs", foo_bar_a)
4778
* ```
4779
*/
4780
#define PY_CLASS_METHOD_QUALIFIED_EX_7( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc, i_dispatcher )\
4781
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 > \
4782
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4783
PY_CLASS_METHOD_QUALIFIED_EX(\
4784
t_cppClass, i_cppMethod, t_return,\
4785
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4786
i_dispatcher )
4787
4788
/** @brief Export an overloaded 8-ary C++ method to Python, with full control.
4789
* @ingroup ClassMethods
4790
*
4791
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 8 parameters.
4792
*
4793
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4794
*
4795
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4796
* @param i_cppMethod C++ method name to export (may be overloaded)
4797
* @param t_return Return type of the method (for disambiguation)
4798
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the method (for disambiguation)
4799
* @param s_methodName Python method name (string literal), or special method from
4800
* lass::python::methods
4801
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4802
* @param i_dispatcher Unique identifier for the generated dispatcher function
4803
*
4804
* @par Example
4805
* ```cpp
4806
* PY_CLASS_METHOD_QUALIFIED_EX_8(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, "add_eggs", "Add eggs", foo_bar_a)
4807
* ```
4808
*/
4809
#define PY_CLASS_METHOD_QUALIFIED_EX_8( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc, i_dispatcher )\
4810
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 > \
4811
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4812
PY_CLASS_METHOD_QUALIFIED_EX(\
4813
t_cppClass, i_cppMethod, t_return,\
4814
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4815
i_dispatcher )
4816
4817
/** @brief Export an overloaded 9-ary C++ method to Python, with full control.
4818
* @ingroup ClassMethods
4819
*
4820
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 9 parameters.
4821
*
4822
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4823
*
4824
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4825
* @param i_cppMethod C++ method name to export (may be overloaded)
4826
* @param t_return Return type of the method (for disambiguation)
4827
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the method (for disambiguation)
4828
* @param s_methodName Python method name (string literal), or special method from
4829
* lass::python::methods
4830
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4831
* @param i_dispatcher Unique identifier for the generated dispatcher function
4832
*
4833
* @par Example
4834
* ```cpp
4835
* PY_CLASS_METHOD_QUALIFIED_EX_9(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, "add_eggs", "Add eggs", foo_bar_a)
4836
* ```
4837
*/
4838
#define PY_CLASS_METHOD_QUALIFIED_EX_9( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc, i_dispatcher )\
4839
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 > \
4840
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4841
PY_CLASS_METHOD_QUALIFIED_EX(\
4842
t_cppClass, i_cppMethod, t_return,\
4843
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4844
i_dispatcher )
4845
4846
/** @brief Export an overloaded 10-ary C++ method to Python, with full control.
4847
* @ingroup ClassMethods
4848
*
4849
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 10 parameters.
4850
*
4851
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4852
*
4853
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4854
* @param i_cppMethod C++ method name to export (may be overloaded)
4855
* @param t_return Return type of the method (for disambiguation)
4856
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the method (for disambiguation)
4857
* @param s_methodName Python method name (string literal), or special method from
4858
* lass::python::methods
4859
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4860
* @param i_dispatcher Unique identifier for the generated dispatcher function
4861
*
4862
* @par Example
4863
* ```cpp
4864
* PY_CLASS_METHOD_QUALIFIED_EX_10(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "add_eggs", "Add eggs", foo_bar_a)
4865
* ```
4866
*/
4867
#define PY_CLASS_METHOD_QUALIFIED_EX_10( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc, i_dispatcher )\
4868
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 > \
4869
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4870
PY_CLASS_METHOD_QUALIFIED_EX(\
4871
t_cppClass, i_cppMethod, t_return,\
4872
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4873
i_dispatcher )
4874
4875
/** @brief Export an overloaded 11-ary C++ method to Python, with full control.
4876
* @ingroup ClassMethods
4877
*
4878
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 11 parameters.
4879
*
4880
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4881
*
4882
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4883
* @param i_cppMethod C++ method name to export (may be overloaded)
4884
* @param t_return Return type of the method (for disambiguation)
4885
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the method (for disambiguation)
4886
* @param s_methodName Python method name (string literal), or special method from
4887
* lass::python::methods
4888
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4889
* @param i_dispatcher Unique identifier for the generated dispatcher function
4890
*
4891
* @par Example
4892
* ```cpp
4893
* PY_CLASS_METHOD_QUALIFIED_EX_11(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "add_eggs", "Add eggs", foo_bar_a)
4894
* ```
4895
*/
4896
#define PY_CLASS_METHOD_QUALIFIED_EX_11( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc, i_dispatcher )\
4897
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 > \
4898
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4899
PY_CLASS_METHOD_QUALIFIED_EX(\
4900
t_cppClass, i_cppMethod, t_return,\
4901
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4902
i_dispatcher )
4903
4904
/** @brief Export an overloaded 12-ary C++ method to Python, with full control.
4905
* @ingroup ClassMethods
4906
*
4907
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 12 parameters.
4908
*
4909
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4910
*
4911
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4912
* @param i_cppMethod C++ method name to export (may be overloaded)
4913
* @param t_return Return type of the method (for disambiguation)
4914
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the method (for disambiguation)
4915
* @param s_methodName Python method name (string literal), or special method from
4916
* lass::python::methods
4917
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4918
* @param i_dispatcher Unique identifier for the generated dispatcher function
4919
*
4920
* @par Example
4921
* ```cpp
4922
* PY_CLASS_METHOD_QUALIFIED_EX_12(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "add_eggs", "Add eggs", foo_bar_a)
4923
* ```
4924
*/
4925
#define PY_CLASS_METHOD_QUALIFIED_EX_12( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc, i_dispatcher )\
4926
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 > \
4927
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4928
PY_CLASS_METHOD_QUALIFIED_EX(\
4929
t_cppClass, i_cppMethod, t_return,\
4930
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4931
i_dispatcher )
4932
4933
/** @brief Export an overloaded 13-ary C++ method to Python, with full control.
4934
* @ingroup ClassMethods
4935
*
4936
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 13 parameters.
4937
*
4938
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4939
*
4940
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4941
* @param i_cppMethod C++ method name to export (may be overloaded)
4942
* @param t_return Return type of the method (for disambiguation)
4943
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the method (for disambiguation)
4944
* @param s_methodName Python method name (string literal), or special method from
4945
* lass::python::methods
4946
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4947
* @param i_dispatcher Unique identifier for the generated dispatcher function
4948
*
4949
* @par Example
4950
* ```cpp
4951
* PY_CLASS_METHOD_QUALIFIED_EX_13(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "add_eggs", "Add eggs", foo_bar_a)
4952
* ```
4953
*/
4954
#define PY_CLASS_METHOD_QUALIFIED_EX_13( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc, i_dispatcher )\
4955
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 > \
4956
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4957
PY_CLASS_METHOD_QUALIFIED_EX(\
4958
t_cppClass, i_cppMethod, t_return,\
4959
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4960
i_dispatcher )
4961
4962
/** @brief Export an overloaded 14-ary C++ method to Python, with full control.
4963
* @ingroup ClassMethods
4964
*
4965
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 14 parameters.
4966
*
4967
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4968
*
4969
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4970
* @param i_cppMethod C++ method name to export (may be overloaded)
4971
* @param t_return Return type of the method (for disambiguation)
4972
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the method (for disambiguation)
4973
* @param s_methodName Python method name (string literal), or special method from
4974
* lass::python::methods
4975
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
4976
* @param i_dispatcher Unique identifier for the generated dispatcher function
4977
*
4978
* @par Example
4979
* ```cpp
4980
* PY_CLASS_METHOD_QUALIFIED_EX_14(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "add_eggs", "Add eggs", foo_bar_a)
4981
* ```
4982
*/
4983
#define PY_CLASS_METHOD_QUALIFIED_EX_14( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc, i_dispatcher )\
4984
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 > \
4985
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
4986
PY_CLASS_METHOD_QUALIFIED_EX(\
4987
t_cppClass, i_cppMethod, t_return,\
4988
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
4989
i_dispatcher )
4990
4991
/** @brief Export an overloaded 15-ary C++ method to Python, with full control.
4992
* @ingroup ClassMethods
4993
*
4994
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() for methods with exactly 15 parameters.
4995
*
4996
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
4997
*
4998
* @param t_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
4999
* @param i_cppMethod C++ method name to export (may be overloaded)
5000
* @param t_return Return type of the method (for disambiguation)
5001
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the method (for disambiguation)
5002
* @param s_methodName Python method name (string literal), or special method from
5003
* lass::python::methods
5004
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5005
* @param i_dispatcher Unique identifier for the generated dispatcher function
5006
*
5007
* @par Example
5008
* ```cpp
5009
* PY_CLASS_METHOD_QUALIFIED_EX_15(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "add_eggs", "Add eggs", foo_bar_a)
5010
* ```
5011
*/
5012
#define PY_CLASS_METHOD_QUALIFIED_EX_15( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc, i_dispatcher )\
5013
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 > \
5014
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
5015
PY_CLASS_METHOD_QUALIFIED_EX(\
5016
t_cppClass, i_cppMethod, t_return,\
5017
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
5018
i_dispatcher )
5019
5020
5021
/** @brief Export an overloaded C++ method to Python, with custom name and docstring.
5022
* @ingroup ClassMethods
5023
*
5024
* Wraps PY_CLASS_METHOD_QUALIFIED_EX() with automatically generated dispatcher name.
5025
*
5026
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5027
* @param i_cppMethod C++ method name to export (may be overloaded)
5028
* @param t_return Return type of the method (for disambiguation)
5029
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
5030
* @param s_methodName Python method name (string literal), or special method from
5031
* lass::python::methods
5032
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5033
*
5034
* @par Example
5035
* ```cpp
5036
* using TArgs = lass::meta::TypeTuple<int, int>;
5037
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC(Menu, eggs, long, TArgs1, "add_eggs", "Add eggs") // i = menu.add_eggs(1, 2)
5038
* ```
5039
*/
5040
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC( i_cppClass, i_cppMethod, t_return, t_params, s_methodName, s_doc )\
5041
PY_CLASS_METHOD_QUALIFIED_EX(\
5042
i_cppClass, i_cppMethod, t_return, t_params, s_methodName, s_doc,\
5043
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5044
5045
/** @brief Export an overloaded 0-ary C++ method to Python, with custom name and docstring.
5046
* @ingroup ClassMethods
5047
*
5048
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_0() with automatically generated dispatcher name.
5049
*
5050
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5051
* @param i_cppMethod C++ method name to export (may be overloaded)
5052
* @param t_return Return type of the method (for disambiguation)
5053
* @param s_methodName Python method name (string literal), or special method from
5054
* lass::python::methods
5055
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5056
*
5057
* @par Example
5058
* ```cpp
5059
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_0(Menu, eggs, long, "add_eggs", "Add eggs")
5060
* ```
5061
*/
5062
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_0( i_cppClass, i_cppMethod, t_return, s_methodName, s_doc )\
5063
PY_CLASS_METHOD_QUALIFIED_EX_0(\
5064
i_cppClass, i_cppMethod, t_return, s_methodName, s_doc,\
5065
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5066
5067
/** @brief Export an overloaded 1-ary C++ method to Python, with custom name and docstring.
5068
* @ingroup ClassMethods
5069
*
5070
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_1() with automatically generated dispatcher name.
5071
*
5072
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5073
* @param i_cppMethod C++ method name to export (may be overloaded)
5074
* @param t_return Return type of the method (for disambiguation)
5075
* @param t_P1 Parameter types for the method (for disambiguation)
5076
* @param s_methodName Python method name (string literal), or special method from
5077
* lass::python::methods
5078
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5079
*
5080
* @par Example
5081
* ```cpp
5082
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_1(Menu, eggs, long, T1, "add_eggs", "Add eggs")
5083
* ```
5084
*/
5085
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_1( i_cppClass, i_cppMethod, t_return, t_P1, s_methodName, s_doc )\
5086
PY_CLASS_METHOD_QUALIFIED_EX_1(\
5087
i_cppClass, i_cppMethod, t_return, t_P1, s_methodName, s_doc,\
5088
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5089
5090
/** @brief Export an overloaded 2-ary C++ method to Python, with custom name and docstring.
5091
* @ingroup ClassMethods
5092
*
5093
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_2() with automatically generated dispatcher name.
5094
*
5095
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5096
* @param i_cppMethod C++ method name to export (may be overloaded)
5097
* @param t_return Return type of the method (for disambiguation)
5098
* @param t_P1, t_P2 Parameter types for the method (for disambiguation)
5099
* @param s_methodName Python method name (string literal), or special method from
5100
* lass::python::methods
5101
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5102
*
5103
* @par Example
5104
* ```cpp
5105
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_2(Menu, eggs, long, T1, T2, "add_eggs", "Add eggs")
5106
* ```
5107
*/
5108
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, s_doc )\
5109
PY_CLASS_METHOD_QUALIFIED_EX_2(\
5110
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, s_doc,\
5111
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5112
5113
/** @brief Export an overloaded 3-ary C++ method to Python, with custom name and docstring.
5114
* @ingroup ClassMethods
5115
*
5116
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_3() with automatically generated dispatcher name.
5117
*
5118
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5119
* @param i_cppMethod C++ method name to export (may be overloaded)
5120
* @param t_return Return type of the method (for disambiguation)
5121
* @param t_P1, t_P2, t_P3 Parameter types for the method (for disambiguation)
5122
* @param s_methodName Python method name (string literal), or special method from
5123
* lass::python::methods
5124
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5125
*
5126
* @par Example
5127
* ```cpp
5128
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_3(Menu, eggs, long, T1, T2, T3, "add_eggs", "Add eggs")
5129
* ```
5130
*/
5131
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc )\
5132
PY_CLASS_METHOD_QUALIFIED_EX_3(\
5133
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc,\
5134
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5135
5136
/** @brief Export an overloaded 4-ary C++ method to Python, with custom name and docstring.
5137
* @ingroup ClassMethods
5138
*
5139
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_4() with automatically generated dispatcher name.
5140
*
5141
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5142
* @param i_cppMethod C++ method name to export (may be overloaded)
5143
* @param t_return Return type of the method (for disambiguation)
5144
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the method (for disambiguation)
5145
* @param s_methodName Python method name (string literal), or special method from
5146
* lass::python::methods
5147
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5148
*
5149
* @par Example
5150
* ```cpp
5151
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_4(Menu, eggs, long, T1, T2, T3, T4, "add_eggs", "Add eggs")
5152
* ```
5153
*/
5154
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc )\
5155
PY_CLASS_METHOD_QUALIFIED_EX_4(\
5156
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc,\
5157
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5158
5159
/** @brief Export an overloaded 5-ary C++ method to Python, with custom name and docstring.
5160
* @ingroup ClassMethods
5161
*
5162
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_5() with automatically generated dispatcher name.
5163
*
5164
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5165
* @param i_cppMethod C++ method name to export (may be overloaded)
5166
* @param t_return Return type of the method (for disambiguation)
5167
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the method (for disambiguation)
5168
* @param s_methodName Python method name (string literal), or special method from
5169
* lass::python::methods
5170
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5171
*
5172
* @par Example
5173
* ```cpp
5174
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_5(Menu, eggs, long, T1, T2, T3, T4, T5, "add_eggs", "Add eggs")
5175
* ```
5176
*/
5177
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc )\
5178
PY_CLASS_METHOD_QUALIFIED_EX_5(\
5179
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc,\
5180
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5181
5182
/** @brief Export an overloaded 6-ary C++ method to Python, with custom name and docstring.
5183
* @ingroup ClassMethods
5184
*
5185
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_6() with automatically generated dispatcher name.
5186
*
5187
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5188
* @param i_cppMethod C++ method name to export (may be overloaded)
5189
* @param t_return Return type of the method (for disambiguation)
5190
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the method (for disambiguation)
5191
* @param s_methodName Python method name (string literal), or special method from
5192
* lass::python::methods
5193
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5194
*
5195
* @par Example
5196
* ```cpp
5197
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_6(Menu, eggs, long, T1, T2, T3, T4, T5, T6, "add_eggs", "Add eggs")
5198
* ```
5199
*/
5200
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc )\
5201
PY_CLASS_METHOD_QUALIFIED_EX_6(\
5202
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc,\
5203
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5204
5205
/** @brief Export an overloaded 7-ary C++ method to Python, with custom name and docstring.
5206
* @ingroup ClassMethods
5207
*
5208
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_7() with automatically generated dispatcher name.
5209
*
5210
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5211
* @param i_cppMethod C++ method name to export (may be overloaded)
5212
* @param t_return Return type of the method (for disambiguation)
5213
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the method (for disambiguation)
5214
* @param s_methodName Python method name (string literal), or special method from
5215
* lass::python::methods
5216
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5217
*
5218
* @par Example
5219
* ```cpp
5220
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_7(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, "add_eggs", "Add eggs")
5221
* ```
5222
*/
5223
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc )\
5224
PY_CLASS_METHOD_QUALIFIED_EX_7(\
5225
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc,\
5226
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5227
5228
/** @brief Export an overloaded 8-ary C++ method to Python, with custom name and docstring.
5229
* @ingroup ClassMethods
5230
*
5231
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_8() with automatically generated dispatcher name.
5232
*
5233
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5234
* @param i_cppMethod C++ method name to export (may be overloaded)
5235
* @param t_return Return type of the method (for disambiguation)
5236
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the method (for disambiguation)
5237
* @param s_methodName Python method name (string literal), or special method from
5238
* lass::python::methods
5239
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5240
*
5241
* @par Example
5242
* ```cpp
5243
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_8(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, "add_eggs", "Add eggs")
5244
* ```
5245
*/
5246
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc )\
5247
PY_CLASS_METHOD_QUALIFIED_EX_8(\
5248
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc,\
5249
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5250
5251
/** @brief Export an overloaded 9-ary C++ method to Python, with custom name and docstring.
5252
* @ingroup ClassMethods
5253
*
5254
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_9() with automatically generated dispatcher name.
5255
*
5256
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5257
* @param i_cppMethod C++ method name to export (may be overloaded)
5258
* @param t_return Return type of the method (for disambiguation)
5259
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the method (for disambiguation)
5260
* @param s_methodName Python method name (string literal), or special method from
5261
* lass::python::methods
5262
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5263
*
5264
* @par Example
5265
* ```cpp
5266
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_9(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, "add_eggs", "Add eggs")
5267
* ```
5268
*/
5269
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc )\
5270
PY_CLASS_METHOD_QUALIFIED_EX_9(\
5271
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc,\
5272
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5273
5274
/** @brief Export an overloaded 10-ary C++ method to Python, with custom name and docstring.
5275
* @ingroup ClassMethods
5276
*
5277
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_10() with automatically generated dispatcher name.
5278
*
5279
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5280
* @param i_cppMethod C++ method name to export (may be overloaded)
5281
* @param t_return Return type of the method (for disambiguation)
5282
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the method (for disambiguation)
5283
* @param s_methodName Python method name (string literal), or special method from
5284
* lass::python::methods
5285
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5286
*
5287
* @par Example
5288
* ```cpp
5289
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_10(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "add_eggs", "Add eggs")
5290
* ```
5291
*/
5292
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc )\
5293
PY_CLASS_METHOD_QUALIFIED_EX_10(\
5294
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc,\
5295
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5296
5297
/** @brief Export an overloaded 11-ary C++ method to Python, with custom name and docstring.
5298
* @ingroup ClassMethods
5299
*
5300
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_11() with automatically generated dispatcher name.
5301
*
5302
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5303
* @param i_cppMethod C++ method name to export (may be overloaded)
5304
* @param t_return Return type of the method (for disambiguation)
5305
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the method (for disambiguation)
5306
* @param s_methodName Python method name (string literal), or special method from
5307
* lass::python::methods
5308
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5309
*
5310
* @par Example
5311
* ```cpp
5312
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_11(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "add_eggs", "Add eggs")
5313
* ```
5314
*/
5315
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc )\
5316
PY_CLASS_METHOD_QUALIFIED_EX_11(\
5317
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc,\
5318
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5319
5320
/** @brief Export an overloaded 12-ary C++ method to Python, with custom name and docstring.
5321
* @ingroup ClassMethods
5322
*
5323
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_12() with automatically generated dispatcher name.
5324
*
5325
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5326
* @param i_cppMethod C++ method name to export (may be overloaded)
5327
* @param t_return Return type of the method (for disambiguation)
5328
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the method (for disambiguation)
5329
* @param s_methodName Python method name (string literal), or special method from
5330
* lass::python::methods
5331
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5332
*
5333
* @par Example
5334
* ```cpp
5335
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_12(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "add_eggs", "Add eggs")
5336
* ```
5337
*/
5338
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc )\
5339
PY_CLASS_METHOD_QUALIFIED_EX_12(\
5340
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc,\
5341
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5342
5343
/** @brief Export an overloaded 13-ary C++ method to Python, with custom name and docstring.
5344
* @ingroup ClassMethods
5345
*
5346
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_13() with automatically generated dispatcher name.
5347
*
5348
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5349
* @param i_cppMethod C++ method name to export (may be overloaded)
5350
* @param t_return Return type of the method (for disambiguation)
5351
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the method (for disambiguation)
5352
* @param s_methodName Python method name (string literal), or special method from
5353
* lass::python::methods
5354
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5355
*
5356
* @par Example
5357
* ```cpp
5358
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_13(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "add_eggs", "Add eggs")
5359
* ```
5360
*/
5361
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc )\
5362
PY_CLASS_METHOD_QUALIFIED_EX_13(\
5363
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc,\
5364
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5365
5366
/** @brief Export an overloaded 14-ary C++ method to Python, with custom name and docstring.
5367
* @ingroup ClassMethods
5368
*
5369
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_14() with automatically generated dispatcher name.
5370
*
5371
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5372
* @param i_cppMethod C++ method name to export (may be overloaded)
5373
* @param t_return Return type of the method (for disambiguation)
5374
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the method (for disambiguation)
5375
* @param s_methodName Python method name (string literal), or special method from
5376
* lass::python::methods
5377
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5378
*
5379
* @par Example
5380
* ```cpp
5381
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_14(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "add_eggs", "Add eggs")
5382
* ```
5383
*/
5384
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc )\
5385
PY_CLASS_METHOD_QUALIFIED_EX_14(\
5386
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc,\
5387
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5388
5389
/** @brief Export an overloaded 15-ary C++ method to Python, with custom name and docstring.
5390
* @ingroup ClassMethods
5391
*
5392
* Wraps PY_CLASS_METHOD_QUALIFIED_EX_15() with automatically generated dispatcher name.
5393
*
5394
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5395
* @param i_cppMethod C++ method name to export (may be overloaded)
5396
* @param t_return Return type of the method (for disambiguation)
5397
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the method (for disambiguation)
5398
* @param s_methodName Python method name (string literal), or special method from
5399
* lass::python::methods
5400
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5401
*
5402
* @par Example
5403
* ```cpp
5404
* PY_CLASS_METHOD_QUALIFIED_NAME_DOC_15(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "add_eggs", "Add eggs")
5405
* ```
5406
*/
5407
#define PY_CLASS_METHOD_QUALIFIED_NAME_DOC_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc )\
5408
PY_CLASS_METHOD_QUALIFIED_EX_15(\
5409
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc,\
5410
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
5411
5412
5413
/** @brief Export an overloaded C++ method to Python, with custom Python name.
5414
* @ingroup ClassMethods
5415
*
5416
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC() with @a s_doc = `nullptr`.
5417
*
5418
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5419
* @param i_cppMethod C++ method name to export (may be overloaded)
5420
* @param t_return Return type of the method (for disambiguation)
5421
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
5422
* @param s_methodName Python method name (string literal), or special method from
5423
*
5424
* @par Example
5425
* ```cpp
5426
* using TArgs = lass::meta::TypeTuple<int, int>;
5427
* PY_CLASS_METHOD_QUALIFIED_NAME(Menu, eggs, long, TArgs1, "add_eggs") // i = menu.add_eggs(1, 2)
5428
* ```
5429
*/
5430
#define PY_CLASS_METHOD_QUALIFIED_NAME( i_cppClass, i_cppMethod, t_return, t_params, s_methodName )\
5431
PY_CLASS_METHOD_QUALIFIED_NAME_DOC(\
5432
i_cppClass, i_cppMethod, t_return, t_params, s_methodName, 0 )
5433
5434
/** @brief Export an overloaded 0-ary C++ method to Python, with custom Python name.
5435
* @ingroup ClassMethods
5436
*
5437
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_0() with @a s_doc = `nullptr`.
5438
*
5439
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5440
* @param i_cppMethod C++ method name to export (may be overloaded)
5441
* @param t_return Return type of the method (for disambiguation)
5442
* @param s_methodName Python method name (string literal), or special method from
5443
* lass::python::methods
5444
*
5445
* @par Example
5446
* ```cpp
5447
* PY_CLASS_METHOD_QUALIFIED_NAME_0(Menu, eggs, long, "add_eggs")
5448
* ```
5449
*/
5450
#define PY_CLASS_METHOD_QUALIFIED_NAME_0( i_cppClass, i_cppMethod, t_return, s_methodName )\
5451
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_0(\
5452
i_cppClass, i_cppMethod, t_return, s_methodName, 0 )
5453
5454
/** @brief Export an overloaded 1-ary C++ method to Python, with custom Python name.
5455
* @ingroup ClassMethods
5456
*
5457
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_1() with @a s_doc = `nullptr`.
5458
*
5459
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5460
* @param i_cppMethod C++ method name to export (may be overloaded)
5461
* @param t_return Return type of the method (for disambiguation)
5462
* @param t_P1 Parameter types for the method (for disambiguation)
5463
* @param s_methodName Python method name (string literal), or special method from
5464
* lass::python::methods
5465
*
5466
* @par Example
5467
* ```cpp
5468
* PY_CLASS_METHOD_QUALIFIED_NAME_1(Menu, eggs, long, "add_eggs")
5469
* ```
5470
*/
5471
#define PY_CLASS_METHOD_QUALIFIED_NAME_1( i_cppClass, i_cppMethod, t_return, t_P1, s_methodName )\
5472
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_1(\
5473
i_cppClass, i_cppMethod, t_return, t_P1, s_methodName, 0 )
5474
5475
/** @brief Export an overloaded 2-ary C++ method to Python, with custom Python name.
5476
* @ingroup ClassMethods
5477
*
5478
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_2() with @a s_doc = `nullptr`.
5479
*
5480
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5481
* @param i_cppMethod C++ method name to export (may be overloaded)
5482
* @param t_return Return type of the method (for disambiguation)
5483
* @param t_P1, t_P2 Parameter types for the method (for disambiguation)
5484
* @param s_methodName Python method name (string literal), or special method from
5485
* lass::python::methods
5486
*
5487
* @par Example
5488
* ```cpp
5489
* PY_CLASS_METHOD_QUALIFIED_NAME_2(Menu, eggs, long, "add_eggs")
5490
* ```
5491
*/
5492
#define PY_CLASS_METHOD_QUALIFIED_NAME_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName )\
5493
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_2(\
5494
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, 0 )
5495
5496
/** @brief Export an overloaded 3-ary C++ method to Python, with custom Python name.
5497
* @ingroup ClassMethods
5498
*
5499
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_3() with @a s_doc = `nullptr`.
5500
*
5501
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5502
* @param i_cppMethod C++ method name to export (may be overloaded)
5503
* @param t_return Return type of the method (for disambiguation)
5504
* @param t_P1, t_P2, t_P3 Parameter types for the method (for disambiguation)
5505
* @param s_methodName Python method name (string literal), or special method from
5506
* lass::python::methods
5507
*
5508
* @par Example
5509
* ```cpp
5510
* PY_CLASS_METHOD_QUALIFIED_NAME_3(Menu, eggs, long, "add_eggs")
5511
* ```
5512
*/
5513
#define PY_CLASS_METHOD_QUALIFIED_NAME_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName )\
5514
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_3(\
5515
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, 0 )
5516
5517
/** @brief Export an overloaded 4-ary C++ method to Python, with custom Python name.
5518
* @ingroup ClassMethods
5519
*
5520
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_4() with @a s_doc = `nullptr`.
5521
*
5522
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5523
* @param i_cppMethod C++ method name to export (may be overloaded)
5524
* @param t_return Return type of the method (for disambiguation)
5525
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the method (for disambiguation)
5526
* @param s_methodName Python method name (string literal), or special method from
5527
* lass::python::methods
5528
*
5529
* @par Example
5530
* ```cpp
5531
* PY_CLASS_METHOD_QUALIFIED_NAME_4(Menu, eggs, long, "add_eggs")
5532
* ```
5533
*/
5534
#define PY_CLASS_METHOD_QUALIFIED_NAME_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName )\
5535
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_4(\
5536
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, 0 )
5537
5538
/** @brief Export an overloaded 5-ary C++ method to Python, with custom Python name.
5539
* @ingroup ClassMethods
5540
*
5541
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_5() with @a s_doc = `nullptr`.
5542
*
5543
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5544
* @param i_cppMethod C++ method name to export (may be overloaded)
5545
* @param t_return Return type of the method (for disambiguation)
5546
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the method (for disambiguation)
5547
* @param s_methodName Python method name (string literal), or special method from
5548
* lass::python::methods
5549
*
5550
* @par Example
5551
* ```cpp
5552
* PY_CLASS_METHOD_QUALIFIED_NAME_5(Menu, eggs, long, "add_eggs")
5553
* ```
5554
*/
5555
#define PY_CLASS_METHOD_QUALIFIED_NAME_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName )\
5556
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_5(\
5557
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, 0 )
5558
5559
/** @brief Export an overloaded 6-ary C++ method to Python, with custom Python name.
5560
* @ingroup ClassMethods
5561
*
5562
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_6() with @a s_doc = `nullptr`.
5563
*
5564
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5565
* @param i_cppMethod C++ method name to export (may be overloaded)
5566
* @param t_return Return type of the method (for disambiguation)
5567
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the method (for disambiguation)
5568
* @param s_methodName Python method name (string literal), or special method from
5569
* lass::python::methods
5570
*
5571
* @par Example
5572
* ```cpp
5573
* PY_CLASS_METHOD_QUALIFIED_NAME_6(Menu, eggs, long, "add_eggs")
5574
* ```
5575
*/
5576
#define PY_CLASS_METHOD_QUALIFIED_NAME_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName )\
5577
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_6(\
5578
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, 0 )
5579
5580
/** @brief Export an overloaded 7-ary C++ method to Python, with custom Python name.
5581
* @ingroup ClassMethods
5582
*
5583
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_7() with @a s_doc = `nullptr`.
5584
*
5585
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5586
* @param i_cppMethod C++ method name to export (may be overloaded)
5587
* @param t_return Return type of the method (for disambiguation)
5588
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the method (for disambiguation)
5589
* @param s_methodName Python method name (string literal), or special method from
5590
* lass::python::methods
5591
*
5592
* @par Example
5593
* ```cpp
5594
* PY_CLASS_METHOD_QUALIFIED_NAME_7(Menu, eggs, long, "add_eggs")
5595
* ```
5596
*/
5597
#define PY_CLASS_METHOD_QUALIFIED_NAME_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName )\
5598
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_7(\
5599
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, 0 )
5600
5601
/** @brief Export an overloaded 8-ary C++ method to Python, with custom Python name.
5602
* @ingroup ClassMethods
5603
*
5604
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_8() with @a s_doc = `nullptr`.
5605
*
5606
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5607
* @param i_cppMethod C++ method name to export (may be overloaded)
5608
* @param t_return Return type of the method (for disambiguation)
5609
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the method (for disambiguation)
5610
* @param s_methodName Python method name (string literal), or special method from
5611
* lass::python::methods
5612
*
5613
* @par Example
5614
* ```cpp
5615
* PY_CLASS_METHOD_QUALIFIED_NAME_8(Menu, eggs, long, "add_eggs")
5616
* ```
5617
*/
5618
#define PY_CLASS_METHOD_QUALIFIED_NAME_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName )\
5619
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_8(\
5620
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, 0 )
5621
5622
/** @brief Export an overloaded 9-ary C++ method to Python, with custom Python name.
5623
* @ingroup ClassMethods
5624
*
5625
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_9() with @a s_doc = `nullptr`.
5626
*
5627
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5628
* @param i_cppMethod C++ method name to export (may be overloaded)
5629
* @param t_return Return type of the method (for disambiguation)
5630
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the method (for disambiguation)
5631
* @param s_methodName Python method name (string literal), or special method from
5632
* lass::python::methods
5633
*
5634
* @par Example
5635
* ```cpp
5636
* PY_CLASS_METHOD_QUALIFIED_NAME_9(Menu, eggs, long, "add_eggs")
5637
* ```
5638
*/
5639
#define PY_CLASS_METHOD_QUALIFIED_NAME_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName )\
5640
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_9(\
5641
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, 0 )
5642
5643
/** @brief Export an overloaded 10-ary C++ method to Python, with custom Python name.
5644
* @ingroup ClassMethods
5645
*
5646
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_10() with @a s_doc = `nullptr`.
5647
*
5648
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5649
* @param i_cppMethod C++ method name to export (may be overloaded)
5650
* @param t_return Return type of the method (for disambiguation)
5651
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the method (for disambiguation)
5652
* @param s_methodName Python method name (string literal), or special method from
5653
* lass::python::methods
5654
*
5655
* @par Example
5656
* ```cpp
5657
* PY_CLASS_METHOD_QUALIFIED_NAME_10(Menu, eggs, long, "add_eggs")
5658
* ```
5659
*/
5660
#define PY_CLASS_METHOD_QUALIFIED_NAME_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName )\
5661
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_10(\
5662
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, 0 )
5663
5664
/** @brief Export an overloaded 11-ary C++ method to Python, with custom Python name.
5665
* @ingroup ClassMethods
5666
*
5667
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_11() with @a s_doc = `nullptr`.
5668
*
5669
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5670
* @param i_cppMethod C++ method name to export (may be overloaded)
5671
* @param t_return Return type of the method (for disambiguation)
5672
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the method (for disambiguation)
5673
* @param s_methodName Python method name (string literal), or special method from
5674
* lass::python::methods
5675
*
5676
* @par Example
5677
* ```cpp
5678
* PY_CLASS_METHOD_QUALIFIED_NAME_11(Menu, eggs, long, "add_eggs")
5679
* ```
5680
*/
5681
#define PY_CLASS_METHOD_QUALIFIED_NAME_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName )\
5682
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_11(\
5683
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, 0 )
5684
5685
/** @brief Export an overloaded 12-ary C++ method to Python, with custom Python name.
5686
* @ingroup ClassMethods
5687
*
5688
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_12() with @a s_doc = `nullptr`.
5689
*
5690
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5691
* @param i_cppMethod C++ method name to export (may be overloaded)
5692
* @param t_return Return type of the method (for disambiguation)
5693
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the method (for disambiguation)
5694
* @param s_methodName Python method name (string literal), or special method from
5695
* lass::python::methods
5696
*
5697
* @par Example
5698
* ```cpp
5699
* PY_CLASS_METHOD_QUALIFIED_NAME_12(Menu, eggs, long, "add_eggs")
5700
* ```
5701
*/
5702
#define PY_CLASS_METHOD_QUALIFIED_NAME_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName )\
5703
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_12(\
5704
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, 0 )
5705
5706
/** @brief Export an overloaded 13-ary C++ method to Python, with custom Python name.
5707
* @ingroup ClassMethods
5708
*
5709
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_13() with @a s_doc = `nullptr`.
5710
*
5711
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5712
* @param i_cppMethod C++ method name to export (may be overloaded)
5713
* @param t_return Return type of the method (for disambiguation)
5714
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the method (for disambiguation)
5715
* @param s_methodName Python method name (string literal), or special method from
5716
* lass::python::methods
5717
*
5718
* @par Example
5719
* ```cpp
5720
* PY_CLASS_METHOD_QUALIFIED_NAME_13(Menu, eggs, long, "add_eggs")
5721
* ```
5722
*/
5723
#define PY_CLASS_METHOD_QUALIFIED_NAME_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName )\
5724
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_13(\
5725
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, 0 )
5726
5727
/** @brief Export an overloaded 14-ary C++ method to Python, with custom Python name.
5728
* @ingroup ClassMethods
5729
*
5730
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_14() with @a s_doc = `nullptr`.
5731
*
5732
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5733
* @param i_cppMethod C++ method name to export (may be overloaded)
5734
* @param t_return Return type of the method (for disambiguation)
5735
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the method (for disambiguation)
5736
* @param s_methodName Python method name (string literal), or special method from
5737
* lass::python::methods
5738
*
5739
* @par Example
5740
* ```cpp
5741
* PY_CLASS_METHOD_QUALIFIED_NAME_14(Menu, eggs, long, "add_eggs")
5742
* ```
5743
*/
5744
#define PY_CLASS_METHOD_QUALIFIED_NAME_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName )\
5745
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_14(\
5746
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, 0 )
5747
5748
/** @brief Export an overloaded 15-ary C++ method to Python, with custom Python name.
5749
* @ingroup ClassMethods
5750
*
5751
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_15() with @a s_doc = `nullptr`.
5752
*
5753
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5754
* @param i_cppMethod C++ method name to export (may be overloaded)
5755
* @param t_return Return type of the method (for disambiguation)
5756
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the method (for disambiguation)
5757
* @param s_methodName Python method name (string literal), or special method from
5758
* lass::python::methods
5759
*
5760
* @par Example
5761
* ```cpp
5762
* PY_CLASS_METHOD_QUALIFIED_NAME_15(Menu, eggs, long, "add_eggs")
5763
* ```
5764
*/
5765
#define PY_CLASS_METHOD_QUALIFIED_NAME_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName )\
5766
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_15(\
5767
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, 0 )
5768
5769
5770
/** @brief Export an overloaded C++ method to Python, with docstring.
5771
* @ingroup ClassMethods
5772
*
5773
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC() with @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5774
*
5775
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5776
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5777
* @param t_return Return type of the method (for disambiguation)
5778
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
5779
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5780
*
5781
* @par Example
5782
* ```cpp
5783
* using TArgs = lass::meta::TypeTuple<int, int>;
5784
* PY_CLASS_METHOD_QUALIFIED_DOC(Menu, eggs, long, TArgs1, "Add eggs") // i = menu.eggs(1, 2)
5785
* ```
5786
*/
5787
#define PY_CLASS_METHOD_QUALIFIED_DOC( i_cppClass, i_cppMethod, t_return, t_params, s_doc )\
5788
PY_CLASS_METHOD_QUALIFIED_NAME_DOC(\
5789
i_cppClass, i_cppMethod, t_return, t_params, LASS_STRINGIFY(i_cppMethod), s_doc )
5790
5791
/** @brief Export an overloaded 0-ary C++ method to Python, with docstring.
5792
* @ingroup ClassMethods
5793
*
5794
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_0() with
5795
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5796
*
5797
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5798
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5799
* @param t_return Return type of the method (for disambiguation)
5800
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5801
*
5802
* @par Example
5803
* ```cpp
5804
* PY_CLASS_METHOD_QUALIFIED_DOC_0(Menu, eggs, long, "Add eggs")
5805
* ```
5806
*/
5807
#define PY_CLASS_METHOD_QUALIFIED_DOC_0( i_cppClass, i_cppMethod, t_return, s_doc )\
5808
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_0(\
5809
i_cppClass, i_cppMethod, t_return, LASS_STRINGIFY(i_cppMethod), s_doc )
5810
5811
/** @brief Export an overloaded 1-ary C++ method to Python, with docstring.
5812
* @ingroup ClassMethods
5813
*
5814
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_1() with
5815
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5816
*
5817
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5818
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5819
* @param t_return Return type of the method (for disambiguation)
5820
* @param t_P1 Parameter types for the method (for disambiguation)
5821
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5822
*
5823
* @par Example
5824
* ```cpp
5825
* PY_CLASS_METHOD_QUALIFIED_DOC_1(Menu, eggs, long, T1, "Add eggs")
5826
* ```
5827
*/
5828
#define PY_CLASS_METHOD_QUALIFIED_DOC_1( i_cppClass, i_cppMethod, t_return, t_P1, s_doc )\
5829
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_1(\
5830
i_cppClass, i_cppMethod, t_return, t_P1, LASS_STRINGIFY(i_cppMethod), s_doc )
5831
5832
/** @brief Export an overloaded 2-ary C++ method to Python, with docstring.
5833
* @ingroup ClassMethods
5834
*
5835
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_2() with
5836
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5837
*
5838
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5839
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5840
* @param t_return Return type of the method (for disambiguation)
5841
* @param t_P1, t_P2 Parameter types for the method (for disambiguation)
5842
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5843
*
5844
* @par Example
5845
* ```cpp
5846
* PY_CLASS_METHOD_QUALIFIED_DOC_2(Menu, eggs, long, T1, T2, "Add eggs")
5847
* ```
5848
*/
5849
#define PY_CLASS_METHOD_QUALIFIED_DOC_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_doc )\
5850
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_2(\
5851
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, LASS_STRINGIFY(i_cppMethod), s_doc )
5852
5853
/** @brief Export an overloaded 3-ary C++ method to Python, with docstring.
5854
* @ingroup ClassMethods
5855
*
5856
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_3() with
5857
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5858
*
5859
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5860
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5861
* @param t_return Return type of the method (for disambiguation)
5862
* @param t_P1, t_P2, t_P3 Parameter types for the method (for disambiguation)
5863
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5864
*
5865
* @par Example
5866
* ```cpp
5867
* PY_CLASS_METHOD_QUALIFIED_DOC_3(Menu, eggs, long, T1, T2, T3, "Add eggs")
5868
* ```
5869
*/
5870
#define PY_CLASS_METHOD_QUALIFIED_DOC_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_doc )\
5871
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_3(\
5872
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, LASS_STRINGIFY(i_cppMethod), s_doc )
5873
5874
/** @brief Export an overloaded 4-ary C++ method to Python, with docstring.
5875
* @ingroup ClassMethods
5876
*
5877
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_4() with
5878
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5879
*
5880
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5881
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5882
* @param t_return Return type of the method (for disambiguation)
5883
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the method (for disambiguation)
5884
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5885
*
5886
* @par Example
5887
* ```cpp
5888
* PY_CLASS_METHOD_QUALIFIED_DOC_4(Menu, eggs, long, T1, T2, T3, T4, "Add eggs")
5889
* ```
5890
*/
5891
#define PY_CLASS_METHOD_QUALIFIED_DOC_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_doc )\
5892
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_4(\
5893
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, LASS_STRINGIFY(i_cppMethod), s_doc )
5894
5895
/** @brief Export an overloaded 5-ary C++ method to Python, with docstring.
5896
* @ingroup ClassMethods
5897
*
5898
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_5() with
5899
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5900
*
5901
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5902
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5903
* @param t_return Return type of the method (for disambiguation)
5904
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the method (for disambiguation)
5905
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5906
*
5907
* @par Example
5908
* ```cpp
5909
* PY_CLASS_METHOD_QUALIFIED_DOC_5(Menu, eggs, long, T1, T2, T3, T4, T5, "Add eggs")
5910
* ```
5911
*/
5912
#define PY_CLASS_METHOD_QUALIFIED_DOC_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_doc )\
5913
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_5(\
5914
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, LASS_STRINGIFY(i_cppMethod), s_doc )
5915
5916
/** @brief Export an overloaded 6-ary C++ method to Python, with docstring.
5917
* @ingroup ClassMethods
5918
*
5919
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_6() with
5920
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5921
*
5922
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5923
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5924
* @param t_return Return type of the method (for disambiguation)
5925
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the method (for disambiguation)
5926
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5927
*
5928
* @par Example
5929
* ```cpp
5930
* PY_CLASS_METHOD_QUALIFIED_DOC_6(Menu, eggs, long, T1, T2, T3, T4, T5, T6, "Add eggs")
5931
* ```
5932
*/
5933
#define PY_CLASS_METHOD_QUALIFIED_DOC_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_doc )\
5934
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_6(\
5935
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, LASS_STRINGIFY(i_cppMethod), s_doc )
5936
5937
/** @brief Export an overloaded 7-ary C++ method to Python, with docstring.
5938
* @ingroup ClassMethods
5939
*
5940
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_7() with
5941
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5942
*
5943
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5944
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5945
* @param t_return Return type of the method (for disambiguation)
5946
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the method (for disambiguation)
5947
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5948
*
5949
* @par Example
5950
* ```cpp
5951
* PY_CLASS_METHOD_QUALIFIED_DOC_7(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, "Add eggs")
5952
* ```
5953
*/
5954
#define PY_CLASS_METHOD_QUALIFIED_DOC_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_doc )\
5955
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_7(\
5956
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, LASS_STRINGIFY(i_cppMethod), s_doc )
5957
5958
/** @brief Export an overloaded 8-ary C++ method to Python, with docstring.
5959
* @ingroup ClassMethods
5960
*
5961
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_8() with
5962
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5963
*
5964
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5965
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5966
* @param t_return Return type of the method (for disambiguation)
5967
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the method (for disambiguation)
5968
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5969
*
5970
* @par Example
5971
* ```cpp
5972
* PY_CLASS_METHOD_QUALIFIED_DOC_8(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, "Add eggs")
5973
* ```
5974
*/
5975
#define PY_CLASS_METHOD_QUALIFIED_DOC_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_doc )\
5976
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_8(\
5977
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, LASS_STRINGIFY(i_cppMethod), s_doc )
5978
5979
/** @brief Export an overloaded 9-ary C++ method to Python, with docstring.
5980
* @ingroup ClassMethods
5981
*
5982
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_9() with
5983
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
5984
*
5985
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
5986
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
5987
* @param t_return Return type of the method (for disambiguation)
5988
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the method (for disambiguation)
5989
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
5990
*
5991
* @par Example
5992
* ```cpp
5993
* PY_CLASS_METHOD_QUALIFIED_DOC_9(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, "Add eggs")
5994
* ```
5995
*/
5996
#define PY_CLASS_METHOD_QUALIFIED_DOC_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_doc )\
5997
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_9(\
5998
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, LASS_STRINGIFY(i_cppMethod), s_doc )
5999
6000
/** @brief Export an overloaded 10-ary C++ method to Python, with docstring.
6001
* @ingroup ClassMethods
6002
*
6003
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_10() with
6004
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
6005
*
6006
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6007
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6008
* @param t_return Return type of the method (for disambiguation)
6009
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the method (for disambiguation)
6010
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6011
*
6012
* @par Example
6013
* ```cpp
6014
* PY_CLASS_METHOD_QUALIFIED_DOC_10(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "Add eggs")
6015
* ```
6016
*/
6017
#define PY_CLASS_METHOD_QUALIFIED_DOC_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_doc )\
6018
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_10(\
6019
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, LASS_STRINGIFY(i_cppMethod), s_doc )
6020
6021
/** @brief Export an overloaded 11-ary C++ method to Python, with docstring.
6022
* @ingroup ClassMethods
6023
*
6024
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_11() with
6025
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
6026
*
6027
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6028
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6029
* @param t_return Return type of the method (for disambiguation)
6030
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the method (for disambiguation)
6031
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6032
*
6033
* @par Example
6034
* ```cpp
6035
* PY_CLASS_METHOD_QUALIFIED_DOC_11(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "Add eggs")
6036
* ```
6037
*/
6038
#define PY_CLASS_METHOD_QUALIFIED_DOC_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_doc )\
6039
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_11(\
6040
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, LASS_STRINGIFY(i_cppMethod), s_doc )
6041
6042
/** @brief Export an overloaded 12-ary C++ method to Python, with docstring.
6043
* @ingroup ClassMethods
6044
*
6045
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_12() with
6046
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
6047
*
6048
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6049
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6050
* @param t_return Return type of the method (for disambiguation)
6051
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the method (for disambiguation)
6052
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6053
*
6054
* @par Example
6055
* ```cpp
6056
* PY_CLASS_METHOD_QUALIFIED_DOC_12(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "Add eggs")
6057
* ```
6058
*/
6059
#define PY_CLASS_METHOD_QUALIFIED_DOC_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_doc )\
6060
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_12(\
6061
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, LASS_STRINGIFY(i_cppMethod), s_doc )
6062
6063
/** @brief Export an overloaded 13-ary C++ method to Python, with docstring.
6064
* @ingroup ClassMethods
6065
*
6066
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_13() with
6067
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
6068
*
6069
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6070
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6071
* @param t_return Return type of the method (for disambiguation)
6072
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the method (for disambiguation)
6073
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6074
*
6075
* @par Example
6076
* ```cpp
6077
* PY_CLASS_METHOD_QUALIFIED_DOC_13(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "Add eggs")
6078
* ```
6079
*/
6080
#define PY_CLASS_METHOD_QUALIFIED_DOC_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_doc )\
6081
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_13(\
6082
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, LASS_STRINGIFY(i_cppMethod), s_doc )
6083
6084
/** @brief Export an overloaded 14-ary C++ method to Python, with docstring.
6085
* @ingroup ClassMethods
6086
*
6087
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_14() with
6088
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
6089
*
6090
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6091
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6092
* @param t_return Return type of the method (for disambiguation)
6093
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the method (for disambiguation)
6094
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6095
*
6096
* @par Example
6097
* ```cpp
6098
* PY_CLASS_METHOD_QUALIFIED_DOC_14(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "Add eggs")
6099
* ```
6100
*/
6101
#define PY_CLASS_METHOD_QUALIFIED_DOC_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_doc )\
6102
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_14(\
6103
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, LASS_STRINGIFY(i_cppMethod), s_doc )
6104
6105
/** @brief Export an overloaded 15-ary C++ method to Python, with docstring.
6106
* @ingroup ClassMethods
6107
*
6108
* Wraps PY_CLASS_METHOD_QUALIFIED_NAME_DOC_15() with
6109
* @a s_methodName = `LASS_STRINGIFY(i_cppMethod)`.
6110
*
6111
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6112
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6113
* @param t_return Return type of the method (for disambiguation)
6114
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the method (for disambiguation)
6115
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6116
*
6117
* @par Example
6118
* ```cpp
6119
* PY_CLASS_METHOD_QUALIFIED_DOC_15(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "Add eggs")
6120
* ```
6121
*/
6122
#define PY_CLASS_METHOD_QUALIFIED_DOC_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_doc )\
6123
PY_CLASS_METHOD_QUALIFIED_NAME_DOC_15(\
6124
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, LASS_STRINGIFY(i_cppMethod), s_doc )
6125
6126
6127
/** @brief Export an overloaded C++ method to Python
6128
* @ingroup ClassMethods
6129
*
6130
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC() with @a s_doc = `nullptr`.
6131
*
6132
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6133
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6134
* @param t_return Return type of the method (for disambiguation)
6135
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation)
6136
*
6137
* @par Example
6138
* ```cpp
6139
* using TArgs = lass::meta::TypeTuple<int, int>;
6140
* PY_CLASS_METHOD_QUALIFIED(Menu, eggs, long, TArgs1) // i = menu.eggs(1, 2)
6141
* ```
6142
*/
6143
#define PY_CLASS_METHOD_QUALIFIED( i_cppClass, i_cppMethod, t_return, t_params )\
6144
PY_CLASS_METHOD_QUALIFIED_DOC( i_cppClass, i_cppMethod, t_return, t_params, 0 )
6145
6146
/** @brief Export an overloaded 0-ary C++ method to Python
6147
* @ingroup ClassMethods
6148
*
6149
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_0() with @a s_doc = `nullptr`.
6150
*
6151
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6152
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6153
* @param t_return Return type of the method (for disambiguation)
6154
*
6155
* @par Example
6156
* ```cpp
6157
* PY_CLASS_METHOD_QUALIFIED_DOC_0(Menu, eggs, long)
6158
* ```
6159
*/
6160
#define PY_CLASS_METHOD_QUALIFIED_0( i_cppClass, i_cppMethod, t_return )\
6161
PY_CLASS_METHOD_QUALIFIED_DOC_0( i_cppClass, i_cppMethod, t_return, 0 )
6162
6163
/** @brief Export an overloaded 1-ary C++ method to Python
6164
* @ingroup ClassMethods
6165
*
6166
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_1() with @a s_doc = `nullptr`.
6167
*
6168
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6169
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6170
* @param t_return Return type of the method (for disambiguation)
6171
* @param t_P1 Parameter types for the method (for disambiguation)
6172
*
6173
* @par Example
6174
* ```cpp
6175
* PY_CLASS_METHOD_QUALIFIED_DOC_1(Menu, eggs, long, T1)
6176
* ```
6177
*/
6178
#define PY_CLASS_METHOD_QUALIFIED_1( i_cppClass, i_cppMethod, t_return, t_P1 )\
6179
PY_CLASS_METHOD_QUALIFIED_DOC_1( i_cppClass, i_cppMethod, t_return, t_P1, 0 )
6180
6181
/** @brief Export an overloaded 2-ary C++ method to Python
6182
* @ingroup ClassMethods
6183
*
6184
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_2() with @a s_doc = `nullptr`.
6185
*
6186
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6187
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6188
* @param t_return Return type of the method (for disambiguation)
6189
* @param t_P1, t_P2 Parameter types for the method (for disambiguation)
6190
*
6191
* @par Example
6192
* ```cpp
6193
* PY_CLASS_METHOD_QUALIFIED_DOC_2(Menu, eggs, long, T1, T2)
6194
* ```
6195
*/
6196
#define PY_CLASS_METHOD_QUALIFIED_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2 )\
6197
PY_CLASS_METHOD_QUALIFIED_DOC_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, 0 )
6198
6199
/** @brief Export an overloaded 3-ary C++ method to Python
6200
* @ingroup ClassMethods
6201
*
6202
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_3() with @a s_doc = `nullptr`.
6203
*
6204
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6205
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6206
* @param t_return Return type of the method (for disambiguation)
6207
* @param t_P1, t_P2, t_P3 Parameter types for the method (for disambiguation)
6208
*
6209
* @par Example
6210
* ```cpp
6211
* PY_CLASS_METHOD_QUALIFIED_DOC_3(Menu, eggs, long, T1, T2, T3)
6212
* ```
6213
*/
6214
#define PY_CLASS_METHOD_QUALIFIED_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3 )\
6215
PY_CLASS_METHOD_QUALIFIED_DOC_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, 0 )
6216
6217
/** @brief Export an overloaded 4-ary C++ method to Python
6218
* @ingroup ClassMethods
6219
*
6220
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_4() with @a s_doc = `nullptr`.
6221
*
6222
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6223
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6224
* @param t_return Return type of the method (for disambiguation)
6225
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the method (for disambiguation)
6226
*
6227
* @par Example
6228
* ```cpp
6229
* PY_CLASS_METHOD_QUALIFIED_DOC_4(Menu, eggs, long, T1, T2, T3, T4)
6230
* ```
6231
*/
6232
#define PY_CLASS_METHOD_QUALIFIED_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4 )\
6233
PY_CLASS_METHOD_QUALIFIED_DOC_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, 0 )
6234
6235
/** @brief Export an overloaded 5-ary C++ method to Python
6236
* @ingroup ClassMethods
6237
*
6238
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_5() with @a s_doc = `nullptr`.
6239
*
6240
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6241
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6242
* @param t_return Return type of the method (for disambiguation)
6243
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the method (for disambiguation)
6244
*
6245
* @par Example
6246
* ```cpp
6247
* PY_CLASS_METHOD_QUALIFIED_DOC_5(Menu, eggs, long, T1, T2, T3, T4, T5)
6248
* ```
6249
*/
6250
#define PY_CLASS_METHOD_QUALIFIED_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5 )\
6251
PY_CLASS_METHOD_QUALIFIED_DOC_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, 0 )
6252
6253
/** @brief Export an overloaded 6-ary C++ method to Python
6254
* @ingroup ClassMethods
6255
*
6256
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_6() with @a s_doc = `nullptr`.
6257
*
6258
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6259
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6260
* @param t_return Return type of the method (for disambiguation)
6261
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the method (for disambiguation)
6262
*
6263
* @par Example
6264
* ```cpp
6265
* PY_CLASS_METHOD_QUALIFIED_DOC_6(Menu, eggs, long, T1, T2, T3, T4, T5, T6)
6266
* ```
6267
*/
6268
#define PY_CLASS_METHOD_QUALIFIED_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 )\
6269
PY_CLASS_METHOD_QUALIFIED_DOC_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, 0 )
6270
6271
/** @brief Export an overloaded 7-ary C++ method to Python
6272
* @ingroup ClassMethods
6273
*
6274
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_7() with @a s_doc = `nullptr`.
6275
*
6276
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6277
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6278
* @param t_return Return type of the method (for disambiguation)
6279
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the method (for disambiguation)
6280
*
6281
* @par Example
6282
* ```cpp
6283
* PY_CLASS_METHOD_QUALIFIED_DOC_7(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7)
6284
* ```
6285
*/
6286
#define PY_CLASS_METHOD_QUALIFIED_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 )\
6287
PY_CLASS_METHOD_QUALIFIED_DOC_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, 0 )
6288
6289
/** @brief Export an overloaded 8-ary C++ method to Python
6290
* @ingroup ClassMethods
6291
*
6292
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_8() with @a s_doc = `nullptr`.
6293
*
6294
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6295
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6296
* @param t_return Return type of the method (for disambiguation)
6297
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the method (for disambiguation)
6298
*
6299
* @par Example
6300
* ```cpp
6301
* PY_CLASS_METHOD_QUALIFIED_DOC_8(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8)
6302
* ```
6303
*/
6304
#define PY_CLASS_METHOD_QUALIFIED_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 )\
6305
PY_CLASS_METHOD_QUALIFIED_DOC_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, 0 )
6306
6307
/** @brief Export an overloaded 9-ary C++ method to Python
6308
* @ingroup ClassMethods
6309
*
6310
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_9() with @a s_doc = `nullptr`.
6311
*
6312
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6313
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6314
* @param t_return Return type of the method (for disambiguation)
6315
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the method (for disambiguation)
6316
*
6317
* @par Example
6318
* ```cpp
6319
* PY_CLASS_METHOD_QUALIFIED_DOC_9(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9)
6320
* ```
6321
*/
6322
#define PY_CLASS_METHOD_QUALIFIED_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 )\
6323
PY_CLASS_METHOD_QUALIFIED_DOC_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, 0 )
6324
6325
/** @brief Export an overloaded 10-ary C++ method to Python
6326
* @ingroup ClassMethods
6327
*
6328
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_10() with @a s_doc = `nullptr`.
6329
*
6330
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6331
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6332
* @param t_return Return type of the method (for disambiguation)
6333
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the method (for disambiguation)
6334
*
6335
* @par Example
6336
* ```cpp
6337
* PY_CLASS_METHOD_QUALIFIED_DOC_10(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
6338
* ```
6339
*/
6340
#define PY_CLASS_METHOD_QUALIFIED_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 )\
6341
PY_CLASS_METHOD_QUALIFIED_DOC_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, 0 )
6342
6343
/** @brief Export an overloaded 11-ary C++ method to Python
6344
* @ingroup ClassMethods
6345
*
6346
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_11() with @a s_doc = `nullptr`.
6347
*
6348
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6349
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6350
* @param t_return Return type of the method (for disambiguation)
6351
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the method (for disambiguation)
6352
*
6353
* @par Example
6354
* ```cpp
6355
* PY_CLASS_METHOD_QUALIFIED_DOC_11(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
6356
* ```
6357
*/
6358
#define PY_CLASS_METHOD_QUALIFIED_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 )\
6359
PY_CLASS_METHOD_QUALIFIED_DOC_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, 0 )
6360
6361
/** @brief Export an overloaded 12-ary C++ method to Python
6362
* @ingroup ClassMethods
6363
*
6364
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_12() with @a s_doc = `nullptr`.
6365
*
6366
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6367
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6368
* @param t_return Return type of the method (for disambiguation)
6369
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the method (for disambiguation)
6370
*
6371
* @par Example
6372
* ```cpp
6373
* PY_CLASS_METHOD_QUALIFIED_DOC_12(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
6374
* ```
6375
*/
6376
#define PY_CLASS_METHOD_QUALIFIED_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 )\
6377
PY_CLASS_METHOD_QUALIFIED_DOC_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, 0 )
6378
6379
/** @brief Export an overloaded 13-ary C++ method to Python
6380
* @ingroup ClassMethods
6381
*
6382
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_13() with @a s_doc = `nullptr`.
6383
*
6384
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6385
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6386
* @param t_return Return type of the method (for disambiguation)
6387
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the method (for disambiguation)
6388
*
6389
* @par Example
6390
* ```cpp
6391
* PY_CLASS_METHOD_QUALIFIED_DOC_13(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
6392
* ```
6393
*/
6394
#define PY_CLASS_METHOD_QUALIFIED_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 )\
6395
PY_CLASS_METHOD_QUALIFIED_DOC_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, 0 )
6396
6397
/** @brief Export an overloaded 14-ary C++ method to Python
6398
* @ingroup ClassMethods
6399
*
6400
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_14() with @a s_doc = `nullptr`.
6401
*
6402
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6403
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6404
* @param t_return Return type of the method (for disambiguation)
6405
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the method (for disambiguation)
6406
*
6407
* @par Example
6408
* ```cpp
6409
* PY_CLASS_METHOD_QUALIFIED_DOC_14(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
6410
* ```
6411
*/
6412
#define PY_CLASS_METHOD_QUALIFIED_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 )\
6413
PY_CLASS_METHOD_QUALIFIED_DOC_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, 0 )
6414
6415
/** @brief Export an overloaded 15-ary C++ method to Python
6416
* @ingroup ClassMethods
6417
*
6418
* Wraps PY_CLASS_METHOD_QUALIFIED_DOC_15() with @a s_doc = `nullptr`.
6419
*
6420
* @param i_cppClass C++ class containing the method, or its @ref ShadowClasses "shadow class"
6421
* @param i_cppMethod C++ method name to export (used as Python method name, may be overloaded)
6422
* @param t_return Return type of the method (for disambiguation)
6423
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the method (for disambiguation)
6424
*
6425
* @par Example
6426
* ```cpp
6427
* PY_CLASS_METHOD_QUALIFIED_DOC_15(Menu, eggs, long, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
6428
* ```
6429
*/
6430
#define PY_CLASS_METHOD_QUALIFIED_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 )\
6431
PY_CLASS_METHOD_QUALIFIED_DOC_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, 0 )
6432
6433
6434
/** @} */
6435
6436
// --- "free" methods ------------------------------------------------------------------------------
6437
6438
/** @addtogroup ClassMethods
6439
* @name Free Method Export Macros
6440
*
6441
* Export C/C++ free functions as Python methods. The first parameter of the free function
6442
* becomes the implicit 'self' parameter and must be a pointer or reference (const or non-const)
6443
* to the class being exported. This is particularly useful for @ref ShadowClasses where adding
6444
* methods directly to the class is undesirable or impossible.
6445
*
6446
* The basic form is:
6447
*
6448
* ```cpp
6449
* PY_CLASS_FREE_METHOD( t_cppClass, f_cppFreeMethod )
6450
* ```
6451
*
6452
* with:
6453
* - @a t_cppClass : C++ class containing the method, or its @ref ShadowClasses "shadow class"
6454
* - @a f_cppFreeMethod : C++ function to export (can be function pointer or std::function)
6455
*
6456
* @par Common suffixes
6457
*
6458
* The `_NAME`, `_DOC` and `_EX` suffixes allow you to specify a custom Python name, docstring, or
6459
* (in rare cases) a custom dispatcher name.
6460
*
6461
* | Macro | Fixed parameters | Adds parameters | Use for ... |
6462
* |---------------------------------|---------------------------------|-----------------------------------|--------------------------------|
6463
* | `PY_CLASS_FREE_METHOD_NAME` | `i_cppClass`, `f_cppFreeMethod` | `s_methodName` | Custom Python name |
6464
* | `PY_CLASS_FREE_METHOD_DOC` | `i_cppClass`, `i_cppFreeMethod` | `s_doc` | With docstring |
6465
* | `PY_CLASS_FREE_METHOD_NAME_DOC` | `i_cppClass`, `f_cppFreeMethod` | `s_methodName`, `s_doc` | Custom Python name + Docstring |
6466
* | `PY_CLASS_FREE_METHOD_EX` | `t_cppClass`, `f_cppFreeMethod` | `s_methodName`, `s_doc`, `i_dispatcher` | Custom dispatcher name |
6467
*
6468
* See above in @ref ClassMethods for more details about overloading and special operators.
6469
* @{
6470
*/
6471
6472
/** @brief Export a free function as a Python method, with full control.
6473
* @ingroup ClassMethods
6474
*
6475
* This macro allows you to export a C/C++ free function as a Python method. The free function
6476
* must accept a pointer or reference to the object as first argument (const or non-const).
6477
* This is extremely useful when using shadow classes to export a C++ class, because in such cases,
6478
* it's often undesirable or impossible to write the function as a method.
6479
*
6480
* Like PY_CLASS_METHOD_EX(), this macro supports overloading. These overloads may be mixed with
6481
* PY_CLASS_METHOD_EX() methods.
6482
*
6483
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6484
*
6485
* @param t_cppClass C++ class you're exporting the method for
6486
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6487
* @param s_methodName Python method name (string literal), or special method from
6488
* lass::python::methods
6489
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6490
* @param i_dispatcher Unique identifier for the generated dispatcher function
6491
*
6492
*
6493
* @par Example
6494
* ```cpp
6495
* PY_CLASS_FREE_METHOD_EX(Menu, sausage, "add_sausage", "Add sausage", menu_sausage) // menu.add_sausage()
6496
* ```
6497
*/
6498
#define PY_CLASS_FREE_METHOD_EX(t_cppClass, f_cppFreeMethod, s_methodName, s_doc, i_dispatcher)\
6499
PY_CLASS_METHOD_IMPL(t_cppClass, f_cppFreeMethod, s_methodName, s_doc, i_dispatcher,\
6500
::lass::python::impl::CallMethod<TShadowTraits>::callFree)
6501
6502
/** @brief Export a free function as a Python method, with custom name and docstring.
6503
* @ingroup ClassMethods
6504
*
6505
* Wraps PY_CLASS_FREE_METHOD_EX() with automatically generated dispatcher name.
6506
*
6507
* @param i_cppClass C++ class you're exporting the method for
6508
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6509
* @param s_methodName Python method name (string literal), or special method from
6510
* lass::python::methods
6511
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6512
*
6513
* @par Example
6514
* ```cpp
6515
* PY_CLASS_FREE_METHOD_NAME_DOC(Menu, sausage, "add_sausage", "Add sausage") // menu.add_sausage()
6516
* ```
6517
*/
6518
#define PY_CLASS_FREE_METHOD_NAME_DOC( i_cppClass, f_cppFreeMethod, s_methodName, s_doc )\
6519
PY_CLASS_FREE_METHOD_EX(\
6520
i_cppClass, f_cppFreeMethod, s_methodName, s_doc,\
6521
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
6522
6523
/** @brief Export a free function as a Python method, with custom Python name.
6524
* @ingroup ClassMethods
6525
*
6526
* Wraps PY_CLASS_FREE_METHOD_NAME_DOC() with @a s_doc = `nullptr`.
6527
*
6528
* @param i_cppClass C++ class you're exporting the method for
6529
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6530
* @param s_methodName Python method name (string literal), or special method from
6531
* lass::python::methods
6532
*
6533
* @par Example
6534
* ```cpp
6535
* PY_CLASS_FREE_METHOD_NAME(Menu, sausage, "add_sausage") // menu.add_sausage()
6536
* ```
6537
*/
6538
#define PY_CLASS_FREE_METHOD_NAME( i_cppClass, f_cppFreeMethod, s_methodName )\
6539
PY_CLASS_FREE_METHOD_NAME_DOC( i_cppClass, f_cppFreeMethod, s_methodName, 0 )
6540
6541
/** @brief Export a free function as a Python method, with docstring.
6542
* @ingroup ClassMethods
6543
*
6544
* Wraps PY_CLASS_FREE_METHOD_NAME_DOC() with @ s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
6545
*
6546
* @param i_cppClass C++ class you're exporting the method for
6547
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name)
6548
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6549
*
6550
* @par Example
6551
* ```cpp
6552
* PY_CLASS_FREE_METHOD_DOC(Menu, sausage, "Add sausage") // menu.sausage()
6553
* ```
6554
*/
6555
#define PY_CLASS_FREE_METHOD_DOC( i_cppClass, i_cppFreeMethod, s_doc )\
6556
PY_CLASS_FREE_METHOD_NAME_DOC( i_cppClass, i_cppFreeMethod, LASS_STRINGIFY(i_cppFreeMethod), s_doc)
6557
6558
/** @brief Export a free function as a Python method
6559
* @ingroup ClassMethods.
6560
*
6561
* Wraps PY_CLASS_FREE_METHOD_DOC() with @a s_doc = `nullptr`.
6562
*
6563
* @param i_cppClass C++ class you're exporting the method for
6564
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name)
6565
*
6566
* @par Example
6567
* ```cpp
6568
* PY_CLASS_FREE_METHOD(Menu, sausage) // menu.sausage()
6569
* ```
6570
*/
6571
#define PY_CLASS_FREE_METHOD( i_cppClass, i_cppFreeMethod )\
6572
PY_CLASS_FREE_METHOD_DOC( i_cppClass, i_cppFreeMethod, 0 )
6573
6574
/** @} */
6575
6576
/** @addtogroup ClassMethods
6577
* @name Type-Qualified Free Method Export Macros
6578
*
6579
* Export C++ free functions as Python methods with explicit type qualification to resolve
6580
* overload ambiguity. These macros require explicit specification of return type and parameter
6581
* types, making them suitable for overloaded free functions.
6582
*
6583
* The first parameter of the free function becomes the implicit 'self' parameter and must be a
6584
* pointer or reference (const or non-const) to the class being exported.
6585
*
6586
* The list of parameter types can be passed as a single lass::meta::TypeTuple, or as individual
6587
* arguments. For the latter, the `_<N>` tells the number of arguments. The `_<N>` form is the most
6588
* often used one, and simply packs its types into a `TypeTuple`
6589
*
6590
* | Form | Adds parameters |
6591
* |--------------------------------------|-------------------------------------------------|
6592
* | `PY_CLASS_FREE_METHOD_QUALIFIED` | `t_return`, `t_params` as lass::meta::TypeTuple |
6593
* | `PY_CLASS_FREE_METHOD_QUALIFIED_<N>` | `t_return`, `t_P1`, `t_P2`, ... ``t_P<N>` |
6594
*
6595
* They combine with the `_NAME` and `_DOC` suffixes, with the `s_name`, `s_doc`, `i_dispatcher`
6596
* arguments following the function return and parameter types.
6597
*
6598
* See above in @ref ClassMethods for more details about overloading and special operators.
6599
*
6600
* @note There's a special case for binary functions that implement reflected operators like
6601
* `__radd__`. Because they are mapped on the same slot like the regular operator (e.g. both
6602
* `__add__` and `__radd__` are mapped on lass::python::methods::_add_), they differ in the
6603
* order of parameters: for the @b reversed operators, the `self` argument comes @b second.
6604
*
6605
* @{
6606
*/
6607
6608
/** @brief Export an overloaded free function as a Python method, with full control.
6609
* @ingroup ClassMethods
6610
*
6611
* This macro allows you to export a C++ free function as a Python method when there's
6612
* ambiguity due to overloading. It explicitly specifies return type and parameter types
6613
* to resolve such ambiguity. The free function must accept a pointer or reference to the
6614
* object as first argument (const or non-const).
6615
*
6616
* Like PY_CLASS_FREE_METHOD_EX(), this macro supports overloading and these overloads
6617
* may be mixed with PY_CLASS_FREE_METHOD_EX() methods.
6618
*
6619
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6620
*
6621
* @param t_cppClass C++ class you're exporting the method for
6622
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6623
* @param t_return Return type of the free function (for disambiguation)
6624
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation), first is `self`
6625
* @param s_methodName Python method name (string literal), or special method from
6626
* lass::python::methods
6627
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6628
* @param i_dispatcher Unique identifier for the generated dispatcher function
6629
*
6630
* @par Example
6631
* ```cpp
6632
* using TArgs = lass::meta::TypeTuple<TMenuPtr, const std::string&, const std::string&>;
6633
* PY_CLASS_FREE_METHOD_QUALIFIED_EX(Menu, bakedBeans, std::vector<std::string>, TArgs, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6634
* ```
6635
*/
6636
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX(t_cppClass, f_cppFreeMethod, t_return, t_params, s_methodName, s_doc, i_dispatcher)\
6637
static ::lass::python::impl::OverloadLink LASS_CONCATENATE(i_dispatcher, _overloadChain);\
6638
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher(PyObject* iObject, PyObject* iArgs)\
6639
{\
6640
PyObject* result = 0;\
6641
if (LASS_CONCATENATE(i_dispatcher, _overloadChain)(iObject, iArgs, result))\
6642
{\
6643
return result;\
6644
}\
6645
LASS_ASSERT(result == 0);\
6646
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
6647
return ::lass::python::impl::ExplicitResolver<TShadowTraits,t_return,t_params>::callFreeMethod(\
6648
iArgs, iObject, f_cppFreeMethod); \
6649
}\
6650
LASS_EXECUTE_BEFORE_MAIN_EX(LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
6651
t_cppClass ::_lassPyClassDef.addMethod(\
6652
s_methodName, s_doc, \
6653
::lass::python::impl::FunctionTypeDispatcher< SPECIAL_SLOT_TYPE(s_methodName) , i_dispatcher>::fun,\
6654
LASS_CONCATENATE(i_dispatcher, _overloadChain));\
6655
)
6656
6657
/** @brief Export an overloaded 0-ary free function as a Python method, with full control.
6658
* @ingroup ClassMethods
6659
*
6660
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 0 parameters.
6661
*
6662
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6663
*
6664
* @param t_cppClass C++ class you're exporting the method for
6665
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6666
* @param t_return Return type of the free function (for disambiguation)
6667
* @param s_methodName Python method name (string literal), or special method from
6668
* lass::python::methods
6669
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6670
* @param i_dispatcher Unique identifier for the generated dispatcher function
6671
*
6672
* @deprecated Doesn't work
6673
*/
6674
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_0( t_cppClass, f_cppFreeMethod, t_return, s_methodName, s_doc, i_dispatcher )\
6675
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6676
t_cppClass, f_cppFreeMethod, t_return, ::lass::meta::TypeTuple<>, s_methodName, s_doc, i_dispatcher )
6677
6678
/** @brief Export an overloaded 1-ary free function as a Python method, with full control.
6679
* @ingroup ClassMethods
6680
*
6681
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 1 parameters.
6682
*
6683
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6684
*
6685
* @param t_cppClass C++ class you're exporting the method for
6686
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6687
* @param t_return Return type of the free function (for disambiguation)
6688
* @param t_P1 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6689
* @param s_methodName Python method name (string literal), or special method from
6690
* lass::python::methods
6691
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6692
* @param i_dispatcher Unique identifier for the generated dispatcher function
6693
*
6694
* @par Example
6695
* ```cpp
6696
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_1(Menu, bakedBeans, std::vector<std::string>, T1, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6697
* ```
6698
*/
6699
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_1( t_cppClass, f_cppFreeMethod, t_return, t_P1, s_methodName, s_doc, i_dispatcher )\
6700
typedef ::lass::meta::TypeTuple< t_P1 > \
6701
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6702
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6703
t_cppClass, f_cppFreeMethod, t_return,\
6704
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6705
i_dispatcher )
6706
6707
/** @brief Export an overloaded 2-ary free function as a Python method, with full control.
6708
* @ingroup ClassMethods
6709
*
6710
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 2 parameters.
6711
*
6712
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6713
*
6714
* @param t_cppClass C++ class you're exporting the method for
6715
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6716
* @param t_return Return type of the free function (for disambiguation)
6717
* @param t_P1, t_P2 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6718
* @param s_methodName Python method name (string literal), or special method from
6719
* lass::python::methods
6720
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6721
* @param i_dispatcher Unique identifier for the generated dispatcher function
6722
*
6723
* @par Example
6724
* ```cpp
6725
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_2(Menu, bakedBeans, std::vector<std::string>, T1, T2, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6726
* ```
6727
*/
6728
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_2( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, s_methodName, s_doc, i_dispatcher )\
6729
typedef ::lass::meta::TypeTuple< t_P1, t_P2 > \
6730
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6731
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6732
t_cppClass, f_cppFreeMethod, t_return,\
6733
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6734
i_dispatcher )
6735
6736
/** @brief Export an overloaded 3-ary free function as a Python method, with full control.
6737
* @ingroup ClassMethods
6738
*
6739
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 3 parameters.
6740
*
6741
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6742
*
6743
* @param t_cppClass C++ class you're exporting the method for
6744
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6745
* @param t_return Return type of the free function (for disambiguation)
6746
* @param t_P1, t_P2, t_P3 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6747
* @param s_methodName Python method name (string literal), or special method from
6748
* lass::python::methods
6749
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6750
* @param i_dispatcher Unique identifier for the generated dispatcher function
6751
*
6752
* @par Example
6753
* ```cpp
6754
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_3(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6755
* ```
6756
*/
6757
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_3( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc, i_dispatcher )\
6758
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3 > \
6759
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6760
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6761
t_cppClass, f_cppFreeMethod, t_return,\
6762
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6763
i_dispatcher )
6764
6765
/** @brief Export an overloaded 4-ary free function as a Python method, with full control.
6766
* @ingroup ClassMethods
6767
*
6768
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 4 parameters.
6769
*
6770
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6771
*
6772
* @param t_cppClass C++ class you're exporting the method for
6773
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6774
* @param t_return Return type of the free function (for disambiguation)
6775
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6776
* @param s_methodName Python method name (string literal), or special method from
6777
* lass::python::methods
6778
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6779
* @param i_dispatcher Unique identifier for the generated dispatcher function
6780
*
6781
* @par Example
6782
* ```cpp
6783
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_4(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6784
* ```
6785
*/
6786
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_4( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc, i_dispatcher )\
6787
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4 > \
6788
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6789
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6790
t_cppClass, f_cppFreeMethod, t_return,\
6791
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6792
i_dispatcher )
6793
6794
/** @brief Export an overloaded 5-ary free function as a Python method, with full control.
6795
* @ingroup ClassMethods
6796
*
6797
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 5 parameters.
6798
*
6799
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6800
*
6801
* @param t_cppClass C++ class you're exporting the method for
6802
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6803
* @param t_return Return type of the free function (for disambiguation)
6804
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6805
* @param s_methodName Python method name (string literal), or special method from
6806
* lass::python::methods
6807
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6808
* @param i_dispatcher Unique identifier for the generated dispatcher function
6809
*
6810
* @par Example
6811
* ```cpp
6812
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_5(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6813
* ```
6814
*/
6815
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_5( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc, i_dispatcher )\
6816
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5 > \
6817
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6818
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6819
t_cppClass, f_cppFreeMethod, t_return,\
6820
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6821
i_dispatcher )
6822
6823
/** @brief Export an overloaded 6-ary free function as a Python method, with full control.
6824
* @ingroup ClassMethods
6825
*
6826
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 6 parameters.
6827
*
6828
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6829
*
6830
* @param t_cppClass C++ class you're exporting the method for
6831
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6832
* @param t_return Return type of the free function (for disambiguation)
6833
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6834
* @param s_methodName Python method name (string literal), or special method from
6835
* lass::python::methods
6836
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6837
* @param i_dispatcher Unique identifier for the generated dispatcher function
6838
*
6839
* @par Example
6840
* ```cpp
6841
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_6(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6842
* ```
6843
*/
6844
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_6( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc, i_dispatcher )\
6845
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 > \
6846
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6847
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6848
t_cppClass, f_cppFreeMethod, t_return,\
6849
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6850
i_dispatcher )
6851
6852
/** @brief Export an overloaded 7-ary free function as a Python method, with full control.
6853
* @ingroup ClassMethods
6854
*
6855
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 7 parameters.
6856
*
6857
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6858
*
6859
* @param t_cppClass C++ class you're exporting the method for
6860
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6861
* @param t_return Return type of the free function (for disambiguation)
6862
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6863
* @param s_methodName Python method name (string literal), or special method from
6864
* lass::python::methods
6865
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6866
* @param i_dispatcher Unique identifier for the generated dispatcher function
6867
*
6868
* @par Example
6869
* ```cpp
6870
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_7(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6871
* ```
6872
*/
6873
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_7( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc, i_dispatcher )\
6874
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 > \
6875
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6876
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6877
t_cppClass, f_cppFreeMethod, t_return,\
6878
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6879
i_dispatcher )
6880
6881
/** @brief Export an overloaded 8-ary free function as a Python method, with full control.
6882
* @ingroup ClassMethods
6883
*
6884
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 8 parameters.
6885
*
6886
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6887
*
6888
* @param t_cppClass C++ class you're exporting the method for
6889
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6890
* @param t_return Return type of the free function (for disambiguation)
6891
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6892
* @param s_methodName Python method name (string literal), or special method from
6893
* lass::python::methods
6894
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6895
* @param i_dispatcher Unique identifier for the generated dispatcher function
6896
*
6897
* @par Example
6898
* ```cpp
6899
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_8(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6900
* ```
6901
*/
6902
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_8( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc, i_dispatcher )\
6903
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 > \
6904
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6905
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6906
t_cppClass, f_cppFreeMethod, t_return,\
6907
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6908
i_dispatcher )
6909
6910
/** @brief Export an overloaded 9-ary free function as a Python method, with full control.
6911
* @ingroup ClassMethods
6912
*
6913
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 9 parameters.
6914
*
6915
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6916
*
6917
* @param t_cppClass C++ class you're exporting the method for
6918
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6919
* @param t_return Return type of the free function (for disambiguation)
6920
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6921
* @param s_methodName Python method name (string literal), or special method from
6922
* lass::python::methods
6923
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6924
* @param i_dispatcher Unique identifier for the generated dispatcher function
6925
*
6926
* @par Example
6927
* ```cpp
6928
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_9(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6929
* ```
6930
*/
6931
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_9( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc, i_dispatcher )\
6932
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 > \
6933
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6934
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6935
t_cppClass, f_cppFreeMethod, t_return,\
6936
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6937
i_dispatcher )
6938
6939
/** @brief Export an overloaded 10-ary free function as a Python method, with full control.
6940
* @ingroup ClassMethods
6941
*
6942
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 10 parameters.
6943
*
6944
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6945
*
6946
* @param t_cppClass C++ class you're exporting the method for
6947
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6948
* @param t_return Return type of the free function (for disambiguation)
6949
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6950
* @param s_methodName Python method name (string literal), or special method from
6951
* lass::python::methods
6952
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6953
* @param i_dispatcher Unique identifier for the generated dispatcher function
6954
*
6955
* @par Example
6956
* ```cpp
6957
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_10(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6958
* ```
6959
*/
6960
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_10( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc, i_dispatcher )\
6961
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 > \
6962
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6963
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6964
t_cppClass, f_cppFreeMethod, t_return,\
6965
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6966
i_dispatcher )
6967
6968
/** @brief Export an overloaded 11-ary free function as a Python method, with full control.
6969
* @ingroup ClassMethods
6970
*
6971
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 11 parameters.
6972
*
6973
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
6974
*
6975
* @param t_cppClass C++ class you're exporting the method for
6976
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
6977
* @param t_return Return type of the free function (for disambiguation)
6978
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
6979
* @param s_methodName Python method name (string literal), or special method from
6980
* lass::python::methods
6981
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
6982
* @param i_dispatcher Unique identifier for the generated dispatcher function
6983
*
6984
* @par Example
6985
* ```cpp
6986
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_11(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
6987
* ```
6988
*/
6989
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_11( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc, i_dispatcher )\
6990
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 > \
6991
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
6992
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
6993
t_cppClass, f_cppFreeMethod, t_return,\
6994
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
6995
i_dispatcher )
6996
6997
/** @brief Export an overloaded 12-ary free function as a Python method, with full control.
6998
* @ingroup ClassMethods
6999
*
7000
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 12 parameters.
7001
*
7002
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
7003
*
7004
* @param t_cppClass C++ class you're exporting the method for
7005
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7006
* @param t_return Return type of the free function (for disambiguation)
7007
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7008
* @param s_methodName Python method name (string literal), or special method from
7009
* lass::python::methods
7010
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7011
* @param i_dispatcher Unique identifier for the generated dispatcher function
7012
*
7013
* @par Example
7014
* ```cpp
7015
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_12(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
7016
* ```
7017
*/
7018
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_12( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc, i_dispatcher )\
7019
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 > \
7020
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
7021
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
7022
t_cppClass, f_cppFreeMethod, t_return,\
7023
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
7024
i_dispatcher )
7025
7026
/** @brief Export an overloaded 13-ary free function as a Python method, with full control.
7027
* @ingroup ClassMethods
7028
*
7029
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 13 parameters.
7030
*
7031
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
7032
*
7033
* @param t_cppClass C++ class you're exporting the method for
7034
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7035
* @param t_return Return type of the free function (for disambiguation)
7036
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7037
* @param s_methodName Python method name (string literal), or special method from
7038
* lass::python::methods
7039
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7040
* @param i_dispatcher Unique identifier for the generated dispatcher function
7041
*
7042
* @par Example
7043
* ```cpp
7044
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_13(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
7045
* ```
7046
*/
7047
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_13( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc, i_dispatcher )\
7048
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 > \
7049
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
7050
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
7051
t_cppClass, f_cppFreeMethod, t_return,\
7052
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
7053
i_dispatcher )
7054
7055
/** @brief Export an overloaded 14-ary free function as a Python method, with full control.
7056
* @ingroup ClassMethods
7057
*
7058
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 14 parameters.
7059
*
7060
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
7061
*
7062
* @param t_cppClass C++ class you're exporting the method for
7063
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7064
* @param t_return Return type of the free function (for disambiguation)
7065
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7066
* @param s_methodName Python method name (string literal), or special method from
7067
* lass::python::methods
7068
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7069
* @param i_dispatcher Unique identifier for the generated dispatcher function
7070
*
7071
* @par Example
7072
* ```cpp
7073
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_14(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
7074
* ```
7075
*/
7076
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_14( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc, i_dispatcher )\
7077
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 > \
7078
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
7079
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
7080
t_cppClass, f_cppFreeMethod, t_return,\
7081
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
7082
i_dispatcher )
7083
7084
/** @brief Export an overloaded 15-ary free function as a Python method, with full control.
7085
* @ingroup ClassMethods
7086
*
7087
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() for free functions with 15 parameters.
7088
*
7089
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
7090
*
7091
* @param t_cppClass C++ class you're exporting the method for
7092
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7093
* @param t_return Return type of the free function (for disambiguation)
7094
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7095
* @param s_methodName Python method name (string literal), or special method from
7096
* lass::python::methods
7097
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7098
* @param i_dispatcher Unique identifier for the generated dispatcher function
7099
*
7100
* @par Example
7101
* ```cpp
7102
* PY_CLASS_FREE_METHOD_QUALIFIED_EX_15(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "baked_beans", "Add baked beans", menu_baked_beans) // menu.baked_beans("a", "b")
7103
* ```
7104
*/
7105
#define PY_CLASS_FREE_METHOD_QUALIFIED_EX_15( t_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc, i_dispatcher )\
7106
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 > \
7107
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams));\
7108
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
7109
t_cppClass, f_cppFreeMethod, t_return,\
7110
LASS_UNIQUENAME(LASS_CONCATENATE(i_dispatcher, _TParams)), s_methodName, s_doc,\
7111
i_dispatcher )
7112
7113
7114
/** @brief Export an overloaded free function as a Python method, with custom name and docstring.
7115
* @ingroup ClassMethods
7116
*
7117
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX() with automatically generated dispatcher name.
7118
*
7119
* @param i_cppClass C++ class you're exporting the method for
7120
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7121
* @param t_return Return type of the free function (for disambiguation)
7122
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation), first is `self`
7123
* @param s_methodName Python method name (string literal), or special method from
7124
* lass::python::methods
7125
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7126
*
7127
* @par Example
7128
* ```cpp
7129
* using TArgs = lass::meta::TypeTuple<TMenuPtr, const std::string&, const std::string&>;
7130
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC(Menu, bakedBeans, std::vector<std::string>, TArgs, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7131
* ```
7132
*/
7133
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC( i_cppClass, f_cppFreeMethod, t_return, t_params, s_methodName, s_doc )\
7134
PY_CLASS_FREE_METHOD_QUALIFIED_EX(\
7135
i_cppClass, f_cppFreeMethod, t_return, t_params, s_methodName, s_doc,\
7136
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7137
7138
/** @brief Export an overloaded 0-ary free function as a Python method, with custom name and docstring.
7139
* @ingroup ClassMethods
7140
*
7141
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_0() with automatically generated dispatcher name.
7142
*
7143
* @param i_cppClass C++ class you're exporting the method for
7144
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7145
* @param t_return Return type of the free function (for disambiguation)
7146
* @param s_methodName Python method name (string literal), or special method from
7147
* lass::python::methods
7148
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7149
*
7150
* @deprecated Doesn't work
7151
*/
7152
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_0( i_cppClass, f_cppFreeMethod, t_return, s_methodName, s_doc )\
7153
PY_CLASS_FREE_METHOD_QUALIFIED_EX_0(\
7154
i_cppClass, f_cppFreeMethod, t_return, s_methodName, s_doc,\
7155
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7156
7157
/** @brief Export an overloaded 1-ary free function as a Python method, with custom name and docstring.
7158
* @ingroup ClassMethods
7159
*
7160
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_1() with automatically generated dispatcher name.
7161
*
7162
* @param i_cppClass C++ class you're exporting the method for
7163
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7164
* @param t_return Return type of the free function (for disambiguation)
7165
* @param t_P1 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7166
* @param s_methodName Python method name (string literal), or special method from
7167
* lass::python::methods
7168
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7169
*
7170
* @par Example
7171
* ```cpp
7172
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_1(Menu, bakedBeans, std::vector<std::string>, T1, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7173
* ```
7174
*/
7175
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_1( i_cppClass, f_cppFreeMethod, t_return, t_P1, s_methodName, s_doc )\
7176
PY_CLASS_FREE_METHOD_QUALIFIED_EX_1(\
7177
i_cppClass, f_cppFreeMethod, t_return, t_P1, s_methodName, s_doc,\
7178
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7179
7180
/** @brief Export an overloaded 2-ary free function as a Python method, with custom name and docstring.
7181
* @ingroup ClassMethods
7182
*
7183
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_2() with automatically generated dispatcher name.
7184
*
7185
* @param i_cppClass C++ class you're exporting the method for
7186
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7187
* @param t_return Return type of the free function (for disambiguation)
7188
* @param t_P1, t_P2 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7189
* @param s_methodName Python method name (string literal), or special method from
7190
* lass::python::methods
7191
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7192
*
7193
* @par Example
7194
* ```cpp
7195
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_2(Menu, bakedBeans, std::vector<std::string>, T1, T2, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7196
* ```
7197
*/
7198
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_2( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, s_methodName, s_doc )\
7199
PY_CLASS_FREE_METHOD_QUALIFIED_EX_2(\
7200
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, s_methodName, s_doc,\
7201
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7202
7203
/** @brief Export an overloaded 3-ary free function as a Python method, with custom name and docstring.
7204
* @ingroup ClassMethods
7205
*
7206
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_3() with automatically generated dispatcher name.
7207
*
7208
* @param i_cppClass C++ class you're exporting the method for
7209
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7210
* @param t_return Return type of the free function (for disambiguation)
7211
* @param t_P1, t_P2, t_P3 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7212
* @param s_methodName Python method name (string literal), or special method from
7213
* lass::python::methods
7214
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7215
*
7216
* @par Example
7217
* ```cpp
7218
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_3(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7219
* ```
7220
*/
7221
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_3( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc )\
7222
PY_CLASS_FREE_METHOD_QUALIFIED_EX_3(\
7223
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc,\
7224
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7225
7226
/** @brief Export an overloaded 4-ary free function as a Python method, with custom name and docstring.
7227
* @ingroup ClassMethods
7228
*
7229
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_4() with automatically generated dispatcher name.
7230
*
7231
* @param i_cppClass C++ class you're exporting the method for
7232
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7233
* @param t_return Return type of the free function (for disambiguation)
7234
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7235
* @param s_methodName Python method name (string literal), or special method from
7236
* lass::python::methods
7237
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7238
*
7239
* @par Example
7240
* ```cpp
7241
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_4(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7242
* ```
7243
*/
7244
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_4( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc )\
7245
PY_CLASS_FREE_METHOD_QUALIFIED_EX_4(\
7246
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc,\
7247
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7248
7249
/** @brief Export an overloaded 5-ary free function as a Python method, with custom name and docstring.
7250
* @ingroup ClassMethods
7251
*
7252
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_5() with automatically generated dispatcher name.
7253
*
7254
* @param i_cppClass C++ class you're exporting the method for
7255
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7256
* @param t_return Return type of the free function (for disambiguation)
7257
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7258
* @param s_methodName Python method name (string literal), or special method from
7259
* lass::python::methods
7260
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7261
*
7262
* @par Example
7263
* ```cpp
7264
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_5(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7265
* ```
7266
*/
7267
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_5( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc )\
7268
PY_CLASS_FREE_METHOD_QUALIFIED_EX_5(\
7269
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc,\
7270
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7271
7272
/** @brief Export an overloaded 6-ary free function as a Python method, with custom name and docstring.
7273
* @ingroup ClassMethods
7274
*
7275
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_6() with automatically generated dispatcher name.
7276
*
7277
* @param i_cppClass C++ class you're exporting the method for
7278
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7279
* @param t_return Return type of the free function (for disambiguation)
7280
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7281
* @param s_methodName Python method name (string literal), or special method from
7282
* lass::python::methods
7283
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7284
*
7285
* @par Example
7286
* ```cpp
7287
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_6(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7288
* ```
7289
*/
7290
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_6( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc )\
7291
PY_CLASS_FREE_METHOD_QUALIFIED_EX_6(\
7292
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc,\
7293
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7294
7295
/** @brief Export an overloaded 7-ary free function as a Python method, with custom name and docstring.
7296
* @ingroup ClassMethods
7297
*
7298
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_7() with automatically generated dispatcher name.
7299
*
7300
* @param i_cppClass C++ class you're exporting the method for
7301
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7302
* @param t_return Return type of the free function (for disambiguation)
7303
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7304
* @param s_methodName Python method name (string literal), or special method from
7305
* lass::python::methods
7306
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7307
*
7308
* @par Example
7309
* ```cpp
7310
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_7(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7311
* ```
7312
*/
7313
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_7( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc )\
7314
PY_CLASS_FREE_METHOD_QUALIFIED_EX_7(\
7315
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc,\
7316
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7317
7318
/** @brief Export an overloaded 8-ary free function as a Python method, with custom name and docstring.
7319
* @ingroup ClassMethods
7320
*
7321
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_8() with automatically generated dispatcher name.
7322
*
7323
* @param i_cppClass C++ class you're exporting the method for
7324
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7325
* @param t_return Return type of the free function (for disambiguation)
7326
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7327
* @param s_methodName Python method name (string literal), or special method from
7328
* lass::python::methods
7329
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7330
*
7331
* @par Example
7332
* ```cpp
7333
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_8(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7334
* ```
7335
*/
7336
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_8( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc )\
7337
PY_CLASS_FREE_METHOD_QUALIFIED_EX_8(\
7338
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc,\
7339
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7340
7341
/** @brief Export an overloaded 9-ary free function as a Python method, with custom name and docstring.
7342
* @ingroup ClassMethods
7343
*
7344
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_9() with automatically generated dispatcher name.
7345
*
7346
* @param i_cppClass C++ class you're exporting the method for
7347
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7348
* @param t_return Return type of the free function (for disambiguation)
7349
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7350
* @param s_methodName Python method name (string literal), or special method from
7351
* lass::python::methods
7352
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7353
*
7354
* @par Example
7355
* ```cpp
7356
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_9(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7357
* ```
7358
*/
7359
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_9( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc )\
7360
PY_CLASS_FREE_METHOD_QUALIFIED_EX_9(\
7361
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc,\
7362
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7363
7364
/** @brief Export an overloaded 10-ary free function as a Python method, with custom name and docstring.
7365
* @ingroup ClassMethods
7366
*
7367
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_10() with automatically generated dispatcher name.
7368
*
7369
* @param i_cppClass C++ class you're exporting the method for
7370
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7371
* @param t_return Return type of the free function (for disambiguation)
7372
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7373
* @param s_methodName Python method name (string literal), or special method from
7374
* lass::python::methods
7375
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7376
*
7377
* @par Example
7378
* ```cpp
7379
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_10(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7380
* ```
7381
*/
7382
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_10( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc )\
7383
PY_CLASS_FREE_METHOD_QUALIFIED_EX_10(\
7384
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc,\
7385
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7386
7387
/** @brief Export an overloaded 11-ary free function as a Python method, with custom name and docstring.
7388
* @ingroup ClassMethods
7389
*
7390
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_11() with automatically generated dispatcher name.
7391
*
7392
* @param i_cppClass C++ class you're exporting the method for
7393
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7394
* @param t_return Return type of the free function (for disambiguation)
7395
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7396
* @param s_methodName Python method name (string literal), or special method from
7397
* lass::python::methods
7398
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7399
*
7400
* @par Example
7401
* ```cpp
7402
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_11(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7403
* ```
7404
*/
7405
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_11( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc )\
7406
PY_CLASS_FREE_METHOD_QUALIFIED_EX_11(\
7407
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc,\
7408
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7409
7410
/** @brief Export an overloaded 12-ary free function as a Python method, with custom name and docstring.
7411
* @ingroup ClassMethods
7412
*
7413
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_12() with automatically generated dispatcher name.
7414
*
7415
* @param i_cppClass C++ class you're exporting the method for
7416
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7417
* @param t_return Return type of the free function (for disambiguation)
7418
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7419
* @param s_methodName Python method name (string literal), or special method from
7420
* lass::python::methods
7421
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7422
*
7423
* @par Example
7424
* ```cpp
7425
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_12(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7426
* ```
7427
*/
7428
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_12( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc )\
7429
PY_CLASS_FREE_METHOD_QUALIFIED_EX_12(\
7430
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc,\
7431
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7432
7433
/** @brief Export an overloaded 13-ary free function as a Python method, with custom name and docstring.
7434
* @ingroup ClassMethods
7435
*
7436
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_13() with automatically generated dispatcher name.
7437
*
7438
* @param i_cppClass C++ class you're exporting the method for
7439
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7440
* @param t_return Return type of the free function (for disambiguation)
7441
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7442
* @param s_methodName Python method name (string literal), or special method from
7443
* lass::python::methods
7444
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7445
*
7446
* @par Example
7447
* ```cpp
7448
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_13(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7449
* ```
7450
*/
7451
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_13( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc )\
7452
PY_CLASS_FREE_METHOD_QUALIFIED_EX_13(\
7453
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc,\
7454
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7455
7456
/** @brief Export an overloaded 14-ary free function as a Python method, with custom name and docstring.
7457
* @ingroup ClassMethods
7458
*
7459
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_14() with automatically generated dispatcher name.
7460
*
7461
* @param i_cppClass C++ class you're exporting the method for
7462
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7463
* @param t_return Return type of the free function (for disambiguation)
7464
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7465
* @param s_methodName Python method name (string literal), or special method from
7466
* lass::python::methods
7467
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7468
*
7469
* @par Example
7470
* ```cpp
7471
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_14(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7472
* ```
7473
*/
7474
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_14( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc )\
7475
PY_CLASS_FREE_METHOD_QUALIFIED_EX_14(\
7476
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc,\
7477
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7478
7479
/** @brief Export an overloaded 15-ary free function as a Python method, with custom name and docstring.
7480
* @ingroup ClassMethods
7481
*
7482
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_EX_15() with automatically generated dispatcher name.
7483
*
7484
* @param i_cppClass C++ class you're exporting the method for
7485
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7486
* @param t_return Return type of the free function (for disambiguation)
7487
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7488
* @param s_methodName Python method name (string literal), or special method from
7489
* lass::python::methods
7490
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7491
*
7492
* @par Example
7493
* ```cpp
7494
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_15(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "baked_beans", "Add baked beans") // menu.baked_beans("a", "b")
7495
* ```
7496
*/
7497
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_15( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc )\
7498
PY_CLASS_FREE_METHOD_QUALIFIED_EX_15(\
7499
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc,\
7500
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)))
7501
7502
7503
/** @brief Export an overloaded free function as a Python method, with custom Python name.
7504
* @ingroup ClassMethods
7505
*
7506
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC() with @a s_doc = `nullptr`.
7507
*
7508
* @param i_cppClass C++ class you're exporting the method for
7509
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7510
* @param t_return Return type of the free function (for disambiguation)
7511
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation), first is `self`
7512
* @param s_methodName Python method name (string literal), or special method from
7513
* lass::python::methods
7514
*
7515
* @par Example
7516
* ```cpp
7517
* using TArgs = lass::meta::TypeTuple<TMenuPtr, const std::string&, const std::string&>;
7518
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME(Menu, bakedBeans, std::vector<std::string>, TArgs, "baked_beans") // menu.baked_beans("a", "b")
7519
* ```
7520
*/
7521
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME( i_cppClass, f_cppFreeMethod, t_return, t_params, s_methodName )\
7522
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC(\
7523
i_cppClass, f_cppFreeMethod, t_return, t_params, s_methodName, 0 )
7524
7525
/** @brief Export an overloaded 0-ary free function as a Python method, with custom Python name.
7526
* @ingroup ClassMethods
7527
*
7528
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_0() with @a s_doc = `nullptr`.
7529
*
7530
* @param i_cppClass C++ class you're exporting the method for
7531
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7532
* @param t_return Return type of the free function (for disambiguation)
7533
* @param s_methodName Python method name (string literal), or special method from
7534
* lass::python::methods
7535
*
7536
* @deprecated Doesn't work
7537
*/
7538
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_0( i_cppClass, f_cppFreeMethod, t_return, s_methodName )\
7539
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_0(\
7540
i_cppClass, f_cppFreeMethod, t_return, s_methodName, 0 )
7541
7542
/** @brief Export an overloaded 1-ary free function as a Python method, with custom Python name.
7543
* @ingroup ClassMethods
7544
*
7545
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_1() with @a s_doc = `nullptr`.
7546
*
7547
* @param i_cppClass C++ class you're exporting the method for
7548
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7549
* @param t_return Return type of the free function (for disambiguation)
7550
* @param t_P1 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7551
* @param s_methodName Python method name (string literal), or special method from
7552
* lass::python::methods
7553
*
7554
* @par Example
7555
* ```cpp
7556
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_1(Menu, bakedBeans, std::vector<std::string>, T1, "baked_beans") // menu.baked_beans("a", "b")
7557
* ```
7558
*/
7559
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_1( i_cppClass, f_cppFreeMethod, t_return, t_P1, s_methodName )\
7560
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_1(\
7561
i_cppClass, f_cppFreeMethod, t_return, t_P1, s_methodName, 0 )
7562
7563
/** @brief Export an overloaded 2-ary free function as a Python method, with custom Python name.
7564
* @ingroup ClassMethods
7565
*
7566
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_2() with @a s_doc = `nullptr`.
7567
*
7568
* @param i_cppClass C++ class you're exporting the method for
7569
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7570
* @param t_return Return type of the free function (for disambiguation)
7571
* @param t_P1, t_P2 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7572
* @param s_methodName Python method name (string literal), or special method from
7573
* lass::python::methods
7574
*
7575
* @par Example
7576
* ```cpp
7577
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_2(Menu, bakedBeans, std::vector<std::string>, T1, T2, "baked_beans") // menu.baked_beans("a", "b")
7578
* ```
7579
*/
7580
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_2( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, s_methodName )\
7581
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_2(\
7582
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, s_methodName, 0 )
7583
7584
/** @brief Export an overloaded 3-ary free function as a Python method, with custom Python name.
7585
* @ingroup ClassMethods
7586
*
7587
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_3() with @a s_doc = `nullptr`.
7588
*
7589
* @param i_cppClass C++ class you're exporting the method for
7590
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7591
* @param t_return Return type of the free function (for disambiguation)
7592
* @param t_P1, t_P2, t_P3 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7593
* @param s_methodName Python method name (string literal), or special method from
7594
* lass::python::methods
7595
*
7596
* @par Example
7597
* ```cpp
7598
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_3(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, "baked_beans") // menu.baked_beans("a", "b")
7599
* ```
7600
*/
7601
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_3( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, s_methodName )\
7602
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_3(\
7603
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, s_methodName, 0 )
7604
7605
/** @brief Export an overloaded 4-ary free function as a Python method, with custom Python name.
7606
* @ingroup ClassMethods
7607
*
7608
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_4() with @a s_doc = `nullptr`.
7609
*
7610
* @param i_cppClass C++ class you're exporting the method for
7611
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7612
* @param t_return Return type of the free function (for disambiguation)
7613
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7614
* @param s_methodName Python method name (string literal), or special method from
7615
* lass::python::methods
7616
*
7617
* @par Example
7618
* ```cpp
7619
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_4(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, "baked_beans") // menu.baked_beans("a", "b")
7620
* ```
7621
*/
7622
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_4( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName )\
7623
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_4(\
7624
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, 0 )
7625
7626
/** @brief Export an overloaded 5-ary free function as a Python method, with custom Python name.
7627
* @ingroup ClassMethods
7628
*
7629
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_5() with @a s_doc = `nullptr`.
7630
*
7631
* @param i_cppClass C++ class you're exporting the method for
7632
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7633
* @param t_return Return type of the free function (for disambiguation)
7634
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7635
* @param s_methodName Python method name (string literal), or special method from
7636
* lass::python::methods
7637
*
7638
* @par Example
7639
* ```cpp
7640
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_5(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, "baked_beans") // menu.baked_beans("a", "b")
7641
* ```
7642
*/
7643
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_5( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName )\
7644
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_5(\
7645
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, 0 )
7646
7647
/** @brief Export an overloaded 6-ary free function as a Python method, with custom Python name.
7648
* @ingroup ClassMethods
7649
*
7650
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_6() with @a s_doc = `nullptr`.
7651
*
7652
* @param i_cppClass C++ class you're exporting the method for
7653
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7654
* @param t_return Return type of the free function (for disambiguation)
7655
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7656
* @param s_methodName Python method name (string literal), or special method from
7657
* lass::python::methods
7658
*
7659
* @par Example
7660
* ```cpp
7661
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_6(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, "baked_beans") // menu.baked_beans("a", "b")
7662
* ```
7663
*/
7664
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_6( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName )\
7665
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_6(\
7666
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, 0 )
7667
7668
/** @brief Export an overloaded 7-ary free function as a Python method, with custom Python name.
7669
* @ingroup ClassMethods
7670
*
7671
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_7() with @a s_doc = `nullptr`.
7672
*
7673
* @param i_cppClass C++ class you're exporting the method for
7674
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7675
* @param t_return Return type of the free function (for disambiguation)
7676
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7677
* @param s_methodName Python method name (string literal), or special method from
7678
* lass::python::methods
7679
*
7680
* @par Example
7681
* ```cpp
7682
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_7(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, "baked_beans") // menu.baked_beans("a", "b")
7683
* ```
7684
*/
7685
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_7( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName )\
7686
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_7(\
7687
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, 0 )
7688
7689
/** @brief Export an overloaded 8-ary free function as a Python method, with custom Python name.
7690
* @ingroup ClassMethods
7691
*
7692
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_8() with @a s_doc = `nullptr`.
7693
*
7694
* @param i_cppClass C++ class you're exporting the method for
7695
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7696
* @param t_return Return type of the free function (for disambiguation)
7697
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7698
* @param s_methodName Python method name (string literal), or special method from
7699
* lass::python::methods
7700
*
7701
* @par Example
7702
* ```cpp
7703
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_8(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, "baked_beans") // menu.baked_beans("a", "b")
7704
* ```
7705
*/
7706
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_8( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName )\
7707
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_8(\
7708
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, 0 )
7709
7710
/** @brief Export an overloaded 9-ary free function as a Python method, with custom Python name.
7711
* @ingroup ClassMethods
7712
*
7713
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_9() with @a s_doc = `nullptr`.
7714
*
7715
* @param i_cppClass C++ class you're exporting the method for
7716
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7717
* @param t_return Return type of the free function (for disambiguation)
7718
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7719
* @param s_methodName Python method name (string literal), or special method from
7720
* lass::python::methods
7721
*
7722
* @par Example
7723
* ```cpp
7724
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_9(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, "baked_beans") // menu.baked_beans("a", "b")
7725
* ```
7726
*/
7727
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_9( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName )\
7728
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_9(\
7729
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, 0 )
7730
7731
/** @brief Export an overloaded 10-ary free function as a Python method, with custom Python name.
7732
* @ingroup ClassMethods
7733
*
7734
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_10() with @a s_doc = `nullptr`.
7735
*
7736
* @param i_cppClass C++ class you're exporting the method for
7737
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7738
* @param t_return Return type of the free function (for disambiguation)
7739
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7740
* @param s_methodName Python method name (string literal), or special method from
7741
* lass::python::methods
7742
*
7743
* @par Example
7744
* ```cpp
7745
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_10(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "baked_beans") // menu.baked_beans("a", "b")
7746
* ```
7747
*/
7748
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_10( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName )\
7749
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_10(\
7750
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, 0 )
7751
7752
/** @brief Export an overloaded 11-ary free function as a Python method, with custom Python name.
7753
* @ingroup ClassMethods
7754
*
7755
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_11() with @a s_doc = `nullptr`.
7756
*
7757
* @param i_cppClass C++ class you're exporting the method for
7758
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7759
* @param t_return Return type of the free function (for disambiguation)
7760
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7761
* @param s_methodName Python method name (string literal), or special method from
7762
* lass::python::methods
7763
*
7764
* @par Example
7765
* ```cpp
7766
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_11(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "baked_beans") // menu.baked_beans("a", "b")
7767
* ```
7768
*/
7769
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_11( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName )\
7770
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_11(\
7771
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, 0 )
7772
7773
/** @brief Export an overloaded 12-ary free function as a Python method, with custom Python name.
7774
* @ingroup ClassMethods
7775
*
7776
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_12() with @a s_doc = `nullptr`.
7777
*
7778
* @param i_cppClass C++ class you're exporting the method for
7779
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7780
* @param t_return Return type of the free function (for disambiguation)
7781
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7782
* @param s_methodName Python method name (string literal), or special method from
7783
* lass::python::methods
7784
*
7785
* @par Example
7786
* ```cpp
7787
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_12(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "baked_beans") // menu.baked_beans("a", "b")
7788
* ```
7789
*/
7790
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_12( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName )\
7791
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_12(\
7792
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, 0 )
7793
7794
/** @brief Export an overloaded 13-ary free function as a Python method, with custom Python name.
7795
* @ingroup ClassMethods
7796
*
7797
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_13() with @a s_doc = `nullptr`.
7798
*
7799
* @param i_cppClass C++ class you're exporting the method for
7800
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7801
* @param t_return Return type of the free function (for disambiguation)
7802
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7803
* @param s_methodName Python method name (string literal), or special method from
7804
* lass::python::methods
7805
*
7806
* @par Example
7807
* ```cpp
7808
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_13(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "baked_beans") // menu.baked_beans("a", "b")
7809
* ```
7810
*/
7811
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_13( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName )\
7812
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_13(\
7813
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, 0 )
7814
7815
/** @brief Export an overloaded 14-ary free function as a Python method, with custom Python name.
7816
* @ingroup ClassMethods
7817
*
7818
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_14() with @a s_doc = `nullptr`.
7819
*
7820
* @param i_cppClass C++ class you're exporting the method for
7821
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7822
* @param t_return Return type of the free function (for disambiguation)
7823
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7824
* @param s_methodName Python method name (string literal), or special method from
7825
* lass::python::methods
7826
*
7827
* @par Example
7828
* ```cpp
7829
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_14(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "baked_beans") // menu.baked_beans("a", "b")
7830
* ```
7831
*/
7832
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_14( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName )\
7833
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_14(\
7834
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, 0 )
7835
7836
/** @brief Export an overloaded 15-ary free function as a Python method, with custom Python name.
7837
* @ingroup ClassMethods
7838
*
7839
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_15() with @a s_doc = `nullptr`.
7840
*
7841
* @param i_cppClass C++ class you're exporting the method for
7842
* @param f_cppFreeMethod C++ function to export (may be overloaded), or std::function
7843
* @param t_return Return type of the free function (for disambiguation)
7844
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7845
* @param s_methodName Python method name (string literal), or special method from
7846
* lass::python::methods
7847
*
7848
* @par Example
7849
* ```cpp
7850
* PY_CLASS_FREE_METHOD_QUALIFIED_NAME_15(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "baked_beans") // menu.baked_beans("a", "b")
7851
* ```
7852
*/
7853
#define PY_CLASS_FREE_METHOD_QUALIFIED_NAME_15( i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName )\
7854
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_15(\
7855
i_cppClass, f_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, 0 )
7856
7857
7858
/** @brief Export an overloaded free function as a Python method, with docstring.
7859
* @ingroup ClassMethods
7860
*
7861
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC() with
7862
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7863
*
7864
* @param i_cppClass C++ class you're exporting the method for
7865
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7866
* may be overloaded)
7867
* @param t_return Return type of the free function (for disambiguation)
7868
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation), first is `self`
7869
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7870
*
7871
* @par Example
7872
* ```cpp
7873
* using TArgs = lass::meta::TypeTuple<TMenuPtr, const std::string&, const std::string&>;
7874
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC(Menu, bakedBeans, std::vector<std::string>, TArgs, "Add baked beans") // menu.bakedBeans("a", "b")
7875
* ```
7876
*/
7877
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC( i_cppClass, i_cppFreeMethod, t_return, t_params, s_doc )\
7878
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC(\
7879
i_cppClass, i_cppFreeMethod, t_return, t_params, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
7880
7881
/** @brief Export an overloaded 0-ary free function as a Python method, with docstring.
7882
* @ingroup ClassMethods
7883
*
7884
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_0() with
7885
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7886
*
7887
* @param i_cppClass C++ class you're exporting the method for
7888
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7889
* may be overloaded)
7890
* @param t_return Return type of the free function (for disambiguation)
7891
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7892
*
7893
* @deprecated Doesn't work
7894
*/
7895
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_0( i_cppClass, i_cppFreeMethod, t_return, s_doc )\
7896
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_0(\
7897
i_cppClass, i_cppFreeMethod, t_return, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
7898
7899
/** @brief Export an overloaded 1-ary free function as a Python method, with docstring.
7900
* @ingroup ClassMethods
7901
*
7902
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_1() with
7903
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7904
*
7905
* @param i_cppClass C++ class you're exporting the method for
7906
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7907
* may be overloaded)
7908
* @param t_return Return type of the free function (for disambiguation)
7909
* @param t_P1 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7910
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7911
*
7912
* @par Example
7913
* ```cpp
7914
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_1(Menu, bakedBeans, std::vector<std::string>, T1, "Add baked beans") // menu.bakedBeans("a", "b")
7915
* ```
7916
*/
7917
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_1( i_cppClass, i_cppFreeMethod, t_return, t_P1, s_doc )\
7918
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_1(\
7919
i_cppClass, i_cppFreeMethod, t_return, t_P1, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
7920
7921
/** @brief Export an overloaded 2-ary free function as a Python method, with docstring.
7922
* @ingroup ClassMethods
7923
*
7924
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_2() with
7925
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7926
*
7927
* @param i_cppClass C++ class you're exporting the method for
7928
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7929
* may be overloaded)
7930
* @param t_return Return type of the free function (for disambiguation)
7931
* @param t_P1, t_P2 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7932
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7933
*
7934
* @par Example
7935
* ```cpp
7936
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_2(Menu, bakedBeans, std::vector<std::string>, T1, T2, "Add baked beans") // menu.bakedBeans("a", "b")
7937
* ```
7938
*/
7939
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_2( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, s_doc )\
7940
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_2(\
7941
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
7942
7943
/** @brief Export an overloaded 3-ary free function as a Python method, with docstring.
7944
* @ingroup ClassMethods
7945
*
7946
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_3() with
7947
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7948
*
7949
* @param i_cppClass C++ class you're exporting the method for
7950
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7951
* may be overloaded)
7952
* @param t_return Return type of the free function (for disambiguation)
7953
* @param t_P1, t_P2, t_P3 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7954
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7955
*
7956
* @par Example
7957
* ```cpp
7958
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_3(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, "Add baked beans") // menu.bakedBeans("a", "b")
7959
* ```
7960
*/
7961
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_3( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, s_doc )\
7962
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_3(\
7963
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
7964
7965
/** @brief Export an overloaded 4-ary free function as a Python method, with docstring.
7966
* @ingroup ClassMethods
7967
*
7968
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_4() with
7969
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7970
*
7971
* @param i_cppClass C++ class you're exporting the method for
7972
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7973
* may be overloaded)
7974
* @param t_return Return type of the free function (for disambiguation)
7975
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7976
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7977
*
7978
* @par Example
7979
* ```cpp
7980
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_4(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, "Add baked beans") // menu.bakedBeans("a", "b")
7981
* ```
7982
*/
7983
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_4( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_doc )\
7984
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_4(\
7985
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
7986
7987
/** @brief Export an overloaded 5-ary free function as a Python method, with docstring.
7988
* @ingroup ClassMethods
7989
*
7990
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_5() with
7991
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
7992
*
7993
* @param i_cppClass C++ class you're exporting the method for
7994
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
7995
* may be overloaded)
7996
* @param t_return Return type of the free function (for disambiguation)
7997
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
7998
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
7999
*
8000
* @par Example
8001
* ```cpp
8002
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_5(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, "Add baked beans") // menu.bakedBeans("a", "b")
8003
* ```
8004
*/
8005
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_5( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_doc )\
8006
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_5(\
8007
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8008
8009
/** @brief Export an overloaded 6-ary free function as a Python method, with docstring.
8010
* @ingroup ClassMethods
8011
*
8012
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_6() with
8013
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8014
*
8015
* @param i_cppClass C++ class you're exporting the method for
8016
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8017
* may be overloaded)
8018
* @param t_return Return type of the free function (for disambiguation)
8019
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8020
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8021
*
8022
* @par Example
8023
* ```cpp
8024
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_6(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, "Add baked beans") // menu.bakedBeans("a", "b")
8025
* ```
8026
*/
8027
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_6( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_doc )\
8028
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_6(\
8029
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8030
8031
/** @brief Export an overloaded 7-ary free function as a Python method, with docstring.
8032
* @ingroup ClassMethods
8033
*
8034
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_7() with
8035
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8036
*
8037
* @param i_cppClass C++ class you're exporting the method for
8038
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8039
* may be overloaded)
8040
* @param t_return Return type of the free function (for disambiguation)
8041
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8042
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8043
*
8044
* @par Example
8045
* ```cpp
8046
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_7(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, "Add baked beans") // menu.bakedBeans("a", "b")
8047
* ```
8048
*/
8049
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_7( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_doc )\
8050
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_7(\
8051
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8052
8053
/** @brief Export an overloaded 8-ary free function as a Python method, with docstring.
8054
* @ingroup ClassMethods
8055
*
8056
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_8() with
8057
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8058
*
8059
* @param i_cppClass C++ class you're exporting the method for
8060
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8061
* may be overloaded)
8062
* @param t_return Return type of the free function (for disambiguation)
8063
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8064
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8065
*
8066
* @par Example
8067
* ```cpp
8068
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_8(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, "Add baked beans") // menu.bakedBeans("a", "b")
8069
* ```
8070
*/
8071
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_8( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_doc )\
8072
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_8(\
8073
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8074
8075
/** @brief Export an overloaded 9-ary free function as a Python method, with docstring.
8076
* @ingroup ClassMethods
8077
*
8078
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_9() with
8079
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8080
*
8081
* @param i_cppClass C++ class you're exporting the method for
8082
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8083
* may be overloaded)
8084
* @param t_return Return type of the free function (for disambiguation)
8085
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8086
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8087
*
8088
* @par Example
8089
* ```cpp
8090
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_9(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, "Add baked beans") // menu.bakedBeans("a", "b")
8091
* ```
8092
*/
8093
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_9( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_doc )\
8094
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_9(\
8095
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8096
8097
/** @brief Export an overloaded 10-ary free function as a Python method, with docstring.
8098
* @ingroup ClassMethods
8099
*
8100
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_10() with
8101
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8102
*
8103
* @param i_cppClass C++ class you're exporting the method for
8104
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8105
* may be overloaded)
8106
* @param t_return Return type of the free function (for disambiguation)
8107
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8108
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8109
*
8110
* @par Example
8111
* ```cpp
8112
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_10(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, "Add baked beans") // menu.bakedBeans("a", "b")
8113
* ```
8114
*/
8115
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_10( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_doc )\
8116
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_10(\
8117
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8118
8119
/** @brief Export an overloaded 11-ary free function as a Python method, with docstring.
8120
* @ingroup ClassMethods
8121
*
8122
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_11() with
8123
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8124
*
8125
* @param i_cppClass C++ class you're exporting the method for
8126
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8127
* may be overloaded)
8128
* @param t_return Return type of the free function (for disambiguation)
8129
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8130
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8131
*
8132
* @par Example
8133
* ```cpp
8134
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_11(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, "Add baked beans") // menu.bakedBeans("a", "b")
8135
* ```
8136
*/
8137
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_11( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_doc )\
8138
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_11(\
8139
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8140
8141
/** @brief Export an overloaded 12-ary free function as a Python method, with docstring.
8142
* @ingroup ClassMethods
8143
*
8144
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_12() with
8145
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8146
*
8147
* @param i_cppClass C++ class you're exporting the method for
8148
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8149
* may be overloaded)
8150
* @param t_return Return type of the free function (for disambiguation)
8151
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8152
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8153
*
8154
* @par Example
8155
* ```cpp
8156
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_12(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, "Add baked beans") // menu.bakedBeans("a", "b")
8157
* ```
8158
*/
8159
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_12( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_doc )\
8160
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_12(\
8161
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8162
8163
/** @brief Export an overloaded 13-ary free function as a Python method, with docstring.
8164
* @ingroup ClassMethods
8165
*
8166
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_13() with
8167
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8168
*
8169
* @param i_cppClass C++ class you're exporting the method for
8170
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8171
* may be overloaded)
8172
* @param t_return Return type of the free function (for disambiguation)
8173
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8174
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8175
*
8176
* @par Example
8177
* ```cpp
8178
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_13(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, "Add baked beans") // menu.bakedBeans("a", "b")
8179
* ```
8180
*/
8181
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_13( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_doc )\
8182
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_13(\
8183
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8184
8185
/** @brief Export an overloaded 14-ary free function as a Python method, with docstring.
8186
* @ingroup ClassMethods
8187
*
8188
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_14() with
8189
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8190
*
8191
* @param i_cppClass C++ class you're exporting the method for
8192
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8193
* may be overloaded)
8194
* @param t_return Return type of the free function (for disambiguation)
8195
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8196
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8197
*
8198
* @par Example
8199
* ```cpp
8200
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_14(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, "Add baked beans") // menu.bakedBeans("a", "b")
8201
* ```
8202
*/
8203
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_14( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_doc )\
8204
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_14(\
8205
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8206
8207
/** @brief Export an overloaded 15-ary free function as a Python method, with docstring.
8208
* @ingroup ClassMethods
8209
*
8210
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_15() with
8211
* @a s_methodName = `LASS_STRINGIFY(i_cppFreeMethod)`.
8212
*
8213
* @param i_cppClass C++ class you're exporting the method for
8214
* @param i_cppFreeMethod C++ function to export (must be valid identifier, used as Python name,
8215
* may be overloaded)
8216
* @param t_return Return type of the free function (for disambiguation)
8217
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8218
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8219
*
8220
* @par Example
8221
* ```cpp
8222
* PY_CLASS_FREE_METHOD_QUALIFIED_DOC_15(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, "Add baked beans") // menu.bakedBeans("a", "b")
8223
* ```
8224
*/
8225
#define PY_CLASS_FREE_METHOD_QUALIFIED_DOC_15( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_doc )\
8226
PY_CLASS_FREE_METHOD_QUALIFIED_NAME_DOC_15(\
8227
i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, LASS_STRINGIFY(i_cppFreeMethod), s_doc )
8228
8229
8230
/** @brief Export an overloaded free function as a Python method.
8231
* @ingroup ClassMethods
8232
*
8233
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC() with @a s_doc = `nullptr`.
8234
*
8235
* @param i_cppClass C++ class you're exporting the method for
8236
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier, used as
8237
* Python method name, may be overloaded)
8238
* @param t_return Return type of the free function (for disambiguation)
8239
* @param t_params Parameter types as lass::meta::TypeTuple (for disambiguation), first is `self`
8240
*
8241
* @par Example
8242
* ```cpp
8243
* using TArgs = lass::meta::TypeTuple<TMenuPtr, const std::string&, const std::string&>;
8244
* PY_CLASS_FREE_METHOD_QUALIFIED(Menu, bakedBeans, std::vector<std::string>, TArgs) // menu.bakedBeans("a", "b")
8245
* ```
8246
*/
8247
#define PY_CLASS_FREE_METHOD_QUALIFIED( i_cppClass, i_cppFreeMethod, t_return, t_params )\
8248
PY_CLASS_FREE_METHOD_QUALIFIED_DOC( i_cppClass, i_cppFreeMethod, t_return, t_params, 0 )
8249
8250
/** @brief Export an overloaded 0-ary free function as a Python method.
8251
* @ingroup ClassMethods
8252
*
8253
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_0() with @a s_doc = `nullptr`.
8254
*
8255
* @param i_cppClass C++ class you're exporting the method for
8256
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8257
* 0 parameters, used as Python method name, may be overloaded)
8258
* @param t_return Return type of the free function (for disambiguation)
8259
*
8260
* @deprecated Doesn't work
8261
*/
8262
#define PY_CLASS_FREE_METHOD_QUALIFIED_0( i_cppClass, i_cppFreeMethod, t_return )\
8263
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_0( i_cppClass, i_cppFreeMethod, t_return, 0 )
8264
8265
/** @brief Export an overloaded 1-ary free function as a Python method.
8266
* @ingroup ClassMethods
8267
*
8268
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_1() with @a s_doc = `nullptr`.
8269
*
8270
* @param i_cppClass C++ class you're exporting the method for
8271
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8272
* 1 parameters, used as Python method name, may be overloaded)
8273
* @param t_return Return type of the free function (for disambiguation)
8274
* @param t_P1 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8275
*
8276
* @par Example
8277
* ```cpp
8278
* PY_CLASS_FREE_METHOD_QUALIFIED_1(Menu, bakedBeans, std::vector<std::string>, T1) // menu.bakedBeans("a", "b")
8279
* ```
8280
*
8281
*/
8282
#define PY_CLASS_FREE_METHOD_QUALIFIED_1( i_cppClass, i_cppFreeMethod, t_return, t_P1 )\
8283
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_1( i_cppClass, i_cppFreeMethod, t_return, t_P1, 0 )
8284
8285
/** @brief Export an overloaded 2-ary free function as a Python method.
8286
* @ingroup ClassMethods
8287
*
8288
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_2() with @a s_doc = `nullptr`.
8289
*
8290
* @param i_cppClass C++ class you're exporting the method for
8291
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8292
* 2 parameters, used as Python method name, may be overloaded)
8293
* @param t_return Return type of the free function (for disambiguation)
8294
* @param t_P1, t_P2 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8295
*
8296
* @par Example
8297
* ```cpp
8298
* PY_CLASS_FREE_METHOD_QUALIFIED_2(Menu, bakedBeans, std::vector<std::string>, T1, T2) // menu.bakedBeans("a", "b")
8299
* ```
8300
*
8301
*/
8302
#define PY_CLASS_FREE_METHOD_QUALIFIED_2( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2 )\
8303
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_2( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, 0 )
8304
8305
/** @brief Export an overloaded 3-ary free function as a Python method.
8306
* @ingroup ClassMethods
8307
*
8308
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_3() with @a s_doc = `nullptr`.
8309
*
8310
* @param i_cppClass C++ class you're exporting the method for
8311
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8312
* 3 parameters, used as Python method name, may be overloaded)
8313
* @param t_return Return type of the free function (for disambiguation)
8314
* @param t_P1, t_P2, t_P3 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8315
*
8316
* @par Example
8317
* ```cpp
8318
* PY_CLASS_FREE_METHOD_QUALIFIED_3(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3) // menu.bakedBeans("a", "b")
8319
* ```
8320
*
8321
*/
8322
#define PY_CLASS_FREE_METHOD_QUALIFIED_3( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3 )\
8323
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_3( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, 0 )
8324
8325
/** @brief Export an overloaded 4-ary free function as a Python method.
8326
* @ingroup ClassMethods
8327
*
8328
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_4() with @a s_doc = `nullptr`.
8329
*
8330
* @param i_cppClass C++ class you're exporting the method for
8331
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8332
* 4 parameters, used as Python method name, may be overloaded)
8333
* @param t_return Return type of the free function (for disambiguation)
8334
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8335
*
8336
* @par Example
8337
* ```cpp
8338
* PY_CLASS_FREE_METHOD_QUALIFIED_4(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4) // menu.bakedBeans("a", "b")
8339
* ```
8340
*
8341
*/
8342
#define PY_CLASS_FREE_METHOD_QUALIFIED_4( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4 )\
8343
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_4( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, 0 )
8344
8345
/** @brief Export an overloaded 5-ary free function as a Python method.
8346
* @ingroup ClassMethods
8347
*
8348
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_5() with @a s_doc = `nullptr`.
8349
*
8350
* @param i_cppClass C++ class you're exporting the method for
8351
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8352
* 5 parameters, used as Python method name, may be overloaded)
8353
* @param t_return Return type of the free function (for disambiguation)
8354
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8355
*
8356
* @par Example
8357
* ```cpp
8358
* PY_CLASS_FREE_METHOD_QUALIFIED_5(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5) // menu.bakedBeans("a", "b")
8359
* ```
8360
*
8361
*/
8362
#define PY_CLASS_FREE_METHOD_QUALIFIED_5( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5 )\
8363
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_5( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, 0 )
8364
8365
/** @brief Export an overloaded 6-ary free function as a Python method.
8366
* @ingroup ClassMethods
8367
*
8368
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_6() with @a s_doc = `nullptr`.
8369
*
8370
* @param i_cppClass C++ class you're exporting the method for
8371
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8372
* 6 parameters, used as Python method name, may be overloaded)
8373
* @param t_return Return type of the free function (for disambiguation)
8374
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8375
*
8376
* @par Example
8377
* ```cpp
8378
* PY_CLASS_FREE_METHOD_QUALIFIED_6(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6) // menu.bakedBeans("a", "b")
8379
* ```
8380
*
8381
*/
8382
#define PY_CLASS_FREE_METHOD_QUALIFIED_6( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 )\
8383
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_6( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, 0 )
8384
8385
/** @brief Export an overloaded 7-ary free function as a Python method.
8386
* @ingroup ClassMethods
8387
*
8388
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_7() with @a s_doc = `nullptr`.
8389
*
8390
* @param i_cppClass C++ class you're exporting the method for
8391
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8392
* 7 parameters, used as Python method name, may be overloaded)
8393
* @param t_return Return type of the free function (for disambiguation)
8394
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8395
*
8396
* @par Example
8397
* ```cpp
8398
* PY_CLASS_FREE_METHOD_QUALIFIED_7(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7) // menu.bakedBeans("a", "b")
8399
* ```
8400
*
8401
*/
8402
#define PY_CLASS_FREE_METHOD_QUALIFIED_7( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 )\
8403
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_7( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, 0 )
8404
8405
/** @brief Export an overloaded 8-ary free function as a Python method.
8406
* @ingroup ClassMethods
8407
*
8408
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_8() with @a s_doc = `nullptr`.
8409
*
8410
* @param i_cppClass C++ class you're exporting the method for
8411
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8412
* 8 parameters, used as Python method name, may be overloaded)
8413
* @param t_return Return type of the free function (for disambiguation)
8414
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8415
*
8416
* @par Example
8417
* ```cpp
8418
* PY_CLASS_FREE_METHOD_QUALIFIED_8(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8) // menu.bakedBeans("a", "b")
8419
* ```
8420
*
8421
*/
8422
#define PY_CLASS_FREE_METHOD_QUALIFIED_8( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 )\
8423
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_8( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, 0 )
8424
8425
/** @brief Export an overloaded 9-ary free function as a Python method.
8426
* @ingroup ClassMethods
8427
*
8428
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_9() with @a s_doc = `nullptr`.
8429
*
8430
* @param i_cppClass C++ class you're exporting the method for
8431
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8432
* 9 parameters, used as Python method name, may be overloaded)
8433
* @param t_return Return type of the free function (for disambiguation)
8434
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8435
*
8436
* @par Example
8437
* ```cpp
8438
* PY_CLASS_FREE_METHOD_QUALIFIED_9(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9) // menu.bakedBeans("a", "b")
8439
* ```
8440
*
8441
*/
8442
#define PY_CLASS_FREE_METHOD_QUALIFIED_9( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 )\
8443
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_9( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, 0 )
8444
8445
/** @brief Export an overloaded 10-ary free function as a Python method.
8446
* @ingroup ClassMethods
8447
*
8448
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_10() with @a s_doc = `nullptr`.
8449
*
8450
* @param i_cppClass C++ class you're exporting the method for
8451
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8452
* 10 parameters, used as Python method name, may be overloaded)
8453
* @param t_return Return type of the free function (for disambiguation)
8454
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8455
*
8456
* @par Example
8457
* ```cpp
8458
* PY_CLASS_FREE_METHOD_QUALIFIED_10(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) // menu.bakedBeans("a", "b")
8459
* ```
8460
*
8461
*/
8462
#define PY_CLASS_FREE_METHOD_QUALIFIED_10( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 )\
8463
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_10( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, 0 )
8464
8465
/** @brief Export an overloaded 11-ary free function as a Python method.
8466
* @ingroup ClassMethods
8467
*
8468
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_11() with @a s_doc = `nullptr`.
8469
*
8470
* @param i_cppClass C++ class you're exporting the method for
8471
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8472
* 11 parameters, used as Python method name, may be overloaded)
8473
* @param t_return Return type of the free function (for disambiguation)
8474
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8475
*
8476
* @par Example
8477
* ```cpp
8478
* PY_CLASS_FREE_METHOD_QUALIFIED_11(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) // menu.bakedBeans("a", "b")
8479
* ```
8480
*
8481
*/
8482
#define PY_CLASS_FREE_METHOD_QUALIFIED_11( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 )\
8483
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_11( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, 0 )
8484
8485
/** @brief Export an overloaded 12-ary free function as a Python method.
8486
* @ingroup ClassMethods
8487
*
8488
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_12() with @a s_doc = `nullptr`.
8489
*
8490
* @param i_cppClass C++ class you're exporting the method for
8491
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8492
* 12 parameters, used as Python method name, may be overloaded)
8493
* @param t_return Return type of the free function (for disambiguation)
8494
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8495
*
8496
* @par Example
8497
* ```cpp
8498
* PY_CLASS_FREE_METHOD_QUALIFIED_12(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) // menu.bakedBeans("a", "b")
8499
* ```
8500
*
8501
*/
8502
#define PY_CLASS_FREE_METHOD_QUALIFIED_12( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 )\
8503
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_12( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, 0 )
8504
8505
/** @brief Export an overloaded 13-ary free function as a Python method.
8506
* @ingroup ClassMethods
8507
*
8508
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_13() with @a s_doc = `nullptr`.
8509
*
8510
* @param i_cppClass C++ class you're exporting the method for
8511
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8512
* 13 parameters, used as Python method name, may be overloaded)
8513
* @param t_return Return type of the free function (for disambiguation)
8514
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8515
*
8516
* @par Example
8517
* ```cpp
8518
* PY_CLASS_FREE_METHOD_QUALIFIED_13(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) // menu.bakedBeans("a", "b")
8519
* ```
8520
*
8521
*/
8522
#define PY_CLASS_FREE_METHOD_QUALIFIED_13( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 )\
8523
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_13( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, 0 )
8524
8525
/** @brief Export an overloaded 14-ary free function as a Python method.
8526
* @ingroup ClassMethods
8527
*
8528
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_14() with @a s_doc = `nullptr`.
8529
*
8530
* @param i_cppClass C++ class you're exporting the method for
8531
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8532
* 14 parameters, used as Python method name, may be overloaded)
8533
* @param t_return Return type of the free function (for disambiguation)
8534
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8535
*
8536
* @par Example
8537
* ```cpp
8538
* PY_CLASS_FREE_METHOD_QUALIFIED_14(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) // menu.bakedBeans("a", "b")
8539
* ```
8540
*
8541
*/
8542
#define PY_CLASS_FREE_METHOD_QUALIFIED_14( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 )\
8543
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_14( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, 0 )
8544
8545
/** @brief Export an overloaded 15-ary free function as a Python method.
8546
* @ingroup ClassMethods
8547
*
8548
* Wraps PY_CLASS_FREE_METHOD_QUALIFIED_DOC_15() with @a s_doc = `nullptr`.
8549
*
8550
* @param i_cppClass C++ class you're exporting the method for
8551
* @param i_cppFreeMethod C++ function identifier to export (must be valid identifier,
8552
* 15 parameters, used as Python method name, may be overloaded)
8553
* @param t_return Return type of the free function (for disambiguation)
8554
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the free function (for disambiguation), @a t_P1 is `self`
8555
*
8556
* @par Example
8557
* ```cpp
8558
* PY_CLASS_FREE_METHOD_QUALIFIED_15(Menu, bakedBeans, std::vector<std::string>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) // menu.bakedBeans("a", "b")
8559
* ```
8560
*
8561
*/
8562
#define PY_CLASS_FREE_METHOD_QUALIFIED_15( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 )\
8563
PY_CLASS_FREE_METHOD_QUALIFIED_DOC_15( i_cppClass, i_cppFreeMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, 0 )
8564
8565
8566
/** @} */
8567
8568
// --- "casting" methods ------------------------------------------------------------------------------
8569
8570
/** @defgroup ClassMethodsCast Casting Method Export Macros (Deprecated)
8571
* @ingroup ClassDefinition
8572
*
8573
* @deprecated These casting method macros are deprecated. Use the regular or free method export macros instead.
8574
*
8575
* Export C++ methods to Python with custom casting policies for type conversion. These macros
8576
* allow on-the-fly type conversion using casting operators like PointerCast and CopyCast.
8577
* However, these macros are deprecated and should be avoided in new code.
8578
*
8579
*/
8580
8581
/** @ingroup ClassMethodsCast
8582
* @brief Export a C++ method to Python with custom casting policy and full parameter control.
8583
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8584
*
8585
* This macro exports a C++ method to Python with a custom casting policy for type conversion.
8586
* It allows on-the-fly conversion using casting operators. However, this macro is deprecated
8587
* and should not be used in new code.
8588
*
8589
* Supported casting operators:
8590
* - `PointerCast<_type>`: Interprets ownership rules as if a pointer is passed
8591
* - `CopyCast<_type>`: Interprets ownership rules as if a copy of the object is passed
8592
* - Custom casting operators can be defined following the PointerCast pattern
8593
*
8594
* @param t_cppClass C++ class you're exporting a method of
8595
* @param i_cppMethod Name of the method in C++
8596
* @param t_return Return type of the method
8597
* @param t_params lass::meta::TypeTuple of the parameter types
8598
* @param s_methodName Python method name (string literal), or special method from
8599
* lass::python::methods
8600
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
8601
* @param i_dispatcher Unique identifier for the generated dispatcher function
8602
* @param i_typename Type name for casting operations
8603
*
8604
* ```cpp
8605
* // foo.h
8606
* class Foo
8607
* {
8608
* PY_HEADER(python::PyObjectPlus)
8609
* public:
8610
* void bar(int a);
8611
* void bar(const std::string& b) const;
8612
* };
8613
*
8614
* // foo.cpp - DEPRECATED USAGE
8615
* PY_DECLARE_CLASS(Foo)
8616
* PY_CLASS_METHOD_CAST_EX_0(Foo, bar, void, CopyCast<const std::string&>, "bar", nullptr, foo_bar_a)
8617
* ```
8618
*/
8619
8620
8621
/** @ingroup ClassMethodsCast
8622
* @brief Export a C++ method with casting policy for 0-parameter methods.
8623
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8624
*/
8625
#define PY_CLASS_METHOD_CAST_EX_0(t_cppClass, i_cppMethod, t_return, s_methodName, s_doc, i_dispatcher, i_typename) \
8626
::lass::python::OwnerCaster<t_return>::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8627
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis\
8628
)\
8629
{\
8630
return iThis.i_cppMethod () ; \
8631
}\
8632
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8633
8634
8635
8636
/** @ingroup ClassMethodsCast
8637
* @brief Export a C++ method with casting policy for 1-parameter methods.
8638
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8639
*/
8640
#define PY_CLASS_METHOD_CAST_EX_1( t_cppClass, i_cppMethod, t_return, t_P1, s_methodName, s_doc, i_dispatcher, i_typename )\
8641
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8642
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8643
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1 \
8644
)\
8645
{\
8646
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1) );\
8647
}\
8648
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8649
8650
/** @ingroup ClassMethodsCast
8651
* @brief Export a C++ method with casting policy for 2-parameter methods.
8652
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8653
*/
8654
#define PY_CLASS_METHOD_CAST_EX_2( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, s_doc, i_dispatcher, i_typename )\
8655
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8656
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8657
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2 \
8658
)\
8659
{\
8660
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2) );\
8661
}\
8662
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8663
8664
/** @ingroup ClassMethodsCast
8665
* @brief Export a C++ method with casting policy for 3-parameter methods.
8666
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8667
*/
8668
#define PY_CLASS_METHOD_CAST_EX_3( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc, i_dispatcher, i_typename )\
8669
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8670
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8671
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3 \
8672
)\
8673
{\
8674
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3) );\
8675
}\
8676
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8677
8678
/** @ingroup ClassMethodsCast
8679
* @brief Export a C++ method with casting policy for 4-parameter methods.
8680
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8681
*/
8682
#define PY_CLASS_METHOD_CAST_EX_4( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc, i_dispatcher, i_typename )\
8683
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8684
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8685
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4 \
8686
)\
8687
{\
8688
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4) );\
8689
}\
8690
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8691
8692
/** @ingroup ClassMethodsCast
8693
* @brief Export a C++ method with casting policy for 5-parameter methods.
8694
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8695
*/
8696
#define PY_CLASS_METHOD_CAST_EX_5( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc, i_dispatcher, i_typename )\
8697
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8698
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8699
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5 \
8700
)\
8701
{\
8702
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5) );\
8703
}\
8704
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8705
8706
/** @ingroup ClassMethodsCast
8707
* @brief Export a C++ method with casting policy for 6-parameter methods.
8708
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8709
*/
8710
#define PY_CLASS_METHOD_CAST_EX_6( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc, i_dispatcher, i_typename )\
8711
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8712
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8713
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6 \
8714
)\
8715
{\
8716
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6) );\
8717
}\
8718
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8719
8720
/** @ingroup ClassMethodsCast
8721
* @brief Export a C++ method with casting policy for 7-parameter methods.
8722
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8723
*/
8724
#define PY_CLASS_METHOD_CAST_EX_7( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc, i_dispatcher, i_typename )\
8725
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8726
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8727
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7 \
8728
)\
8729
{\
8730
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7) );\
8731
}\
8732
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8733
8734
/** @ingroup ClassMethodsCast
8735
* @brief Export a C++ method with casting policy for 8-parameter methods.
8736
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8737
*/
8738
#define PY_CLASS_METHOD_CAST_EX_8( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc, i_dispatcher, i_typename )\
8739
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8740
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8741
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8 \
8742
)\
8743
{\
8744
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8) );\
8745
}\
8746
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8747
8748
/** @ingroup ClassMethodsCast
8749
* @brief Export a C++ method with casting policy for 9-parameter methods.
8750
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8751
*/
8752
#define PY_CLASS_METHOD_CAST_EX_9( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc, i_dispatcher, i_typename )\
8753
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8754
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8755
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9 \
8756
)\
8757
{\
8758
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9) );\
8759
}\
8760
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8761
8762
/** @ingroup ClassMethodsCast
8763
* @brief Export a C++ method with casting policy for 10-parameter methods.
8764
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8765
*/
8766
#define PY_CLASS_METHOD_CAST_EX_10( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc, i_dispatcher, i_typename )\
8767
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8768
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8769
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10 \
8770
)\
8771
{\
8772
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10) );\
8773
}\
8774
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8775
8776
/** @ingroup ClassMethodsCast
8777
* @brief Export a C++ method with casting policy for 11-parameter methods.
8778
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8779
*/
8780
#define PY_CLASS_METHOD_CAST_EX_11( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc, i_dispatcher, i_typename )\
8781
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8782
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8783
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11 \
8784
)\
8785
{\
8786
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11) );\
8787
}\
8788
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8789
8790
/** @ingroup ClassMethodsCast
8791
* @brief Export a C++ method with casting policy for 12-parameter methods.
8792
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8793
*/
8794
#define PY_CLASS_METHOD_CAST_EX_12( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc, i_dispatcher, i_typename )\
8795
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8796
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8797
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12 \
8798
)\
8799
{\
8800
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12) );\
8801
}\
8802
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8803
8804
/** @ingroup ClassMethodsCast
8805
* @brief Export a C++ method with casting policy for 13-parameter methods.
8806
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8807
*/
8808
#define PY_CLASS_METHOD_CAST_EX_13( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc, i_dispatcher, i_typename )\
8809
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8810
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8811
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12, ::lass::python::OwnerCaster< t_P13 >::TCaster::TTarget iArg13 \
8812
)\
8813
{\
8814
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12), ::lass::python::OwnerCaster< t_P13 >::TCaster::cast(iArg13) );\
8815
}\
8816
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8817
8818
/** @ingroup ClassMethodsCast
8819
* @brief Export a C++ method with casting policy for 14-parameter methods.
8820
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8821
*/
8822
#define PY_CLASS_METHOD_CAST_EX_14( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc, i_dispatcher, i_typename )\
8823
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8824
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8825
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12, ::lass::python::OwnerCaster< t_P13 >::TCaster::TTarget iArg13, ::lass::python::OwnerCaster< t_P14 >::TCaster::TTarget iArg14 \
8826
)\
8827
{\
8828
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12), ::lass::python::OwnerCaster< t_P13 >::TCaster::cast(iArg13), ::lass::python::OwnerCaster< t_P14 >::TCaster::cast(iArg14) );\
8829
}\
8830
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8831
8832
/** @ingroup ClassMethodsCast
8833
* @brief Export a C++ method with casting policy for 15-parameter methods.
8834
* @deprecated Use PY_CLASS_METHOD_EX() or PY_CLASS_FREE_METHOD_EX() instead.
8835
*/
8836
#define PY_CLASS_METHOD_CAST_EX_15( t_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc, i_dispatcher, i_typename )\
8837
::lass::python::OwnerCaster< t_return >::TCaster::TTarget LASS_CONCATENATE(i_dispatcher, _caster) ( \
8838
::lass::python::impl::ShadowTraits< t_cppClass >::TCppClass& iThis,\
8839
::lass::python::OwnerCaster< t_P1 >::TCaster::TTarget iArg1, ::lass::python::OwnerCaster< t_P2 >::TCaster::TTarget iArg2, ::lass::python::OwnerCaster< t_P3 >::TCaster::TTarget iArg3, ::lass::python::OwnerCaster< t_P4 >::TCaster::TTarget iArg4, ::lass::python::OwnerCaster< t_P5 >::TCaster::TTarget iArg5, ::lass::python::OwnerCaster< t_P6 >::TCaster::TTarget iArg6, ::lass::python::OwnerCaster< t_P7 >::TCaster::TTarget iArg7, ::lass::python::OwnerCaster< t_P8 >::TCaster::TTarget iArg8, ::lass::python::OwnerCaster< t_P9 >::TCaster::TTarget iArg9, ::lass::python::OwnerCaster< t_P10 >::TCaster::TTarget iArg10, ::lass::python::OwnerCaster< t_P11 >::TCaster::TTarget iArg11, ::lass::python::OwnerCaster< t_P12 >::TCaster::TTarget iArg12, ::lass::python::OwnerCaster< t_P13 >::TCaster::TTarget iArg13, ::lass::python::OwnerCaster< t_P14 >::TCaster::TTarget iArg14, ::lass::python::OwnerCaster< t_P15 >::TCaster::TTarget iArg15 \
8840
)\
8841
{\
8842
return iThis.i_cppMethod ( ::lass::python::OwnerCaster< t_P1 >::TCaster::cast(iArg1), ::lass::python::OwnerCaster< t_P2 >::TCaster::cast(iArg2), ::lass::python::OwnerCaster< t_P3 >::TCaster::cast(iArg3), ::lass::python::OwnerCaster< t_P4 >::TCaster::cast(iArg4), ::lass::python::OwnerCaster< t_P5 >::TCaster::cast(iArg5), ::lass::python::OwnerCaster< t_P6 >::TCaster::cast(iArg6), ::lass::python::OwnerCaster< t_P7 >::TCaster::cast(iArg7), ::lass::python::OwnerCaster< t_P8 >::TCaster::cast(iArg8), ::lass::python::OwnerCaster< t_P9 >::TCaster::cast(iArg9), ::lass::python::OwnerCaster< t_P10 >::TCaster::cast(iArg10), ::lass::python::OwnerCaster< t_P11 >::TCaster::cast(iArg11), ::lass::python::OwnerCaster< t_P12 >::TCaster::cast(iArg12), ::lass::python::OwnerCaster< t_P13 >::TCaster::cast(iArg13), ::lass::python::OwnerCaster< t_P14 >::TCaster::cast(iArg14), ::lass::python::OwnerCaster< t_P15 >::TCaster::cast(iArg15) );\
8843
}\
8844
PY_CLASS_FREE_METHOD_EX( t_cppClass, LASS_CONCATENATE(i_dispatcher, _caster), s_methodName, s_doc, i_dispatcher );
8845
8846
8847
/** @ingroup ClassMethodsCast
8848
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_0().
8849
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8850
*/
8851
#define PY_CLASS_METHOD_CAST_NAME_DOC_0( i_cppClass, i_cppMethod, t_return, s_methodName, s_doc )\
8852
PY_CLASS_METHOD_CAST_EX_0(\
8853
i_cppClass, i_cppMethod, t_return, s_methodName, s_doc,\
8854
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8855
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8856
8857
/** @ingroup ClassMethodsCast
8858
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_1().
8859
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8860
*/
8861
#define PY_CLASS_METHOD_CAST_NAME_DOC_1( i_cppClass, i_cppMethod, t_return, t_P1, s_methodName, s_doc )\
8862
PY_CLASS_METHOD_CAST_EX_1(\
8863
i_cppClass, i_cppMethod, t_return, t_P1, s_methodName, s_doc,\
8864
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8865
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8866
8867
/** @ingroup ClassMethodsCast
8868
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_2().
8869
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8870
*/
8871
#define PY_CLASS_METHOD_CAST_NAME_DOC_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, s_doc )\
8872
PY_CLASS_METHOD_CAST_EX_2(\
8873
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, s_doc,\
8874
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8875
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8876
8877
/** @ingroup ClassMethodsCast
8878
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_3().
8879
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8880
*/
8881
#define PY_CLASS_METHOD_CAST_NAME_DOC_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc )\
8882
PY_CLASS_METHOD_CAST_EX_3(\
8883
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, s_doc,\
8884
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8885
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8886
8887
/** @ingroup ClassMethodsCast
8888
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_4().
8889
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8890
*/
8891
#define PY_CLASS_METHOD_CAST_NAME_DOC_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc )\
8892
PY_CLASS_METHOD_CAST_EX_4(\
8893
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, s_doc,\
8894
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8895
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8896
8897
/** @ingroup ClassMethodsCast
8898
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_5().
8899
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8900
*/
8901
#define PY_CLASS_METHOD_CAST_NAME_DOC_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc )\
8902
PY_CLASS_METHOD_CAST_EX_5(\
8903
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, s_doc,\
8904
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8905
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8906
8907
/** @ingroup ClassMethodsCast
8908
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_6().
8909
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8910
*/
8911
#define PY_CLASS_METHOD_CAST_NAME_DOC_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc )\
8912
PY_CLASS_METHOD_CAST_EX_6(\
8913
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, s_doc,\
8914
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8915
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8916
8917
/** @ingroup ClassMethodsCast
8918
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_7().
8919
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8920
*/
8921
#define PY_CLASS_METHOD_CAST_NAME_DOC_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc )\
8922
PY_CLASS_METHOD_CAST_EX_7(\
8923
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, s_doc,\
8924
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8925
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8926
8927
/** @ingroup ClassMethodsCast
8928
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_8().
8929
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8930
*/
8931
#define PY_CLASS_METHOD_CAST_NAME_DOC_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc )\
8932
PY_CLASS_METHOD_CAST_EX_8(\
8933
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, s_doc,\
8934
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8935
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8936
8937
/** @ingroup ClassMethodsCast
8938
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_9().
8939
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8940
*/
8941
#define PY_CLASS_METHOD_CAST_NAME_DOC_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc )\
8942
PY_CLASS_METHOD_CAST_EX_9(\
8943
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, s_doc,\
8944
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8945
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8946
8947
/** @ingroup ClassMethodsCast
8948
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_10().
8949
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8950
*/
8951
#define PY_CLASS_METHOD_CAST_NAME_DOC_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc )\
8952
PY_CLASS_METHOD_CAST_EX_10(\
8953
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, s_doc,\
8954
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8955
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8956
8957
/** @ingroup ClassMethodsCast
8958
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_11().
8959
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8960
*/
8961
#define PY_CLASS_METHOD_CAST_NAME_DOC_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc )\
8962
PY_CLASS_METHOD_CAST_EX_11(\
8963
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, s_doc,\
8964
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8965
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8966
8967
/** @ingroup ClassMethodsCast
8968
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_12().
8969
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8970
*/
8971
#define PY_CLASS_METHOD_CAST_NAME_DOC_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc )\
8972
PY_CLASS_METHOD_CAST_EX_12(\
8973
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, s_doc,\
8974
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8975
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8976
8977
/** @ingroup ClassMethodsCast
8978
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_13().
8979
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8980
*/
8981
#define PY_CLASS_METHOD_CAST_NAME_DOC_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc )\
8982
PY_CLASS_METHOD_CAST_EX_13(\
8983
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, s_doc,\
8984
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8985
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8986
8987
/** @ingroup ClassMethodsCast
8988
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_14().
8989
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
8990
*/
8991
#define PY_CLASS_METHOD_CAST_NAME_DOC_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc )\
8992
PY_CLASS_METHOD_CAST_EX_14(\
8993
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, s_doc,\
8994
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
8995
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
8996
8997
/** @ingroup ClassMethodsCast
8998
* @brief Convenience wrapper for PY_CLASS_METHOD_CAST_EX_15().
8999
* @deprecated Use PY_CLASS_METHOD_NAME_DOC() or PY_CLASS_FREE_METHOD_NAME_DOC() instead.
9000
*/
9001
#define PY_CLASS_METHOD_CAST_NAME_DOC_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc )\
9002
PY_CLASS_METHOD_CAST_EX_15(\
9003
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, s_doc,\
9004
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_method_, i_cppClass)),\
9005
LASS_UNIQUENAME(LASS_CONCATENATE(TypelassPyImpl_method_, i_cppClass)))
9006
9007
9008
/** @ingroup ClassMethodsCast
9009
* @brief Convenience wrapper with no documentation.
9010
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9011
*/
9012
#define PY_CLASS_METHOD_CAST_NAME( i_cppClass, i_cppMethod, t_return, t_params, s_methodName )\
9013
PY_CLASS_METHOD_CAST_NAME_DOC(\
9014
i_cppClass, i_cppMethod, t_return, t_params, s_methodName, 0 )
9015
9016
/** @ingroup ClassMethodsCast
9017
* @brief Convenience wrapper with no documentation.
9018
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9019
*/
9020
#define PY_CLASS_METHOD_CAST_NAME_0( i_cppClass, i_cppMethod, t_return, s_methodName )\
9021
PY_CLASS_METHOD_CAST_NAME_DOC_0(\
9022
i_cppClass, i_cppMethod, t_return, s_methodName, 0 )
9023
9024
/** @ingroup ClassMethodsCast
9025
* @brief Convenience wrapper with no documentation.
9026
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9027
*/
9028
#define PY_CLASS_METHOD_CAST_NAME_1( i_cppClass, i_cppMethod, t_return, t_P1, s_methodName )\
9029
PY_CLASS_METHOD_CAST_NAME_DOC_1(\
9030
i_cppClass, i_cppMethod, t_return, t_P1, s_methodName, 0 )
9031
9032
/** @ingroup ClassMethodsCast
9033
* @brief Convenience wrapper with no documentation.
9034
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9035
*/
9036
#define PY_CLASS_METHOD_CAST_NAME_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName )\
9037
PY_CLASS_METHOD_CAST_NAME_DOC_2(\
9038
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_methodName, 0 )
9039
9040
/** @ingroup ClassMethodsCast
9041
* @brief Convenience wrapper with no documentation.
9042
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9043
*/
9044
#define PY_CLASS_METHOD_CAST_NAME_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName )\
9045
PY_CLASS_METHOD_CAST_NAME_DOC_3(\
9046
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_methodName, 0 )
9047
9048
/** @ingroup ClassMethodsCast
9049
* @brief Convenience wrapper with no documentation.
9050
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9051
*/
9052
#define PY_CLASS_METHOD_CAST_NAME_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName )\
9053
PY_CLASS_METHOD_CAST_NAME_DOC_4(\
9054
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_methodName, 0 )
9055
9056
/** @ingroup ClassMethodsCast
9057
* @brief Convenience wrapper with no documentation.
9058
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9059
*/
9060
#define PY_CLASS_METHOD_CAST_NAME_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName )\
9061
PY_CLASS_METHOD_CAST_NAME_DOC_5(\
9062
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_methodName, 0 )
9063
9064
/** @ingroup ClassMethodsCast
9065
* @brief Convenience wrapper with no documentation.
9066
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9067
*/
9068
#define PY_CLASS_METHOD_CAST_NAME_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName )\
9069
PY_CLASS_METHOD_CAST_NAME_DOC_6(\
9070
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_methodName, 0 )
9071
9072
/** @ingroup ClassMethodsCast
9073
* @brief Convenience wrapper with no documentation.
9074
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9075
*/
9076
#define PY_CLASS_METHOD_CAST_NAME_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName )\
9077
PY_CLASS_METHOD_CAST_NAME_DOC_7(\
9078
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_methodName, 0 )
9079
9080
/** @ingroup ClassMethodsCast
9081
* @brief Convenience wrapper with no documentation.
9082
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9083
*/
9084
#define PY_CLASS_METHOD_CAST_NAME_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName )\
9085
PY_CLASS_METHOD_CAST_NAME_DOC_8(\
9086
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_methodName, 0 )
9087
9088
/** @ingroup ClassMethodsCast
9089
* @brief Convenience wrapper with no documentation.
9090
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9091
*/
9092
#define PY_CLASS_METHOD_CAST_NAME_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName )\
9093
PY_CLASS_METHOD_CAST_NAME_DOC_9(\
9094
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_methodName, 0 )
9095
9096
/** @ingroup ClassMethodsCast
9097
* @brief Convenience wrapper with no documentation.
9098
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9099
*/
9100
#define PY_CLASS_METHOD_CAST_NAME_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName )\
9101
PY_CLASS_METHOD_CAST_NAME_DOC_10(\
9102
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_methodName, 0 )
9103
9104
/** @ingroup ClassMethodsCast
9105
* @brief Convenience wrapper with no documentation.
9106
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9107
*/
9108
#define PY_CLASS_METHOD_CAST_NAME_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName )\
9109
PY_CLASS_METHOD_CAST_NAME_DOC_11(\
9110
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_methodName, 0 )
9111
9112
/** @ingroup ClassMethodsCast
9113
* @brief Convenience wrapper with no documentation.
9114
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9115
*/
9116
#define PY_CLASS_METHOD_CAST_NAME_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName )\
9117
PY_CLASS_METHOD_CAST_NAME_DOC_12(\
9118
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_methodName, 0 )
9119
9120
/** @ingroup ClassMethodsCast
9121
* @brief Convenience wrapper with no documentation.
9122
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9123
*/
9124
#define PY_CLASS_METHOD_CAST_NAME_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName )\
9125
PY_CLASS_METHOD_CAST_NAME_DOC_13(\
9126
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_methodName, 0 )
9127
9128
/** @ingroup ClassMethodsCast
9129
* @brief Convenience wrapper with no documentation.
9130
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9131
*/
9132
#define PY_CLASS_METHOD_CAST_NAME_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName )\
9133
PY_CLASS_METHOD_CAST_NAME_DOC_14(\
9134
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_methodName, 0 )
9135
9136
/** @ingroup ClassMethodsCast
9137
* @brief Convenience wrapper with no documentation.
9138
* @deprecated Use PY_CLASS_METHOD_NAME() or PY_CLASS_FREE_METHOD_NAME() instead.
9139
*/
9140
#define PY_CLASS_METHOD_CAST_NAME_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName )\
9141
PY_CLASS_METHOD_CAST_NAME_DOC_15(\
9142
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_methodName, 0 )
9143
9144
9145
/** @ingroup ClassMethodsCast
9146
* @brief Convenience wrapper with method name derived from C++ method.
9147
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9148
*/
9149
#define PY_CLASS_METHOD_CAST_DOC( i_cppClass, i_cppMethod, t_return, t_params, s_doc )\
9150
PY_CLASS_METHOD_CAST_NAME_DOC(\
9151
i_cppClass, i_cppMethod, t_return, t_params, LASS_STRINGIFY(i_cppMethod), s_doc )
9152
9153
/** @ingroup ClassMethodsCast
9154
* @brief Convenience wrapper with method name derived from C++ method.
9155
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9156
*/
9157
#define PY_CLASS_METHOD_CAST_DOC_0( i_cppClass, i_cppMethod, t_return, s_doc )\
9158
PY_CLASS_METHOD_CAST_NAME_DOC_0(\
9159
i_cppClass, i_cppMethod, t_return, LASS_STRINGIFY(i_cppMethod), s_doc )
9160
9161
/** @ingroup ClassMethodsCast
9162
* @brief Convenience wrapper with method name derived from C++ method.
9163
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9164
*/
9165
#define PY_CLASS_METHOD_CAST_DOC_1( i_cppClass, i_cppMethod, t_return, t_P1, s_doc )\
9166
PY_CLASS_METHOD_CAST_NAME_DOC_1(\
9167
i_cppClass, i_cppMethod, t_return, t_P1, LASS_STRINGIFY(i_cppMethod), s_doc )
9168
9169
/** @ingroup ClassMethodsCast
9170
* @brief Convenience wrapper with method name derived from C++ method.
9171
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9172
*/
9173
#define PY_CLASS_METHOD_CAST_DOC_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, s_doc )\
9174
PY_CLASS_METHOD_CAST_NAME_DOC_2(\
9175
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, LASS_STRINGIFY(i_cppMethod), s_doc )
9176
9177
/** @ingroup ClassMethodsCast
9178
* @brief Convenience wrapper with method name derived from C++ method.
9179
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9180
*/
9181
#define PY_CLASS_METHOD_CAST_DOC_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, s_doc )\
9182
PY_CLASS_METHOD_CAST_NAME_DOC_3(\
9183
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, LASS_STRINGIFY(i_cppMethod), s_doc )
9184
9185
/** @ingroup ClassMethodsCast
9186
* @brief Convenience wrapper with method name derived from C++ method.
9187
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9188
*/
9189
#define PY_CLASS_METHOD_CAST_DOC_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, s_doc )\
9190
PY_CLASS_METHOD_CAST_NAME_DOC_4(\
9191
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, LASS_STRINGIFY(i_cppMethod), s_doc )
9192
9193
/** @ingroup ClassMethodsCast
9194
* @brief Convenience wrapper with method name derived from C++ method.
9195
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9196
*/
9197
#define PY_CLASS_METHOD_CAST_DOC_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, s_doc )\
9198
PY_CLASS_METHOD_CAST_NAME_DOC_5(\
9199
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, LASS_STRINGIFY(i_cppMethod), s_doc )
9200
9201
/** @ingroup ClassMethodsCast
9202
* @brief Convenience wrapper with method name derived from C++ method.
9203
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9204
*/
9205
#define PY_CLASS_METHOD_CAST_DOC_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, s_doc )\
9206
PY_CLASS_METHOD_CAST_NAME_DOC_6(\
9207
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, LASS_STRINGIFY(i_cppMethod), s_doc )
9208
9209
/** @ingroup ClassMethodsCast
9210
* @brief Convenience wrapper with method name derived from C++ method.
9211
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9212
*/
9213
#define PY_CLASS_METHOD_CAST_DOC_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, s_doc )\
9214
PY_CLASS_METHOD_CAST_NAME_DOC_7(\
9215
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, LASS_STRINGIFY(i_cppMethod), s_doc )
9216
9217
/** @ingroup ClassMethodsCast
9218
* @brief Convenience wrapper with method name derived from C++ method.
9219
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9220
*/
9221
#define PY_CLASS_METHOD_CAST_DOC_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, s_doc )\
9222
PY_CLASS_METHOD_CAST_NAME_DOC_8(\
9223
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, LASS_STRINGIFY(i_cppMethod), s_doc )
9224
9225
/** @ingroup ClassMethodsCast
9226
* @brief Convenience wrapper with method name derived from C++ method.
9227
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9228
*/
9229
#define PY_CLASS_METHOD_CAST_DOC_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, s_doc )\
9230
PY_CLASS_METHOD_CAST_NAME_DOC_9(\
9231
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, LASS_STRINGIFY(i_cppMethod), s_doc )
9232
9233
/** @ingroup ClassMethodsCast
9234
* @brief Convenience wrapper with method name derived from C++ method.
9235
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9236
*/
9237
#define PY_CLASS_METHOD_CAST_DOC_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, s_doc )\
9238
PY_CLASS_METHOD_CAST_NAME_DOC_10(\
9239
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, LASS_STRINGIFY(i_cppMethod), s_doc )
9240
9241
/** @ingroup ClassMethodsCast
9242
* @brief Convenience wrapper with method name derived from C++ method.
9243
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9244
*/
9245
#define PY_CLASS_METHOD_CAST_DOC_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, s_doc )\
9246
PY_CLASS_METHOD_CAST_NAME_DOC_11(\
9247
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, LASS_STRINGIFY(i_cppMethod), s_doc )
9248
9249
/** @ingroup ClassMethodsCast
9250
* @brief Convenience wrapper with method name derived from C++ method.
9251
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9252
*/
9253
#define PY_CLASS_METHOD_CAST_DOC_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, s_doc )\
9254
PY_CLASS_METHOD_CAST_NAME_DOC_12(\
9255
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, LASS_STRINGIFY(i_cppMethod), s_doc )
9256
9257
/** @ingroup ClassMethodsCast
9258
* @brief Convenience wrapper with method name derived from C++ method.
9259
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9260
*/
9261
#define PY_CLASS_METHOD_CAST_DOC_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, s_doc )\
9262
PY_CLASS_METHOD_CAST_NAME_DOC_13(\
9263
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, LASS_STRINGIFY(i_cppMethod), s_doc )
9264
9265
/** @ingroup ClassMethodsCast
9266
* @brief Convenience wrapper with method name derived from C++ method.
9267
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9268
*/
9269
#define PY_CLASS_METHOD_CAST_DOC_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, s_doc )\
9270
PY_CLASS_METHOD_CAST_NAME_DOC_14(\
9271
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, LASS_STRINGIFY(i_cppMethod), s_doc )
9272
9273
/** @ingroup ClassMethodsCast
9274
* @brief Convenience wrapper with method name derived from C++ method.
9275
* @deprecated Use PY_CLASS_METHOD_DOC() or PY_CLASS_FREE_METHOD_DOC() instead.
9276
*/
9277
#define PY_CLASS_METHOD_CAST_DOC_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, s_doc )\
9278
PY_CLASS_METHOD_CAST_NAME_DOC_15(\
9279
i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, LASS_STRINGIFY(i_cppMethod), s_doc )
9280
9281
9282
/** @ingroup ClassMethodsCast
9283
* @brief Basic convenience wrapper with minimal parameters.
9284
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9285
*/
9286
#define PY_CLASS_METHOD_CAST( i_cppClass, i_cppMethod, t_return, t_params )\
9287
PY_CLASS_METHOD_CAST_DOC( i_cppClass, i_cppMethod, t_return, t_params, 0 )
9288
9289
/** @ingroup ClassMethodsCast
9290
* @brief Basic convenience wrapper with minimal parameters.
9291
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9292
*/
9293
#define PY_CLASS_METHOD_CAST_0( i_cppClass, i_cppMethod, t_return )\
9294
PY_CLASS_METHOD_CAST_DOC_0( i_cppClass, i_cppMethod, t_return, 0 )
9295
9296
/** @ingroup ClassMethodsCast
9297
* @brief Basic convenience wrapper with minimal parameters.
9298
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9299
*/
9300
#define PY_CLASS_METHOD_CAST_1( i_cppClass, i_cppMethod, t_return, t_P1 )\
9301
PY_CLASS_METHOD_CAST_DOC_1( i_cppClass, i_cppMethod, t_return, t_P1, 0 )
9302
9303
/** @ingroup ClassMethodsCast
9304
* @brief Basic convenience wrapper with minimal parameters.
9305
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9306
*/
9307
#define PY_CLASS_METHOD_CAST_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2 )\
9308
PY_CLASS_METHOD_CAST_DOC_2( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, 0 )
9309
9310
/** @ingroup ClassMethodsCast
9311
* @brief Basic convenience wrapper with minimal parameters.
9312
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9313
*/
9314
#define PY_CLASS_METHOD_CAST_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3 )\
9315
PY_CLASS_METHOD_CAST_DOC_3( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, 0 )
9316
9317
/** @ingroup ClassMethodsCast
9318
* @brief Basic convenience wrapper with minimal parameters.
9319
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9320
*/
9321
#define PY_CLASS_METHOD_CAST_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4 )\
9322
PY_CLASS_METHOD_CAST_DOC_4( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, 0 )
9323
9324
/** @ingroup ClassMethodsCast
9325
* @brief Basic convenience wrapper with minimal parameters.
9326
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9327
*/
9328
#define PY_CLASS_METHOD_CAST_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5 )\
9329
PY_CLASS_METHOD_CAST_DOC_5( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, 0 )
9330
9331
/** @ingroup ClassMethodsCast
9332
* @brief Basic convenience wrapper with minimal parameters.
9333
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9334
*/
9335
#define PY_CLASS_METHOD_CAST_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 )\
9336
PY_CLASS_METHOD_CAST_DOC_6( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, 0 )
9337
9338
/** @ingroup ClassMethodsCast
9339
* @brief Basic convenience wrapper with minimal parameters.
9340
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9341
*/
9342
#define PY_CLASS_METHOD_CAST_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 )\
9343
PY_CLASS_METHOD_CAST_DOC_7( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, 0 )
9344
9345
/** @ingroup ClassMethodsCast
9346
* @brief Basic convenience wrapper with minimal parameters.
9347
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9348
*/
9349
#define PY_CLASS_METHOD_CAST_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 )\
9350
PY_CLASS_METHOD_CAST_DOC_8( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, 0 )
9351
9352
/** @ingroup ClassMethodsCast
9353
* @brief Basic convenience wrapper with minimal parameters.
9354
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9355
*/
9356
#define PY_CLASS_METHOD_CAST_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 )\
9357
PY_CLASS_METHOD_CAST_DOC_9( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, 0 )
9358
9359
/** @ingroup ClassMethodsCast
9360
* @brief Basic convenience wrapper with minimal parameters.
9361
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9362
*/
9363
#define PY_CLASS_METHOD_CAST_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 )\
9364
PY_CLASS_METHOD_CAST_DOC_10( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, 0 )
9365
9366
/** @ingroup ClassMethodsCast
9367
* @brief Basic convenience wrapper with minimal parameters.
9368
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9369
*/
9370
#define PY_CLASS_METHOD_CAST_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 )\
9371
PY_CLASS_METHOD_CAST_DOC_11( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, 0 )
9372
9373
/** @ingroup ClassMethodsCast
9374
* @brief Basic convenience wrapper with minimal parameters.
9375
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9376
*/
9377
#define PY_CLASS_METHOD_CAST_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 )\
9378
PY_CLASS_METHOD_CAST_DOC_12( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, 0 )
9379
9380
/** @ingroup ClassMethodsCast
9381
* @brief Basic convenience wrapper with minimal parameters.
9382
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9383
*/
9384
#define PY_CLASS_METHOD_CAST_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 )\
9385
PY_CLASS_METHOD_CAST_DOC_13( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, 0 )
9386
9387
/** @ingroup ClassMethodsCast
9388
* @brief Basic convenience wrapper with minimal parameters.
9389
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9390
*/
9391
#define PY_CLASS_METHOD_CAST_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 )\
9392
PY_CLASS_METHOD_CAST_DOC_14( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, 0 )
9393
9394
/** @ingroup ClassMethodsCast
9395
* @brief Basic convenience wrapper with minimal parameters.
9396
* @deprecated Use PY_CLASS_METHOD() or PY_CLASS_FREE_METHOD() instead.
9397
*/
9398
#define PY_CLASS_METHOD_CAST_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 )\
9399
PY_CLASS_METHOD_CAST_DOC_15( i_cppClass, i_cppMethod, t_return, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15, 0 )
9400
9401
9402
9403
// --- static methods ------------------------------------------------------------------------------
9404
9405
/** @defgroup ClassStaticMethods Static Method Export Macros
9406
* @ingroup ClassDefinition
9407
*
9408
* @brief Export C++ static methods or free functions as Python static methods.
9409
*
9410
* Static methods are called on the class itself rather than on instances, and do not receive an
9411
* implicit `self` parameter. Both C++ static member functions and free functions can be exported
9412
* as static methods, but free functions require you to use the PY_CLASS_STATIC_METHOD_EX()
9413
* variant.
9414
*
9415
* The basic form is:
9416
*
9417
* ```cpp
9418
* PY_CLASS_STATIC_METHOD( i_cppClass, i_cppMethod )
9419
* ```
9420
*
9421
* with:
9422
* - @a i_cppClass : C++ class containing the method, or its @ref ShadowClasses "shadow class"
9423
* - @a i_cppMethod : C++ static method name to export
9424
*
9425
* @par Common suffixes
9426
*
9427
* The `_NAME`, `_DOC` and `_EX` suffixes allow you to specify a custom Python name, docstring, or
9428
* (in rare cases) a custom dispatcher name.
9429
*
9430
* | Macro | Fixed parameters | Adds parameters | Use for ... |
9431
* |-----------------------------------|-------------------------------|-----------------------------------|------------------------------------------------------------|
9432
* | `PY_CLASS_STATIC_METHOD_NAME` | `i_cppClass`, `i_cppMethod` | `s_name` | Custom Python name |
9433
* | `PY_CLASS_STATIC_METHOD_DOC` | `i_cppClass`, `i_cppMethod` | `s_doc` | With docstring |
9434
* | `PY_CLASS_STATIC_METHOD_NAME_DOC` | `i_cppClass`, `i_cppMethod` | `s_name`, `s_doc` | Custom Python name + Docstring |
9435
* | `PY_CLASS_STATIC_METHOD_EX` | `t_cppClass`, `f_cppFunction` | `s_name`, `s_doc`, `i_dispatcher` | Free functions as static method, or custom dispatcher name |
9436
*
9437
* There are no `_QUALIFIED` versions of these macros.
9438
*
9439
* @par Overloading Python static methods
9440
*
9441
* Multiple static methods can be exported to the same Python name, to create a Python static
9442
* method that is overloaded on the parameter types.
9443
*
9444
* @note Overload resolution uses first-fit, not best-fit like C++. The first exported overload
9445
* that matches the arguments will be called.
9446
*
9447
* @par Example
9448
*
9449
* ```cpp
9450
* class Foo
9451
* {
9452
* PY_HEADER(python::PyObjectPlus)
9453
* public:
9454
* static void bar(int a);
9455
* static void baz(const std::string& s);
9456
* };
9457
*
9458
* Foo spam(int b, int c);
9459
*
9460
* PY_DECLARE_CLASS(Foo)
9461
* PY_CLASS_STATIC_METHOD_DOC(Foo, bar, "a regular C++ static method")
9462
* PY_CLASS_STATIC_METHOD_EX(Foo, Foo::baz, "baz", "another C++ static method", foo_baz)
9463
* PY_CLASS_STATIC_METHOD_EX(Foo, spam, "spam", "free function as static method", foo_spam)
9464
* ```
9465
*/
9466
9467
9468
/** @brief Export a C++ static method to Python, with full control.
9469
* @ingroup ClassStaticMethods
9470
*
9471
* This macro exports a C++ static method or free function as a Python static method (class method).
9472
*
9473
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
9474
*
9475
* @note Unlike the other convenience macros, you must use the full name of the C++ static method,
9476
* including the class name.
9477
*
9478
* @note This is the only macro that allows you to export a free function as static method.
9479
*
9480
* @param t_cppClass C++ class to add the static method to
9481
* @param f_cppFunction Full name of the C++ function that implements the static method
9482
* @param s_methodName Python method name (null-terminated C string literal)
9483
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
9484
* @param i_dispatcher Unique identifier for the generated dispatcher function
9485
*
9486
* ```cpp
9487
* PY_CLASS_STATIC_METHOD_EX(Foo, Foo::bar, "bar", "a regular C++ static method", foo_bar)
9488
* PY_CLASS_STATIC_METHOD_EX(Foo, spam, "spam", "free function as static method", foo_spam)
9489
* ```
9490
*/
9491
#define PY_CLASS_STATIC_METHOD_EX( t_cppClass, f_cppFunction, s_methodName, s_doc, i_dispatcher )\
9492
static PyCFunction LASS_CONCATENATE(i_dispatcher, _overloadChain) = 0;\
9493
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher( PyObject* iIgnore, PyObject* iArgs )\
9494
{\
9495
if (LASS_CONCATENATE(i_dispatcher, _overloadChain))\
9496
{\
9497
PyObject* result = LASS_CONCATENATE(i_dispatcher, _overloadChain)(iIgnore, iArgs);\
9498
if (!(PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError)))\
9499
{\
9500
return result;\
9501
}\
9502
PyErr_Clear();\
9503
Py_XDECREF(result);\
9504
}\
9505
return ::lass::python::impl::callFunction( iArgs, f_cppFunction );\
9506
}\
9507
LASS_EXECUTE_BEFORE_MAIN_EX\
9508
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain ),\
9509
t_cppClass ::_lassPyClassDef.addStaticMethod(\
9510
s_methodName, s_doc, i_dispatcher, LASS_CONCATENATE(i_dispatcher, _overloadChain));\
9511
)
9512
9513
/** @brief Export a C++ static method to Python, with docstring.
9514
* @ingroup ClassStaticMethods
9515
*
9516
* Wraps PY_CLASS_STATIC_METHOD_EX() for C++ static member functions with automatically generated
9517
* dispatcher name and method name derived from C++ method name.
9518
*
9519
* @param i_cppClass C++ class to add the static method to (unqualified name)
9520
* @param i_cppMethod Name of the C++ static method to export
9521
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
9522
*
9523
* @par Example
9524
* ```cpp
9525
* PY_CLASS_STATIC_METHOD_DOC(Foo, bar, "Do some bar")
9526
* ```
9527
*/
9528
#define PY_CLASS_STATIC_METHOD_DOC( i_cppClass, i_cppMethod, s_doc )\
9529
PY_CLASS_STATIC_METHOD_EX(\
9530
i_cppClass,\
9531
&::lass::python::impl::ShadowTraits<i_cppClass>::TCppClass::i_cppMethod,\
9532
LASS_STRINGIFY(i_cppMethod), s_doc,\
9533
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_staticMethod_, i_cppClass)))
9534
9535
/** @brief Export a C++ static method to Python, with custom name and docstring.
9536
* @ingroup ClassStaticMethods
9537
*
9538
* Wraps PY_CLASS_STATIC_METHOD_EX() for C++ static member functions with automatically generated
9539
* dispatcher name.
9540
*
9541
* @param i_cppClass C++ class to add the static method to (unqualified name)
9542
* @param i_cppMethod Name of the C++ static method to export
9543
* @param s_methodName Python method name (null-terminated C string literal)
9544
* @param s_doc Method documentation string (null-terminated C string literal, may be nullptr)
9545
*
9546
* @par Example
9547
* ```cpp
9548
* PY_CLASS_STATIC_METHOD_NAME_DOC(Foo, bar, "do_bar", "Do some bar")
9549
* ```
9550
*/
9551
#define PY_CLASS_STATIC_METHOD_NAME_DOC( i_cppClass, i_cppMethod, s_methodName, s_doc )\
9552
PY_CLASS_STATIC_METHOD_EX(\
9553
i_cppClass,\
9554
&::lass::python::impl::ShadowTraits<i_cppClass>::TCppClass::i_cppMethod,\
9555
s_methodName, s_doc,\
9556
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_staticMethod_, i_cppClass)))
9557
9558
9559
/** @brief Export a C++ static method to Python, with custom Python name.
9560
* @ingroup ClassStaticMethods
9561
*
9562
* Wraps PY_CLASS_STATIC_METHOD_EX() for C++ static member functions with automatically generated
9563
* dispatcher name and no documentation.
9564
*
9565
* @param i_cppClass C++ class to add the static method to (unqualified name)
9566
* @param i_cppMethod Name of the C++ static method to export
9567
* @param s_methodName Python method name (null-terminated C string literal)
9568
*
9569
* @par Example
9570
* ```cpp
9571
* PY_CLASS_STATIC_METHOD_NAME(Foo, bar, "baz")
9572
* ```
9573
*/
9574
#define PY_CLASS_STATIC_METHOD_NAME( i_cppClass, i_cppMethod, s_methodName)\
9575
PY_CLASS_STATIC_METHOD_EX(\
9576
i_cppClass,\
9577
&::lass::python::impl::ShadowTraits<i_cppClass>::TCppClass::i_cppMethod,\
9578
s_methodName, "",\
9579
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_staticMethod_, i_cppClass)))
9580
9581
9582
/** @brief Export a C++ static method to Python.
9583
* @ingroup ClassStaticMethods
9584
*
9585
* Wraps PY_CLASS_STATIC_METHOD_DOC() with no documentation.
9586
*
9587
* @param i_cppClass C++ class to add the static method to (unqualified name)
9588
* @param i_cppMethod Name of the C++ static method to export (used as Python method name)
9589
*
9590
* @par Example
9591
* ```cpp
9592
* PY_CLASS_STATIC_METHOD(Foo, bar)
9593
* ```
9594
*/
9595
#define PY_CLASS_STATIC_METHOD( i_cppClass, i_cppMethod )\
9596
PY_CLASS_STATIC_METHOD_DOC( i_cppClass, i_cppMethod, 0 )
9597
9598
9599
9600
// --- data members --------------------------------------------------------------------------------
9601
9602
/** @defgroup ClassMembers Data Member Export Macros
9603
* @ingroup ClassDefinition
9604
*
9605
* Export C++ class data members as Python properties.
9606
*
9607
* These macros create Python properties that provide access to C++ class data through various
9608
* access patterns: getter/setter methods, free functions, or direct public member access.
9609
*
9610
* Macro names follow the regular grammar (see @ref PythonMacroName), but there are no
9611
* `_QUALIFIED` versions.
9612
*
9613
* @par Read/Write
9614
*
9615
* | Member Methods | Free Functions | Public Member |
9616
* |-------------------------------|------------------------------------|-----------------------------------|
9617
* | PY_CLASS_MEMBER_RW() | PY_CLASS_FREE_MEMBER_RW() | PY_CLASS_PUBLIC_MEMBER() |
9618
* | PY_CLASS_MEMBER_RW_NAME() | PY_CLASS_FREE_MEMBER_RW_NAME() | PY_CLASS_PUBLIC_MEMBER_NAME() |
9619
* | PY_CLASS_MEMBER_RW_DOC() | PY_CLASS_FREE_MEMBER_RW_DOC() | PY_CLASS_PUBLIC_MEMBER_DOC() |
9620
* | PY_CLASS_MEMBER_RW_NAME_DOC() | PY_CLASS_FREE_MEMBER_RW_NAME_DOC() | PY_CLASS_PUBLIC_MEMBER_NAME_DOC() |
9621
* | PY_CLASS_MEMBER_RW_EX() | PY_CLASS_FREE_MEMBER_RW_EX() | PY_CLASS_PUBLIC_MEMBER_EX() |
9622
*
9623
* @par Read-only
9624
*
9625
* | Member Methods | Free Functions | Public Member |
9626
* |------------------------------|-----------------------------------|-------------------------------------|
9627
* | PY_CLASS_MEMBER_R() | PY_CLASS_FREE_MEMBER_R() | PY_CLASS_PUBLIC_MEMBER_R() |
9628
* | PY_CLASS_MEMBER_R_NAME() | PY_CLASS_FREE_MEMBER_R_NAME() | PY_CLASS_PUBLIC_MEMBER_R_NAME() |
9629
* | PY_CLASS_MEMBER_R_DOC() | PY_CLASS_FREE_MEMBER_R_DOC() | PY_CLASS_PUBLIC_MEMBER_R_DOC() |
9630
* | PY_CLASS_MEMBER_R_NAME_DOC() | PY_CLASS_FREE_MEMBER_R_NAME_DOC() | PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC() |
9631
* | PY_CLASS_MEMBER_R_EX() | PY_CLASS_FREE_MEMBER_R_EX() | PY_CLASS_PUBLIC_MEMBER_R_EX() |
9632
9633
*/
9634
9635
/** @addtogroup ClassMembers
9636
* @name Member Method Properties
9637
*
9638
* Use C++ methods as getter/setter to define a Python property
9639
*
9640
* @par Non-const and Const Getter
9641
*
9642
* Although Python doesn't know the concept of constness, @ref ShadowClasses may contain a
9643
* reference to a constant shadowee instance. Getters may be overloaded on this constness and the
9644
* `PY_CLASS_MEMBER_*` macros will take this into account. This allows you to overload a getter and
9645
* return a non-const pointer to a member if the shadowee isn't const.
9646
*
9647
* ```cpp
9648
* class Foo
9649
* {
9650
* public:
9651
* lass::util::SharedPtr<const Bar> bar() const;
9652
* lass::util::SharedPtr<Bar> bar();
9653
* };
9654
*
9655
* PY_SHADOW_CLASS(DLL_EXPORT, PyFoo, Foo)
9656
* PY_SHADOW_CASTERS(PyFoo)
9657
* PY_DECLARE_CLASS_NAME(PyFoo, "Foo")
9658
* PY_CLASS_MEMBER_R(PyFoo, bar) // will return SharedPtr<const Bar> or SharedPtr<Bar> depending on Foo constness
9659
* ```
9660
*
9661
* This also works in combination with a setter, using the `PY_CLASS_MEMBER_RW*` macros.
9662
*
9663
* @par Two Forms of Setters
9664
*
9665
* Setters may have one of following signatures:
9666
*
9667
* - take the new value as parameter, and have void as return type:
9668
* ```cpp
9669
* void setName(const std::string& name);
9670
* ```
9671
* - have no paramater, but return a non-const reference to the member so it can be assigned to.
9672
* ```cpp
9673
* float& price();
9674
* ```
9675
*
9676
* See example below.
9677
*
9678
*
9679
* @par Example
9680
*
9681
* ```cpp
9682
* class Parrot: public lass::python::PyObjectPlus
9683
* {
9684
* PY_HEADER(lass::python::PyObjectPlus)
9685
* public:
9686
* bool isAlive() const;
9687
*
9688
* const std::string& name() const;
9689
* void setName(const std::string& name); // setter with parameter
9690
*
9691
* float price() const;
9692
* float& price(); // setter through non-const reference
9693
* };
9694
*
9695
* PY_DECLARE_CLASS(Parrot)
9696
* PY_CLASS_MEMBER_R_NAME_DOC(Parrot, isAlive, "alive", "is True if parrot isn't dead yet") // p.alive
9697
* PY_CLASS_MEMBER_RW(Parrot, name, setName) // p.name
9698
* PY_CLASS_MEMBER_RW(Parrot, price, price) // p.price
9699
* ```
9700
*
9701
* @note Member exports cannot be overloaded on types, and there are no qualified versions of these
9702
* macros.
9703
*
9704
* @{
9705
*/
9706
9707
/** @brief Export a getter/setter pair as a Python property, with full control.
9708
* @ingroup ClassMembers
9709
*
9710
* This is the most flexible read-write member export macro, allowing manual dispatcher naming.
9711
*
9712
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
9713
*
9714
* Exports a pair of C++ getter and setter methods as a Python read/write property.
9715
*
9716
* @param t_cppClass C++ class containing the getter and setter methods
9717
* @param i_cppGetter C++ method name of getter
9718
* @param i_cppSetter C++ method name of setter
9719
* @param s_memberName Python property name (null-terminated C string literal)
9720
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
9721
* @param i_dispatcher Unique identifier for the generated dispatcher functions
9722
*
9723
* @par Example
9724
* ```cpp
9725
* PY_CLASS_MEMBER_RW_NAME_DOC(Parrot, getName, setName, "name", "the name of the parrot", parrot_name)
9726
* ```
9727
*/
9728
#define PY_CLASS_MEMBER_RW_EX( t_cppClass, i_cppGetter, i_cppSetter, s_memberName, s_doc, i_dispatcher)\
9729
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE(i_dispatcher, _getter)( PyObject* iObject, void* )\
9730
{\
9731
try \
9732
{ \
9733
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
9734
TShadowTraits::TCppClassPtr self; \
9735
if (TShadowTraits::getObject(iObject, self) == 0)\
9736
{ \
9737
return ::lass::python::pyBuildSimpleObject(self->i_cppGetter()); \
9738
} \
9739
PyErr_Clear(); \
9740
TShadowTraits::TConstCppClassPtr constSelf; \
9741
if (TShadowTraits::getObject(iObject, constSelf) == 0)\
9742
{ \
9743
return ::lass::python::pyBuildSimpleObject(constSelf->i_cppGetter()); \
9744
} \
9745
return 0; \
9746
} \
9747
LASS_PYTHON_CATCH_AND_RETURN \
9748
}\
9749
extern "C" LASS_DLL_LOCAL int LASS_CONCATENATE(i_dispatcher, _setter)( PyObject* iObject, PyObject* iArgs, void* )\
9750
{\
9751
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
9752
typedef TShadowTraits::TCppClass TCppClass;\
9753
return ::lass::python::impl::CallMethod<TShadowTraits>::set( iArgs, iObject, &TCppClass::i_cppSetter );\
9754
}\
9755
LASS_EXECUTE_BEFORE_MAIN_EX\
9756
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
9757
t_cppClass::_lassPyClassDef.addGetSetter(\
9758
s_memberName, s_doc,\
9759
LASS_CONCATENATE(i_dispatcher, _getter), LASS_CONCATENATE(i_dispatcher, _setter));\
9760
)
9761
9762
/** @brief Export a getter/setter pair as a Python property, with custom name and docstring.
9763
* @ingroup ClassMembers
9764
*
9765
* Wraps PY_CLASS_MEMBER_RW_EX() with auto-generated dispatcher name.
9766
*
9767
* @param i_cppClass C++ class containing the getter and setter methods (unqualified name)
9768
* @param i_cppGetter C++ method name of getter
9769
* @param i_cppSetter C++ method name of setter
9770
* @param s_memberName Python property name (null-terminated C string literal)
9771
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
9772
*
9773
* @par Example
9774
* ```cpp
9775
* PY_CLASS_MEMBER_RW_NAME_DOC(Parrot, getName, setName, "name", "the name of the parrot")
9776
* ```
9777
*/
9778
#define PY_CLASS_MEMBER_RW_NAME_DOC(i_cppClass, i_cppGetter, i_cppSetter, s_memberName, s_doc)\
9779
PY_CLASS_MEMBER_RW_EX(i_cppClass, i_cppGetter, i_cppSetter, s_memberName, s_doc,\
9780
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_memberRW, i_cppClass)))
9781
9782
/** @brief Export a getter/setter pair as a Python property, with custom Python name.
9783
* @ingroup ClassMembers
9784
*
9785
* Wraps PY_CLASS_MEMBER_RW_NAME_DOC() with @a s_doc = `nullptr`.
9786
*
9787
* @param i_cppClass C++ class containing the getter and setter methods (unqualified name)
9788
* @param i_cppGetter C++ method name of getter
9789
* @param i_cppSetter C++ method name of setter
9790
* @param s_memberName Python property name (null-terminated C string literal)
9791
*
9792
* @par Example
9793
* ```cpp
9794
* PY_CLASS_MEMBER_RW_NAME(Parrot, getName, setName, "name")
9795
* ```
9796
*/
9797
#define PY_CLASS_MEMBER_RW_NAME(i_cppClass, i_cppGetter, i_cppSetter, s_memberName)\
9798
PY_CLASS_MEMBER_RW_NAME_DOC(i_cppClass, i_cppGetter, i_cppSetter, s_memberName, 0)
9799
9800
/** @brief Export a getter/setter pair as a Python property, with docstring.
9801
* @ingroup ClassMembers
9802
*
9803
* Wraps PY_CLASS_MEMBER_RW_NAME_DOC() with s_memberName derived from i_cppGetter.
9804
*
9805
* @param i_cppClass C++ class containing the getter and setter methods (unqualified name)
9806
* @param i_cppGetter C++ method name of getter (also used as Python property name)
9807
* @param i_cppSetter C++ method name of setter
9808
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
9809
*
9810
* @par Example
9811
* ```cpp
9812
* PY_CLASS_MEMBER_RW_DOC(Parrot, name, setName, "the name of the parrot")
9813
* ```
9814
*/
9815
#define PY_CLASS_MEMBER_RW_DOC(i_cppClass, i_cppGetter, i_cppSetter, s_doc)\
9816
PY_CLASS_MEMBER_RW_NAME_DOC(i_cppClass, i_cppGetter, i_cppSetter, LASS_STRINGIFY(i_cppGetter), s_doc)
9817
9818
/** @brief Export a getter/setter pair as a Python property.
9819
* @ingroup ClassMembers
9820
*
9821
* Wraps PY_CLASS_MEMBER_RW_DOC() with @a s_doc = `nullptr`.
9822
*
9823
* @param i_cppClass C++ class containing the getter and setter methods (unqualified name)
9824
* @param i_cppGetter C++ method name of getter (also used as Python property name)
9825
* @param i_cppSetter C++ method name of setter
9826
*
9827
* @par Example
9828
* ```cpp
9829
* PY_CLASS_MEMBER_RW_DOC(Parrot, name, setName)
9830
* ```
9831
*/
9832
#define PY_CLASS_MEMBER_RW(i_cppClass, i_cppGetter, i_cppSetter)\
9833
PY_CLASS_MEMBER_RW_DOC(i_cppClass, i_cppGetter, i_cppSetter, 0)
9834
9835
9836
9837
/** @brief Export a getter as a read-only Python property, with full control.
9838
* @ingroup ClassMembers
9839
*
9840
* This is the most flexible read-only member export macro, allowing manual dispatcher naming.
9841
*
9842
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
9843
*
9844
* Exports a C++ getter method as a Python read-only property (no setter provided).
9845
*
9846
* @param t_cppClass C++ class containing the getter method
9847
* @param i_cppGetter C++ method name of getter
9848
* @param s_memberName Python property name (null-terminated C string literal)
9849
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
9850
* @param i_dispatcher Unique identifier for the generated dispatcher function
9851
*
9852
* @par Example
9853
* ```cpp
9854
* PY_CLASS_MEMBER_R_EX(Parrot, isAlive, "alive", "True if parrot isn't dead", parrot_alive)
9855
* ```
9856
*/
9857
#define PY_CLASS_MEMBER_R_EX( t_cppClass, i_cppGetter, s_memberName, s_doc, i_dispatcher )\
9858
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE(i_dispatcher, _getter)( PyObject* iObject, void* )\
9859
{\
9860
try \
9861
{ \
9862
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
9863
TShadowTraits::TCppClassPtr self; \
9864
if (TShadowTraits::getObject(iObject, self) == 0)\
9865
{ \
9866
return ::lass::python::pyBuildSimpleObject(self->i_cppGetter()); \
9867
} \
9868
PyErr_Clear(); \
9869
TShadowTraits::TConstCppClassPtr constSelf; \
9870
if (TShadowTraits::getObject(iObject, constSelf) == 0)\
9871
{ \
9872
return ::lass::python::pyBuildSimpleObject(constSelf->i_cppGetter()); \
9873
} \
9874
return 0; \
9875
} \
9876
LASS_PYTHON_CATCH_AND_RETURN \
9877
}\
9878
LASS_EXECUTE_BEFORE_MAIN_EX\
9879
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
9880
t_cppClass::_lassPyClassDef.addGetSetter(\
9881
s_memberName, s_doc,\
9882
LASS_CONCATENATE(i_dispatcher, _getter), 0);\
9883
)
9884
9885
9886
/** @brief Export a getter as a read-only Python property, with custom name and docstring.
9887
* @ingroup ClassMembers
9888
*
9889
* Wraps PY_CLASS_MEMBER_R_EX() with auto-generated dispatcher name.
9890
*
9891
* @param i_cppClass C++ class containing the getter method (unqualified name)
9892
* @param i_cppGetter C++ method name of getter
9893
* @param s_memberName Python property name (null-terminated C string literal)
9894
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
9895
*
9896
* @par Example
9897
* ```cpp
9898
* PY_CLASS_MEMBER_R_DOC(Parrot, isAlive, "alive", "True if the parrot is not dead")
9899
* ```
9900
*/
9901
#define PY_CLASS_MEMBER_R_NAME_DOC(i_cppClass, i_cppGetter, s_memberName, s_doc)\
9902
PY_CLASS_MEMBER_R_EX(i_cppClass, i_cppGetter, s_memberName, s_doc,\
9903
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_memberR, i_cppClass)))
9904
9905
/** @brief Export a getter as a read-only Python property, with custom Python name.
9906
* @ingroup ClassMembers
9907
*
9908
* Wraps PY_CLASS_MEMBER_R_NAME_DOC() with @a s_doc = `nullptr`.
9909
*
9910
* @param i_cppClass C++ class containing the getter method (unqualified name)
9911
* @param i_cppGetter C++ method name of getter
9912
* @param s_memberName Python property name (null-terminated C string literal)
9913
*
9914
* @par Example
9915
* ```cpp
9916
* PY_CLASS_MEMBER_R_DOC(Parrot, isAlive, "alive")
9917
* ```
9918
*/
9919
#define PY_CLASS_MEMBER_R_NAME(i_cppClass, i_cppGetter, s_memberName)\
9920
PY_CLASS_MEMBER_R_NAME_DOC(i_cppClass, i_cppGetter, s_memberName, 0)
9921
9922
/** @brief Export a getter as a read-only Python property, with docstring.
9923
* @ingroup ClassMembers
9924
*
9925
* Wraps PY_CLASS_MEMBER_R_NAME_DOC() with s_memberName derived from i_cppGetter.
9926
*
9927
* @param i_cppClass C++ class containing the getter method (unqualified name)
9928
* @param i_cppGetter C++ method name of getter (also used as Python property name)
9929
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
9930
*
9931
* @par Example
9932
* ```cpp
9933
* PY_CLASS_MEMBER_R_DOC(Parrot, alive, "True if the parrot is not dead")
9934
* ```
9935
*/
9936
#define PY_CLASS_MEMBER_R_DOC(i_cppClass, i_cppGetter, s_doc)\
9937
PY_CLASS_MEMBER_R_NAME_DOC(i_cppClass, i_cppGetter, LASS_STRINGIFY(i_cppGetter), s_doc)
9938
9939
/** @brief Export a getter as a read-only Python property.
9940
* @ingroup ClassMembers
9941
*
9942
* Wraps PY_CLASS_MEMBER_R_DOC() with method name as property name and no documentation.
9943
*
9944
* @param i_cppClass C++ class containing the getter method (unqualified name)
9945
* @param i_cppGetter C++ method name of getter (also used as Python property name)
9946
*
9947
* @par Example
9948
* ```cpp
9949
* PY_CLASS_MEMBER_R_DOC(Parrot, alive)
9950
* ```
9951
*/
9952
#define PY_CLASS_MEMBER_R(i_cppClass, i_cppGetter)\
9953
PY_CLASS_MEMBER_R_DOC(i_cppClass, i_cppGetter, 0)
9954
9955
/** @} */
9956
9957
9958
9959
/** @addtogroup ClassMembers
9960
* @name Free Function Properties
9961
*
9962
* Export C/C++ free functions as Python properties.
9963
*
9964
* Use these when the getter/setter can't be a member. This is particularly useful for
9965
* @ref ShadowClasses where adding methods directly to the class is undesirable or impossible.
9966
*
9967
* @par Example
9968
* ```cpp
9969
* class Parrot
9970
* {
9971
* PY_HEADER(python::PyObjectPlus)
9972
* public:
9973
* std::string name;
9974
* };
9975
*
9976
* int getName(const Parrot& self)
9977
* {
9978
* return self.name;
9979
* }
9980
* void setName(Parrot& self, const std::string& name)
9981
* {
9982
* self.name = name;
9983
* }
9984
*
9985
* PY_DECLARE_CLASS(Foo)
9986
* PY_CLASS_FREE_MEMBER_RW_NAME(Parrot, getName, setName, "parrot")
9987
* ```
9988
*
9989
* @note Member exports cannot be overloaded on types, and there are no qualified versions of these
9990
* macros.
9991
*
9992
* @{
9993
*/
9994
9995
/** @brief Export free accessors as a read-write Python property, with full control.
9996
* @ingroup ClassMembers
9997
*
9998
* Exports a pair of free functions as read/write Python property. Unlike member method-based
9999
* macros, this uses standalone functions that take the object as their first parameter.
10000
*
10001
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
10002
*
10003
* @param t_cppClass C++ class to add the property to
10004
* @param i_cppFreeGetter Free getter function
10005
* @param i_cppFreeSetter Free setter function
10006
* @param s_memberName Python property name (null-terminated C string literal)
10007
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10008
* @param i_dispatcher Unique identifier for the generated dispatcher functions
10009
*
10010
* @par Example
10011
* ```cpp
10012
* PY_CLASS_FREE_MEMBER_RW_EX(Parrot, getName, setName, "name", "Parrot's name", parrot_name)
10013
* ```
10014
*/
10015
#define PY_CLASS_FREE_MEMBER_RW_EX( t_cppClass, i_cppFreeGetter, i_cppFreeSetter, s_memberName, s_doc, i_dispatcher)\
10016
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE(i_dispatcher, _getter)( PyObject* iObject, void* )\
10017
{\
10018
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
10019
return ::lass::python::impl::CallMethod<TShadowTraits>::freeGet( iObject, i_cppFreeGetter );\
10020
}\
10021
extern "C" int LASS_CONCATENATE(i_dispatcher, _setter)( PyObject* iObject, PyObject* iArgs, void* )\
10022
{\
10023
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
10024
return ::lass::python::impl::CallMethod<TShadowTraits>::freeSet( iArgs, iObject, i_cppFreeSetter );\
10025
}\
10026
LASS_EXECUTE_BEFORE_MAIN_EX\
10027
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
10028
t_cppClass ::_lassPyClassDef.addGetSetter(\
10029
s_memberName, s_doc,\
10030
LASS_CONCATENATE(i_dispatcher, _getter), LASS_CONCATENATE(i_dispatcher, _setter));\
10031
)
10032
10033
/** @brief Export free accessors as a read-write Python property, with custom name and docstring.
10034
* @ingroup ClassMembers
10035
*
10036
* Wraps PY_CLASS_FREE_MEMBER_RW_EX() with auto-generated dispatcher name.
10037
*
10038
* @param i_cppClass C++ class to add the property to (unqualified name)
10039
* @param i_cppFreeGetter Free getter function
10040
* @param i_cppFreeSetter Free setter function
10041
* @param s_memberName Python property name (null-terminated C string literal)
10042
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10043
*
10044
* @par Example
10045
* ```cpp
10046
* PY_CLASS_FREE_MEMBER_RW_NAME_DOC(Parrot, getName, setName, "name", "Parrot's name")
10047
* ```
10048
*/
10049
#define PY_CLASS_FREE_MEMBER_RW_NAME_DOC(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, s_memberName, s_doc)\
10050
PY_CLASS_FREE_MEMBER_RW_EX(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, s_memberName, s_doc,\
10051
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_freeMemberRW, i_cppClass)))
10052
10053
/** @brief Export free accessors as a read-write Python property, with custom Python name.
10054
* @ingroup ClassMembers
10055
*
10056
* Wraps PY_CLASS_FREE_MEMBER_RW_NAME_DOC() with no documentation.
10057
*
10058
* @param i_cppClass C++ class to add the property to (unqualified name)
10059
* @param i_cppFreeGetter Free getter function
10060
* @param i_cppFreeSetter Free setter function
10061
* @param s_memberName Python property name (null-terminated C string literal)
10062
*
10063
* @par Example
10064
* ```cpp
10065
* PY_CLASS_FREE_MEMBER_RW_NAME_DOC(Parrot, getName, setName, "name")
10066
* ```
10067
*/
10068
#define PY_CLASS_FREE_MEMBER_RW_NAME(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, s_memberName)\
10069
PY_CLASS_FREE_MEMBER_RW_NAME_DOC(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, s_memberName, 0)
10070
10071
/** @brief Export free accessors as a read-write Python property, with docstring.
10072
* @ingroup ClassMembers
10073
*
10074
* Wraps PY_CLASS_FREE_MEMBER_RW_NAME_DOC() with function name as property name.
10075
*
10076
* @param i_cppClass C++ class to add the property to (unqualified name)
10077
* @param i_cppFreeGetter Free getter function (also used as Python property name)
10078
* @param i_cppFreeSetter Free setter function
10079
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10080
*
10081
* @par Example
10082
* ```cpp
10083
* PY_CLASS_FREE_MEMBER_RW_DOC(Parrot, name, setName, "Parrot's name")
10084
* ```
10085
*/
10086
#define PY_CLASS_FREE_MEMBER_RW_DOC(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, s_doc)\
10087
PY_CLASS_FREE_MEMBER_RW_NAME_DOC(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, LASS_STRINGIFY(i_cppFreeGetter), s_doc)
10088
10089
/** @brief Export free accessors as a read-write Python property.
10090
* @ingroup ClassMembers
10091
*
10092
* Wraps PY_CLASS_FREE_MEMBER_RW_DOC() with function name as property name and no documentation.
10093
*
10094
* @param i_cppClass C++ class to add the property to (unqualified name)
10095
* @param i_cppFreeGetter Free getter function (also used as Python property name)
10096
* @param i_cppFreeSetter Free setter function
10097
*
10098
* @par Example
10099
* ```cpp
10100
* PY_CLASS_FREE_MEMBER_RW_DOC(Parrot, name, setName)
10101
* ```
10102
*/
10103
#define PY_CLASS_FREE_MEMBER_RW(i_cppClass, i_cppFreeGetter, i_cppFreeSetter)\
10104
PY_CLASS_FREE_MEMBER_RW_DOC(i_cppClass, i_cppFreeGetter, i_cppFreeSetter, 0)
10105
10106
10107
10108
/** @brief Export a free accessor as a read-only Python property, with full control.
10109
* @ingroup ClassMembers
10110
*
10111
* Exports a free function as read-only Python property. Unlike member method-based macros, this
10112
* uses a standalone function that takes the object as its first parameter.
10113
*
10114
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
10115
*
10116
* @param t_cppClass C++ class to add the property to
10117
* @param i_cppFreeGetter Free getter function
10118
* @param s_memberName Python property name (null-terminated C string literal)
10119
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10120
* @param i_dispatcher Unique identifier for the generated dispatcher functions
10121
*
10122
* @par Example
10123
* ```cpp
10124
* PY_CLASS_FREE_MEMBER_R_EX(Parrot, getColor, "color", "Parrot's color", parrot_color)
10125
* ```
10126
*/
10127
#define PY_CLASS_FREE_MEMBER_R_EX( t_cppClass, i_cppFreeGetter, s_memberName, s_doc, i_dispatcher )\
10128
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE(i_dispatcher, _getter)( PyObject* iObject, void* )\
10129
{\
10130
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
10131
return ::lass::python::impl::CallMethod<TShadowTraits>::freeGet( iObject, i_cppFreeGetter );\
10132
}\
10133
LASS_EXECUTE_BEFORE_MAIN_EX\
10134
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
10135
t_cppClass ::_lassPyClassDef.addGetSetter(\
10136
s_memberName, s_doc,\
10137
LASS_CONCATENATE(i_dispatcher, _getter), 0);\
10138
)
10139
10140
/** @brief Export a free accessor as a read-only Python property, with custom name and docstring.
10141
* @ingroup ClassMembers
10142
*
10143
* Wraps PY_CLASS_FREE_MEMBER_R_EX() with auto-generated dispatcher name.
10144
*
10145
* @param i_cppClass C++ class to add the property to (unqualified name)
10146
* @param i_cppFreeGetter Free getter function
10147
* @param s_memberName Python property name (null-terminated C string literal)
10148
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10149
*
10150
* @par Example
10151
* ```cpp
10152
* PY_CLASS_FREE_MEMBER_R_NAME_DOC(Parrot, getColor, "color", "Parrot's color")
10153
* ```
10154
*/
10155
#define PY_CLASS_FREE_MEMBER_R_NAME_DOC(i_cppClass, i_cppFreeGetter, s_memberName, s_doc)\
10156
PY_CLASS_FREE_MEMBER_R_EX(i_cppClass, i_cppFreeGetter, s_memberName, s_doc,\
10157
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_freeMemberR, i_cppClass)))
10158
10159
/** @brief Export a free accessor as a read-only Python property, with custom Python name.
10160
* @ingroup ClassMembers
10161
*
10162
* Wraps PY_CLASS_FREE_MEMBER_R_NAME_DOC() with no documentation.
10163
*
10164
* @param i_cppClass C++ class to add the property to (unqualified name)
10165
* @param i_cppFreeGetter Free getter function
10166
* @param s_memberName Python property name (null-terminated C string literal)
10167
*
10168
* @par Example
10169
* ```cpp
10170
* PY_CLASS_FREE_MEMBER_R_NAME(Parrot, getColor, "color")
10171
* ```
10172
*/
10173
#define PY_CLASS_FREE_MEMBER_R_NAME(i_cppClass, i_cppFreeGetter, s_memberName)\
10174
PY_CLASS_FREE_MEMBER_R_NAME_DOC(i_cppClass, i_cppFreeGetter, s_memberName, 0)
10175
10176
/** @brief Export a free accessor as a read-only Python property, with docstring.
10177
* @ingroup ClassMembers
10178
*
10179
* Wraps PY_CLASS_FREE_MEMBER_R_NAME_DOC() with function name as property name.
10180
*
10181
* @param i_cppClass C++ class to add the property to (unqualified name)
10182
* @param i_cppFreeGetter Free getter function (also used as Python property name)
10183
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10184
*
10185
* @par Example
10186
* ```cpp
10187
* PY_CLASS_FREE_MEMBER_R_DOC(Parrot, color, "Parrot's color")
10188
* ```
10189
*/
10190
#define PY_CLASS_FREE_MEMBER_R_DOC(i_cppClass, i_cppFreeGetter, s_doc)\
10191
PY_CLASS_FREE_MEMBER_R_NAME_DOC(i_cppClass, i_cppFreeGetter, LASS_STRINGIFY(i_cppFreeGetter), s_doc)
10192
10193
/** @brief Export a free accessor as a read-only Python property.
10194
* @ingroup ClassMembers
10195
*
10196
* Wraps PY_CLASS_FREE_MEMBER_R_DOC() with function name as property name and no documentation.
10197
*
10198
* @param i_cppClass C++ class to add the property to (unqualified name)
10199
* @param i_cppFreeGetter Free getter function (also used as Python property name)
10200
*
10201
* @par Example
10202
* ```cpp
10203
* PY_CLASS_FREE_MEMBER_R(Parrot, color)
10204
* ```
10205
*/
10206
#define PY_CLASS_FREE_MEMBER_R(i_cppClass, i_cppFreeGetter)\
10207
PY_CLASS_FREE_MEMBER_R_DOC(i_cppClass, i_cppFreeGetter, 0)
10208
10209
/** @} */
10210
10211
10212
10213
/** @addtogroup ClassMembers
10214
* @name Public Member Properties
10215
*
10216
* Exports a public data member directly as a Python property, allowing both read and write access.
10217
* This provides direct access to the C++ member variable without requiring getter/setter methods.
10218
*
10219
* @par Example
10220
* ```cpp
10221
* class Parrot
10222
* {
10223
* PY_HEADER(python::PyObjectPlus)
10224
* public:
10225
* std::string name;
10226
* const Color color;
10227
* };
10228
*
10229
* PY_DECLARE_CLASS(Parrot)
10230
* PY_CLASS_PUBLIC_MEMBER_DOC(Parrot, name, "Parrot's name")
10231
* PY_CLASS_PUBLIC_MEMBER_R(Parrot, color)
10232
* ```
10233
*
10234
* @note Member exports cannot be overloaded on types, and there are no qualified versions of these
10235
* macros.
10236
*
10237
* @{
10238
*/
10239
10240
/** @brief Export a public member as a read-write Python property, with full control.
10241
* @ingroup ClassMembers
10242
*
10243
* Exports a public data member directly as a Python property, allowing both read and write access.
10244
* This provides direct access to the C++ member variable without requiring getter/setter methods.
10245
*
10246
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
10247
*
10248
* @param t_cppClass C++ class containing the public member
10249
* @param i_cppMember C++ public data member name to export
10250
* @param s_memberName Python property name (null-terminated C string literal)
10251
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10252
* @param i_dispatcher Unique identifier for the generated dispatcher functions
10253
*
10254
* @par Example
10255
* ```cpp
10256
* PY_CLASS_PUBLIC_MEMBER_EX(Parrot, name, "name", "Parrot's name", parrot_name)
10257
* ```
10258
*/
10259
#define PY_CLASS_PUBLIC_MEMBER_EX(t_cppClass, i_cppMember, s_memberName, s_doc, i_dispatcher)\
10260
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE(i_dispatcher, _getter)(PyObject* obj, void* )\
10261
{\
10262
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
10263
TShadowTraits::TConstCppClassPtr self;\
10264
if (TShadowTraits::getObject(obj, self) != 0)\
10265
{\
10266
return 0;\
10267
}\
10268
return lass::python::pyBuildSimpleObject(self->i_cppMember);\
10269
}\
10270
extern "C" LASS_DLL_LOCAL int LASS_CONCATENATE(i_dispatcher, _setter)(PyObject* obj,PyObject* args, void* )\
10271
{\
10272
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
10273
TShadowTraits::TCppClassPtr self;\
10274
if (TShadowTraits::getObject(obj, self) != 0)\
10275
{\
10276
return -1;\
10277
}\
10278
return -::lass::python::pyGetSimpleObject(args, self->i_cppMember);\
10279
}\
10280
LASS_EXECUTE_BEFORE_MAIN_EX\
10281
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
10282
t_cppClass ::_lassPyClassDef.addGetSetter(\
10283
s_memberName, s_doc,\
10284
LASS_CONCATENATE(i_dispatcher, _getter), LASS_CONCATENATE(i_dispatcher, _setter));\
10285
)
10286
10287
/** @brief Export a public member as a read-write Python property, with custom name and docstring.
10288
* @ingroup ClassMembers
10289
*
10290
* Wraps PY_CLASS_PUBLIC_MEMBER_EX() with auto-generated dispatcher name.
10291
*
10292
* @param i_cppClass C++ class containing the public member (unqualified name)
10293
* @param i_cppMember C++ public data member name to export
10294
* @param s_memberName Python property name (null-terminated C string literal)
10295
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10296
*
10297
* @par Example
10298
* ```cpp
10299
* PY_CLASS_PUBLIC_MEMBER_NAME_DOC(Parrot, name, "name", "Parrot's name")
10300
* ```
10301
*/
10302
#define PY_CLASS_PUBLIC_MEMBER_NAME_DOC( i_cppClass, i_cppMember, s_memberName, s_doc )\
10303
PY_CLASS_PUBLIC_MEMBER_EX( i_cppClass, i_cppMember, s_memberName, s_doc,\
10304
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_publicMember_, i_cppClass)))
10305
10306
/** @brief Export a public member as a read-write Python property, with custom Python name.
10307
* @ingroup ClassMembers
10308
*
10309
* Wraps PY_CLASS_PUBLIC_MEMBER_NAME_DOC() with no documentation.
10310
*
10311
* @param i_cppClass C++ class containing the public member (unqualified name)
10312
* @param i_cppMember C++ public data member name to export
10313
* @param s_memberName Python property name (null-terminated C string literal)
10314
*
10315
* @par Example
10316
* ```cpp
10317
* PY_CLASS_PUBLIC_MEMBER_NAME(Parrot, name, "name")
10318
* ```
10319
*/
10320
#define PY_CLASS_PUBLIC_MEMBER_NAME( i_cppClass, i_cppMember, s_memberName )\
10321
PY_CLASS_PUBLIC_MEMBER_NAME_DOC( i_cppClass, i_cppMember, s_memberName, 0 )
10322
10323
/** @brief Export a public member as a read-write Python property, with docstring.
10324
* @ingroup ClassMembers
10325
*
10326
* Wraps PY_CLASS_PUBLIC_MEMBER_NAME_DOC() with member name as property name.
10327
*
10328
* @param i_cppClass C++ class containing the public member (unqualified name)
10329
* @param i_cppMember C++ public data member name to export (also used as Python property name)
10330
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10331
*
10332
* @par Example
10333
* ```cpp
10334
* PY_CLASS_PUBLIC_MEMBER_NAME_DOC(Parrot, name, "name")
10335
* ```
10336
*/
10337
#define PY_CLASS_PUBLIC_MEMBER_DOC( i_cppClass, i_cppMember , s_doc)\
10338
PY_CLASS_PUBLIC_MEMBER_NAME_DOC( i_cppClass, i_cppMember, LASS_STRINGIFY(i_cppMember), s_doc )
10339
10340
/** @brief Export a public member as a read-write Python property.
10341
* @ingroup ClassMembers
10342
*
10343
* Wraps PY_CLASS_PUBLIC_MEMBER_NAME_DOC() with member name as property name and no documentation.
10344
*
10345
* @param i_cppClass C++ class containing the public member (unqualified name)
10346
* @param i_cppMember C++ public data member name to export (also used as Python property name)
10347
*
10348
* @par Example
10349
* ```cpp
10350
* PY_CLASS_PUBLIC_MEMBER_NAME_DOC(Parrot, name)
10351
* ```
10352
*/
10353
#define PY_CLASS_PUBLIC_MEMBER( i_cppClass, i_cppMember )\
10354
PY_CLASS_PUBLIC_MEMBER_NAME_DOC( i_cppClass, i_cppMember, LASS_STRINGIFY(i_cppMember), 0 )
10355
10356
10357
10358
10359
/** @brief Export a public member as a read-only Python property, with full control.
10360
* @ingroup ClassMembers
10361
*
10362
* Exports a public data member directly as a read-only Python property, allowing only read access.
10363
* This provides direct read access to the C++ member variable without requiring a getter method.
10364
* Useful for const members or when write access should be restricted.
10365
*
10366
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
10367
*
10368
* @param t_cppClass C++ class containing the public member
10369
* @param i_cppMember C++ public data member name to export
10370
* @param s_memberName Python property name (null-terminated C string literal)
10371
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10372
* @param i_dispatcher Unique identifier for the generated dispatcher functions
10373
*
10374
* @par Example
10375
* ```cpp
10376
* PY_CLASS_PUBLIC_MEMBER_R_EX(Parrot, color, "color", "Parrot's color", parrot_color)
10377
* ```
10378
*/
10379
#define PY_CLASS_PUBLIC_MEMBER_R_EX( t_cppClass, i_cppMember, s_memberName, s_doc, i_dispatcher )\
10380
extern "C" LASS_DLL_LOCAL PyObject* LASS_CONCATENATE(i_dispatcher, _getter)(PyObject* obj, void* )\
10381
{\
10382
typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
10383
TShadowTraits::TConstCppClassPtr self;\
10384
if (TShadowTraits::getObject(obj, self) != 0)\
10385
{\
10386
return 0;\
10387
}\
10388
return lass::python::pyBuildSimpleObject(self->i_cppMember);\
10389
}\
10390
LASS_EXECUTE_BEFORE_MAIN_EX\
10391
( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
10392
t_cppClass ::_lassPyClassDef.addGetSetter(\
10393
s_memberName, s_doc,\
10394
LASS_CONCATENATE(i_dispatcher, _getter), nullptr);\
10395
)
10396
10397
/** @brief Export a public member as a read-only Python property, with custom name and docstring.
10398
* @ingroup ClassMembers
10399
*
10400
* Wraps PY_CLASS_PUBLIC_MEMBER_R_EX() with auto-generated dispatcher name.
10401
*
10402
* @param i_cppClass C++ class containing the public member (unqualified name)
10403
* @param i_cppMember C++ public data member name to export
10404
* @param s_memberName Python property name (null-terminated C string literal)
10405
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10406
*
10407
* @par Example
10408
* ```cpp
10409
* PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC(Parrot, color, "color", "Parrot's color")
10410
* ```
10411
*/
10412
#define PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC(i_cppClass, i_cppMember, s_memberName, s_doc)\
10413
PY_CLASS_PUBLIC_MEMBER_R_EX(i_cppClass, i_cppMember, s_memberName, s_doc,\
10414
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_publicMemberR_, i_cppClass)))
10415
10416
/** @brief Export a public member as a read-only Python property, with custom Python name.
10417
* @ingroup ClassMembers
10418
*
10419
* Wraps PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC() with no documentation.
10420
*
10421
* @param i_cppClass C++ class containing the public member (unqualified name)
10422
* @param i_cppMember C++ public data member name to export
10423
* @param s_memberName Python property name (null-terminated C string literal)
10424
*
10425
* @par Example
10426
* ```cpp
10427
* PY_CLASS_PUBLIC_MEMBER_R_NAME(Parrot, color, "color")
10428
* ```
10429
*/
10430
#define PY_CLASS_PUBLIC_MEMBER_R_NAME(i_cppClass, i_cppMember, s_memberName)\
10431
PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC(i_cppClass, i_cppMember, s_memberName, 0 )
10432
10433
/** @brief Export a public member as a read-only Python property, with docstring.
10434
* @ingroup ClassMembers
10435
*
10436
* Wraps PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC() with member name as property name.
10437
*
10438
* @param i_cppClass C++ class containing the public member (unqualified name)
10439
* @param i_cppMember C++ public data member name to export (also used as Python property name)
10440
* @param s_doc Property documentation string (null-terminated C string literal, may be nullptr)
10441
*
10442
* @par Example
10443
* ```cpp
10444
* PY_CLASS_PUBLIC_MEMBER_R_DOC(Parrot, color, "Parrot's color")
10445
* ```
10446
*/
10447
#define PY_CLASS_PUBLIC_MEMBER_R_DOC(i_cppClass, i_cppMember , s_doc)\
10448
PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC(i_cppClass, i_cppMember, LASS_STRINGIFY(i_cppMember), s_doc)
10449
10450
/** @brief Export a public member as a read-only Python property.
10451
* @ingroup ClassMembers
10452
*
10453
* Wraps PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC() with member name as property name and no documentation.
10454
*
10455
* @param i_cppClass C++ class containing the public member (unqualified name)
10456
* @param i_cppMember C++ public data member name to export (also used as Python property name)
10457
*
10458
* @par Example
10459
* ```cpp
10460
* PY_CLASS_PUBLIC_MEMBER_R_DOC(Parrot, color)
10461
* ```
10462
*/
10463
#define PY_CLASS_PUBLIC_MEMBER_R(i_cppClass, i_cppMember)\
10464
PY_CLASS_PUBLIC_MEMBER_R_NAME_DOC(i_cppClass, i_cppMember, LASS_STRINGIFY(i_cppMember), 0)
10465
10466
/** @} */
10467
10468
10469
// --- constructors --------------------------------------------------------------------------------
10470
10471
/** @defgroup ClassConstructors Constructor Export Macros
10472
* @ingroup ClassDefinition
10473
*
10474
* Export C++ constructors directly as Python class constructors.
10475
* These macros make abstract Python classes concrete by adding constructors
10476
* that can create instances from Python code using the actual C++ constructors.
10477
*
10478
* Besides exporting constructors from the C++ class directly as Python class constructors, you can
10479
* also export free or static factory functions that return a new instance of that class as a
10480
* constructor.
10481
*
10482
* @par Overloading
10483
*
10484
* Just like other functions, multiple constructors can be exported on the same class, to overload
10485
* them on the parameter types.
10486
*
10487
* @note Overload resolution uses first-fit, not best-fit like C++. The first exported constructor
10488
* that matches the arguments will be called.
10489
*
10490
* @par Naming and Documentation
10491
*
10492
* @note None of the constructor export macros allow you to specify a name or a docstring. The name
10493
* is fixed to `__init__`, and constructor documentation has to be added to the class'
10494
* docstring.
10495
*
10496
* @par Example
10497
*
10498
* ```cpp
10499
* class Parrot
10500
* {
10501
* PY_HEADER(lass::python::PyObjectPlus)
10502
* public:
10503
* Parrot();
10504
* Parrot(const std::string& name);
10505
* Parrot(const std::string& name, bool alive);
10506
* };
10507
*
10508
* Parrot makeParrot(bool alive);
10509
*
10510
* PY_DECLARE_CLASS(Parrot)
10511
*
10512
* PY_CLASS_CONSTRUCTOR_0(Parrot) // p = Parrot()
10513
* PY_CLASS_CONSTRUCTOR_1(Parrot, const std::string&) // p = Parrot("bird")
10514
* PY_CLASS_CONSTRUCTOR_2(Parrot, const std::string&, bool) // p = Parrot("bird", False)
10515
*
10516
* PY_CLASS_FREE_CONSTRUCTOR_1(Parrot, makeParrot, bool) // p = Parrot(True)
10517
* ```
10518
*/
10519
10520
/** @addtogroup ClassConstructors
10521
* @name Class Constructor Export Macros
10522
*
10523
* Constructors need to be fully qualified to be exported. You always need to provide the full list
10524
* of parameter types to disambiguate overloaded constructors. This is why there are no
10525
* `_QUALIFIED` versions of these macros, they already are fully qualified.
10526
*
10527
* The list of parameter types can be passed as a single lass::meta::TypeTuple, or as individual
10528
* arguments. For the latter, the `_<N>` tells the number of arguments. The `_<N>` form is the most
10529
* often used one, and simply packs its types into a `TypeTuple`.
10530
*
10531
* There's also the `_EX` form in case you need a custom dispatcher name, but that should be rarely
10532
* used.
10533
*
10534
* | Form | Fixed parameters | Adds parameters |
10535
* |----------------------------|------------------|-------------------------------------|
10536
* | `PY_CLASS_CONSTRUCTOR` | `i_cppClass` | `t_params` as lass::meta::TypeTuple |
10537
* | `PY_CLASS_CONSTRUCTOR_EX` | `t_cppClass` | `t_params`, `i_dispatcher` |
10538
* | `PY_CLASS_CONSTRUCTOR_<N>` | `i_cppClass` | `t_P1`, `t_P2`, ... `t_P<N>` |
10539
*
10540
* @{
10541
*/
10542
10543
/** @brief Export C++ constructor as Python class constructor with full control.
10544
* @ingroup ClassConstructors
10545
*
10546
* This macro provides the most flexible constructor export with manual dispatcher naming.
10547
*
10548
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
10549
*
10550
* @param t_cppClass C++ class to add the constructor to
10551
* @param t_params Constructor parameter types as lass::meta::TypeTuple (empty for none)
10552
* @param i_dispatcher Unique identifier for the generated dispatcher functions
10553
*
10554
* @par Example
10555
* ```cpp
10556
* using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
10557
* PY_CLASS_CONSTRUCTOR_EX(Parrot, TParrotArgs, parrot_constructor)
10558
* ```
10559
*/
10560
#define PY_CLASS_CONSTRUCTOR_EX( t_cppClass, t_params, i_dispatcher )\
10561
static newfunc LASS_CONCATENATE(i_dispatcher, _overloadChain) = 0;\
10562
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher(PyTypeObject *iSubtype, PyObject *iArgs, PyObject *iKwds)\
10563
{\
10564
if (LASS_CONCATENATE(i_dispatcher, _overloadChain))\
10565
{\
10566
PyObject* result = LASS_CONCATENATE(i_dispatcher, _overloadChain)(\
10567
iSubtype, iArgs, iKwds);\
10568
if (!(PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError)))\
10569
{\
10570
return result;\
10571
}\
10572
PyErr_Clear();\
10573
Py_XDECREF(result);\
10574
}\
10575
return ::lass::python::impl::ExplicitResolver\
10576
<\
10577
::lass::python::impl::ShadowTraits< t_cppClass >,\
10578
::lass::meta::NullType,\
10579
t_params\
10580
>\
10581
::callConstructor(iSubtype, iArgs);\
10582
}\
10583
LASS_EXECUTE_BEFORE_MAIN_EX( LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
10584
t_cppClass::_lassPyClassDef.addConstructor( \
10585
i_dispatcher, \
10586
LASS_CONCATENATE(i_dispatcher, _overloadChain) \
10587
); \
10588
)
10589
10590
/** @brief Export C++ constructor as Python class constructor.
10591
* @ingroup ClassConstructors
10592
*
10593
* Wraps PY_CLASS_CONSTRUCTOR_EX() with auto-generated dispatcher name.
10594
*
10595
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10596
* @param t_params lass::meta::TypeTuple of constructor parameter types
10597
*
10598
* @par Example
10599
* ```cpp
10600
* using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
10601
* PY_CLASS_CONSTRUCTOR(Parrot, TParrotArgs)
10602
* ```
10603
*/
10604
#define PY_CLASS_CONSTRUCTOR( i_cppClass, t_params )\
10605
PY_CLASS_CONSTRUCTOR_EX(i_cppClass, t_params,\
10606
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_constructor_, i_cppClass)))
10607
10608
/** @brief Export C++ default constructor as Python class constructor.
10609
* @ingroup ClassConstructors
10610
*
10611
* Convenience macro for exporting a parameterless C++ constructor.
10612
* Equivalent to PY_CLASS_CONSTRUCTOR(i_cppClass, meta::TypeTuple<>).
10613
*
10614
* @param i_cppClass C++ class to add the default constructor to (unqualified name)
10615
*
10616
* @par Example
10617
* ```cpp
10618
* PY_CLASS_CONSTRUCTOR_0(Parrot)
10619
* ```
10620
*/
10621
#define PY_CLASS_CONSTRUCTOR_0( i_cppClass )\
10622
PY_CLASS_CONSTRUCTOR( i_cppClass, ::lass::meta::TypeTuple<> )
10623
10624
/** @brief Export C++ constructor as Python class constructor with 1 parameters.
10625
* @ingroup ClassConstructors
10626
*
10627
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 1 parameters.
10628
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10629
*
10630
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10631
* @param t_P1 Parameter types for the constructor
10632
*
10633
* @par Example
10634
* ```cpp
10635
* PY_CLASS_CONSTRUCTOR_1(Parrot, T1)
10636
* ```
10637
*/
10638
#define PY_CLASS_CONSTRUCTOR_1( i_cppClass, t_P1 )\
10639
typedef ::lass::meta::TypeTuple< t_P1 > \
10640
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10641
PY_CLASS_CONSTRUCTOR(\
10642
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10643
10644
/** @brief Export C++ constructor as Python class constructor with 2 parameters.
10645
* @ingroup ClassConstructors
10646
*
10647
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 2 parameters.
10648
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10649
*
10650
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10651
* @param t_P1, t_P2 Parameter types for the constructor
10652
*
10653
* @par Example
10654
* ```cpp
10655
* PY_CLASS_CONSTRUCTOR_2(Parrot, T1, T2)
10656
* ```
10657
*/
10658
#define PY_CLASS_CONSTRUCTOR_2( i_cppClass, t_P1, t_P2 )\
10659
typedef ::lass::meta::TypeTuple< t_P1, t_P2 > \
10660
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10661
PY_CLASS_CONSTRUCTOR(\
10662
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10663
10664
/** @brief Export C++ constructor as Python class constructor with 3 parameters.
10665
* @ingroup ClassConstructors
10666
*
10667
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 3 parameters.
10668
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10669
*
10670
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10671
* @param t_P1, t_P2, t_P3 Parameter types for the constructor
10672
*
10673
* @par Example
10674
* ```cpp
10675
* PY_CLASS_CONSTRUCTOR_3(Parrot, T1, T2, T3)
10676
* ```
10677
*/
10678
#define PY_CLASS_CONSTRUCTOR_3( i_cppClass, t_P1, t_P2, t_P3 )\
10679
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3 > \
10680
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10681
PY_CLASS_CONSTRUCTOR(\
10682
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10683
10684
/** @brief Export C++ constructor as Python class constructor with 4 parameters.
10685
* @ingroup ClassConstructors
10686
*
10687
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 4 parameters.
10688
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10689
*
10690
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10691
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the constructor
10692
*
10693
* @par Example
10694
* ```cpp
10695
* PY_CLASS_CONSTRUCTOR_4(Parrot, T1, T2, T3, T4)
10696
* ```
10697
*/
10698
#define PY_CLASS_CONSTRUCTOR_4( i_cppClass, t_P1, t_P2, t_P3, t_P4 )\
10699
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4 > \
10700
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10701
PY_CLASS_CONSTRUCTOR(\
10702
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10703
10704
/** @brief Export C++ constructor as Python class constructor with 5 parameters.
10705
* @ingroup ClassConstructors
10706
*
10707
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 5 parameters.
10708
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10709
*
10710
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10711
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the constructor
10712
*
10713
* @par Example
10714
* ```cpp
10715
* PY_CLASS_CONSTRUCTOR_5(Parrot, T1, T2, T3, T4, T5)
10716
* ```
10717
*/
10718
#define PY_CLASS_CONSTRUCTOR_5( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5 )\
10719
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5 > \
10720
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10721
PY_CLASS_CONSTRUCTOR(\
10722
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10723
10724
/** @brief Export C++ constructor as Python class constructor with 6 parameters.
10725
* @ingroup ClassConstructors
10726
*
10727
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 6 parameters.
10728
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10729
*
10730
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10731
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the constructor
10732
*
10733
* @par Example
10734
* ```cpp
10735
* PY_CLASS_CONSTRUCTOR_6(Parrot, T1, T2, T3, T4, T5, T6)
10736
* ```
10737
*/
10738
#define PY_CLASS_CONSTRUCTOR_6( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 )\
10739
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 > \
10740
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10741
PY_CLASS_CONSTRUCTOR(\
10742
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10743
10744
/** @brief Export C++ constructor as Python class constructor with 7 parameters.
10745
* @ingroup ClassConstructors
10746
*
10747
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 7 parameters.
10748
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10749
*
10750
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10751
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the constructor
10752
*
10753
* @par Example
10754
* ```cpp
10755
* PY_CLASS_CONSTRUCTOR_7(Parrot, T1, T2, T3, T4, T5, T6, T7)
10756
* ```
10757
*/
10758
#define PY_CLASS_CONSTRUCTOR_7( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 )\
10759
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 > \
10760
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10761
PY_CLASS_CONSTRUCTOR(\
10762
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10763
10764
/** @brief Export C++ constructor as Python class constructor with 8 parameters.
10765
* @ingroup ClassConstructors
10766
*
10767
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 8 parameters.
10768
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10769
*
10770
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10771
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the constructor
10772
*
10773
* @par Example
10774
* ```cpp
10775
* PY_CLASS_CONSTRUCTOR_8(Parrot, T1, T2, T3, T4, T5, T6, T7, T8)
10776
* ```
10777
*/
10778
#define PY_CLASS_CONSTRUCTOR_8( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 )\
10779
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 > \
10780
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10781
PY_CLASS_CONSTRUCTOR(\
10782
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10783
10784
/** @brief Export C++ constructor as Python class constructor with 9 parameters.
10785
* @ingroup ClassConstructors
10786
*
10787
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 9 parameters.
10788
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10789
*
10790
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10791
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the constructor
10792
*
10793
* @par Example
10794
* ```cpp
10795
* PY_CLASS_CONSTRUCTOR_9(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9)
10796
* ```
10797
*/
10798
#define PY_CLASS_CONSTRUCTOR_9( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 )\
10799
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 > \
10800
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10801
PY_CLASS_CONSTRUCTOR(\
10802
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10803
10804
/** @brief Export C++ constructor as Python class constructor with 10 parameters.
10805
* @ingroup ClassConstructors
10806
*
10807
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 10 parameters.
10808
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10809
*
10810
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10811
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the constructor
10812
*
10813
* @par Example
10814
* ```cpp
10815
* PY_CLASS_CONSTRUCTOR_10(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
10816
* ```
10817
*/
10818
#define PY_CLASS_CONSTRUCTOR_10( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 )\
10819
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 > \
10820
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10821
PY_CLASS_CONSTRUCTOR(\
10822
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10823
10824
/** @brief Export C++ constructor as Python class constructor with 11 parameters.
10825
* @ingroup ClassConstructors
10826
*
10827
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 11 parameters.
10828
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10829
*
10830
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10831
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the constructor
10832
*
10833
* @par Example
10834
* ```cpp
10835
* PY_CLASS_CONSTRUCTOR_11(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
10836
* ```
10837
*/
10838
#define PY_CLASS_CONSTRUCTOR_11( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 )\
10839
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 > \
10840
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10841
PY_CLASS_CONSTRUCTOR(\
10842
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10843
10844
/** @brief Export C++ constructor as Python class constructor with 12 parameters.
10845
* @ingroup ClassConstructors
10846
*
10847
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 12 parameters.
10848
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10849
*
10850
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10851
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the constructor
10852
*
10853
* @par Example
10854
* ```cpp
10855
* PY_CLASS_CONSTRUCTOR_12(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
10856
* ```
10857
*/
10858
#define PY_CLASS_CONSTRUCTOR_12( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 )\
10859
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 > \
10860
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10861
PY_CLASS_CONSTRUCTOR(\
10862
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10863
10864
/** @brief Export C++ constructor as Python class constructor with 13 parameters.
10865
* @ingroup ClassConstructors
10866
*
10867
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 13 parameters.
10868
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10869
*
10870
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10871
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the constructor
10872
*
10873
* @par Example
10874
* ```cpp
10875
* PY_CLASS_CONSTRUCTOR_13(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
10876
* ```
10877
*/
10878
#define PY_CLASS_CONSTRUCTOR_13( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 )\
10879
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 > \
10880
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10881
PY_CLASS_CONSTRUCTOR(\
10882
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10883
10884
/** @brief Export C++ constructor as Python class constructor with 14 parameters.
10885
* @ingroup ClassConstructors
10886
*
10887
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 14 parameters.
10888
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10889
*
10890
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10891
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the constructor
10892
*
10893
* @par Example
10894
* ```cpp
10895
* PY_CLASS_CONSTRUCTOR_14(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
10896
* ```
10897
*/
10898
#define PY_CLASS_CONSTRUCTOR_14( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 )\
10899
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 > \
10900
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10901
PY_CLASS_CONSTRUCTOR(\
10902
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10903
10904
/** @brief Export C++ constructor as Python class constructor with 15 parameters.
10905
* @ingroup ClassConstructors
10906
*
10907
* Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 15 parameters.
10908
* Automatically creates the required lass::meta::TypeTuple from the parameter types.
10909
*
10910
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10911
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the constructor
10912
*
10913
* @par Example
10914
* ```cpp
10915
* PY_CLASS_CONSTRUCTOR_15(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
10916
* ```
10917
*/
10918
#define PY_CLASS_CONSTRUCTOR_15( i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 )\
10919
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 > \
10920
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
10921
PY_CLASS_CONSTRUCTOR(\
10922
i_cppClass, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
10923
10924
10925
/** @} */
10926
10927
10928
/** @addtogroup ClassConstructors
10929
* @name Free Function Constructor Export Macros
10930
*
10931
* Export factory functions as Python class constructors. These macros allow C++ functions that
10932
* return instances of a class to be used as Python constructors. This is useful when you need
10933
* special construction logic or when the actual constructor is not accessible from Python. The
10934
* functions must return an instance of the target class.
10935
*
10936
* | Form | Fixed parameters | Adds parameters |
10937
* |---------------------------------|-------------------------------|-------------------------------------|
10938
* | `PY_CLASS_FREE_CONSTRUCTOR` | `i_cppClass`, `f_cppFunction` | `t_params` as lass::meta::TypeTuple |
10939
* | `PY_CLASS_FREE_CONSTRUCTOR_EX` | `t_cppClass`, `f_cppFunction` | `t_params`, `i_dispatcher` |
10940
* | `PY_CLASS_FREE_CONSTRUCTOR_<N>` | `i_cppClass`, `f_cppFunction` | `t_P1`, `t_P2`, ... `t_P<N>` |
10941
*
10942
* @{
10943
*/
10944
10945
/** @brief Export free/static C++ factory function as Python constructor with full control.
10946
* @ingroup ClassConstructors
10947
*
10948
* The most detailed macro for exporting factory functions as constructors. Allows manual
10949
* specification of all parameters including the dispatcher name for maximum control over the
10950
* export process.
10951
*
10952
* Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.
10953
*
10954
* @param t_cppClass C++ class to add the constructor to
10955
* @param f_cppFunction Free or static factory function that creates the class instance
10956
* @param t_params Constructor parameter types as lass::meta::TypeTuple (empty for none)
10957
* @param i_dispatcher Unique identifier for the generated dispatcher functions
10958
*
10959
* @par Example
10960
* ```cpp
10961
* Parrot makeParrot(const std::string&, bool);
10962
* using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
10963
* PY_CLASS_FREE_CONSTRUCTOR_EX(Parrot, makeParrot, TParrotArgs, parrot_free_constructor)
10964
* ```
10965
*/
10966
#define PY_CLASS_FREE_CONSTRUCTOR_EX( t_cppClass, f_cppFunction, t_params, i_dispatcher )\
10967
static newfunc LASS_CONCATENATE(i_dispatcher, _overloadChain) = 0;\
10968
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher( PyTypeObject *iSubtype, PyObject *iArgs, PyObject *iKwds )\
10969
{\
10970
if (LASS_CONCATENATE(i_dispatcher, _overloadChain))\
10971
{\
10972
PyObject* result = LASS_CONCATENATE(i_dispatcher, _overloadChain)(iSubtype, iArgs, iKwds);\
10973
if (!(PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError)))\
10974
{\
10975
return result;\
10976
}\
10977
PyErr_Clear();\
10978
Py_XDECREF(result);\
10979
}\
10980
return ::lass::python::impl::callFunction( iArgs, f_cppFunction );\
10981
}\
10982
LASS_EXECUTE_BEFORE_MAIN_EX(LASS_CONCATENATE(i_dispatcher, _executeBeforeMain), \
10983
t_cppClass::_lassPyClassDef.addConstructor(\
10984
i_dispatcher, \
10985
LASS_CONCATENATE(i_dispatcher, _overloadChain) \
10986
); \
10987
)
10988
10989
/** @brief Export free/static C++ factory function as Python class constructor.
10990
* @ingroup ClassConstructors
10991
*
10992
* Wraps PY_CLASS_FREE_CONSTRUCTOR_EX() with auto-generated dispatcher name.
10993
*
10994
* @param i_cppClass C++ class to add the constructor to (unqualified name)
10995
* @param f_cppFunction Free or static factory function that creates the class instance
10996
* @param t_params Constructor parameter types as lass::meta::TypeTuple (empty for none)
10997
*
10998
* @par Example
10999
* ```cpp
11000
* Parrot makeParrot(const std::string&, bool);
11001
* using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
11002
* PY_CLASS_FREE_CONSTRUCTOR(Parrot, makeParrot, TParrotArgs)
11003
* ```
11004
*/
11005
#define PY_CLASS_FREE_CONSTRUCTOR( i_cppClass, f_cppFunction, t_params )\
11006
PY_CLASS_FREE_CONSTRUCTOR_EX(i_cppClass, f_cppFunction, t_params,\
11007
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_constructor_, i_cppClass)))
11008
11009
/** @brief Export free/static C++ factory function as Python constructor with 0 parameters.
11010
* @ingroup ClassConstructors
11011
*
11012
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes no parameters.
11013
*
11014
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11015
* @param f_cppFunction Free or static factory function that creates the class instance
11016
*
11017
* @par Example
11018
* ```cpp
11019
* Parrot makeParrot();
11020
* PY_CLASS_FREE_CONSTRUCTOR_0(Parrot, makeParrot)
11021
* ```
11022
*/
11023
#define PY_CLASS_FREE_CONSTRUCTOR_0( i_cppClass, f_cppFunction)\
11024
PY_CLASS_FREE_CONSTRUCTOR( i_cppClass, f_cppFunction, ::lass::meta::TypeTuple<> )
11025
11026
/** @brief Export free/static C++ factory function as Python constructor with 1 parameters.
11027
* @ingroup ClassConstructors
11028
*
11029
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 1
11030
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11031
*
11032
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11033
* @param f_cppFunction Free or static factory function that creates the class instance
11034
* @param t_P1 Parameter types for the constructor
11035
*
11036
* @par Example
11037
* ```cpp
11038
* Parrot makeParrot(T1);
11039
* PY_CLASS_FREE_CONSTRUCTOR_1(Parrot, makeParrot, T1)
11040
* ```
11041
*/
11042
#define PY_CLASS_FREE_CONSTRUCTOR_1( i_cppClass, f_cppFunction, t_P1 )\
11043
typedef ::lass::meta::TypeTuple< t_P1 > \
11044
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11045
PY_CLASS_FREE_CONSTRUCTOR(\
11046
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11047
11048
/** @brief Export free/static C++ factory function as Python constructor with 2 parameters.
11049
* @ingroup ClassConstructors
11050
*
11051
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 2
11052
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11053
*
11054
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11055
* @param f_cppFunction Free or static factory function that creates the class instance
11056
* @param t_P1, t_P2 Parameter types for the constructor
11057
*
11058
* @par Example
11059
* ```cpp
11060
* Parrot makeParrot(T1, T2);
11061
* PY_CLASS_FREE_CONSTRUCTOR_2(Parrot, makeParrot, T1, T2)
11062
* ```
11063
*/
11064
#define PY_CLASS_FREE_CONSTRUCTOR_2( i_cppClass, f_cppFunction, t_P1, t_P2 )\
11065
typedef ::lass::meta::TypeTuple< t_P1, t_P2 > \
11066
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11067
PY_CLASS_FREE_CONSTRUCTOR(\
11068
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11069
11070
/** @brief Export free/static C++ factory function as Python constructor with 3 parameters.
11071
* @ingroup ClassConstructors
11072
*
11073
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 3
11074
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11075
*
11076
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11077
* @param f_cppFunction Free or static factory function that creates the class instance
11078
* @param t_P1, t_P2, t_P3 Parameter types for the constructor
11079
*
11080
* @par Example
11081
* ```cpp
11082
* Parrot makeParrot(T1, T2, T3);
11083
* PY_CLASS_FREE_CONSTRUCTOR_3(Parrot, makeParrot, T1, T2, T3)
11084
* ```
11085
*/
11086
#define PY_CLASS_FREE_CONSTRUCTOR_3( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3 )\
11087
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3 > \
11088
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11089
PY_CLASS_FREE_CONSTRUCTOR(\
11090
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11091
11092
/** @brief Export free/static C++ factory function as Python constructor with 4 parameters.
11093
* @ingroup ClassConstructors
11094
*
11095
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 4
11096
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11097
*
11098
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11099
* @param f_cppFunction Free or static factory function that creates the class instance
11100
* @param t_P1, t_P2, t_P3, t_P4 Parameter types for the constructor
11101
*
11102
* @par Example
11103
* ```cpp
11104
* Parrot makeParrot(T1, T2, T3, T4);
11105
* PY_CLASS_FREE_CONSTRUCTOR_4(Parrot, makeParrot, T1, T2, T3, T4)
11106
* ```
11107
*/
11108
#define PY_CLASS_FREE_CONSTRUCTOR_4( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4 )\
11109
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4 > \
11110
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11111
PY_CLASS_FREE_CONSTRUCTOR(\
11112
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11113
11114
/** @brief Export free/static C++ factory function as Python constructor with 5 parameters.
11115
* @ingroup ClassConstructors
11116
*
11117
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 5
11118
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11119
*
11120
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11121
* @param f_cppFunction Free or static factory function that creates the class instance
11122
* @param t_P1, t_P2, t_P3, t_P4, t_P5 Parameter types for the constructor
11123
*
11124
* @par Example
11125
* ```cpp
11126
* Parrot makeParrot(T1, T2, T3, T4, T5);
11127
* PY_CLASS_FREE_CONSTRUCTOR_5(Parrot, makeParrot, T1, T2, T3, T4, T5)
11128
* ```
11129
*/
11130
#define PY_CLASS_FREE_CONSTRUCTOR_5( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5 )\
11131
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5 > \
11132
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11133
PY_CLASS_FREE_CONSTRUCTOR(\
11134
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11135
11136
/** @brief Export free/static C++ factory function as Python constructor with 6 parameters.
11137
* @ingroup ClassConstructors
11138
*
11139
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 6
11140
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11141
*
11142
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11143
* @param f_cppFunction Free or static factory function that creates the class instance
11144
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 Parameter types for the constructor
11145
*
11146
* @par Example
11147
* ```cpp
11148
* Parrot makeParrot(T1, T2, T3, T4, T5, T6);
11149
* PY_CLASS_FREE_CONSTRUCTOR_6(Parrot, makeParrot, T1, T2, T3, T4, T5, T6)
11150
* ```
11151
*/
11152
#define PY_CLASS_FREE_CONSTRUCTOR_6( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 )\
11153
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6 > \
11154
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11155
PY_CLASS_FREE_CONSTRUCTOR(\
11156
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11157
11158
/** @brief Export free/static C++ factory function as Python constructor with 7 parameters.
11159
* @ingroup ClassConstructors
11160
*
11161
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 7
11162
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11163
*
11164
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11165
* @param f_cppFunction Free or static factory function that creates the class instance
11166
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 Parameter types for the constructor
11167
*
11168
* @par Example
11169
* ```cpp
11170
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7);
11171
* PY_CLASS_FREE_CONSTRUCTOR_7(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7)
11172
* ```
11173
*/
11174
#define PY_CLASS_FREE_CONSTRUCTOR_7( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 )\
11175
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7 > \
11176
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11177
PY_CLASS_FREE_CONSTRUCTOR(\
11178
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11179
11180
/** @brief Export free/static C++ factory function as Python constructor with 8 parameters.
11181
* @ingroup ClassConstructors
11182
*
11183
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 8
11184
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11185
*
11186
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11187
* @param f_cppFunction Free or static factory function that creates the class instance
11188
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 Parameter types for the constructor
11189
*
11190
* @par Example
11191
* ```cpp
11192
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8);
11193
* PY_CLASS_FREE_CONSTRUCTOR_8(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8)
11194
* ```
11195
*/
11196
#define PY_CLASS_FREE_CONSTRUCTOR_8( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 )\
11197
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8 > \
11198
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11199
PY_CLASS_FREE_CONSTRUCTOR(\
11200
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11201
11202
/** @brief Export free/static C++ factory function as Python constructor with 9 parameters.
11203
* @ingroup ClassConstructors
11204
*
11205
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 9
11206
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11207
*
11208
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11209
* @param f_cppFunction Free or static factory function that creates the class instance
11210
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 Parameter types for the constructor
11211
*
11212
* @par Example
11213
* ```cpp
11214
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9);
11215
* PY_CLASS_FREE_CONSTRUCTOR_9(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9)
11216
* ```
11217
*/
11218
#define PY_CLASS_FREE_CONSTRUCTOR_9( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 )\
11219
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9 > \
11220
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11221
PY_CLASS_FREE_CONSTRUCTOR(\
11222
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11223
11224
/** @brief Export free/static C++ factory function as Python constructor with 10 parameters.
11225
* @ingroup ClassConstructors
11226
*
11227
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 10
11228
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11229
*
11230
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11231
* @param f_cppFunction Free or static factory function that creates the class instance
11232
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 Parameter types for the constructor
11233
*
11234
* @par Example
11235
* ```cpp
11236
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10);
11237
* PY_CLASS_FREE_CONSTRUCTOR_10(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
11238
* ```
11239
*/
11240
#define PY_CLASS_FREE_CONSTRUCTOR_10( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 )\
11241
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10 > \
11242
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11243
PY_CLASS_FREE_CONSTRUCTOR(\
11244
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11245
11246
/** @brief Export free/static C++ factory function as Python constructor with 11 parameters.
11247
* @ingroup ClassConstructors
11248
*
11249
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 11
11250
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11251
*
11252
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11253
* @param f_cppFunction Free or static factory function that creates the class instance
11254
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 Parameter types for the constructor
11255
*
11256
* @par Example
11257
* ```cpp
11258
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11);
11259
* PY_CLASS_FREE_CONSTRUCTOR_11(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
11260
* ```
11261
*/
11262
#define PY_CLASS_FREE_CONSTRUCTOR_11( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 )\
11263
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11 > \
11264
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11265
PY_CLASS_FREE_CONSTRUCTOR(\
11266
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11267
11268
/** @brief Export free/static C++ factory function as Python constructor with 12 parameters.
11269
* @ingroup ClassConstructors
11270
*
11271
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 12
11272
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11273
*
11274
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11275
* @param f_cppFunction Free or static factory function that creates the class instance
11276
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 Parameter types for the constructor
11277
*
11278
* @par Example
11279
* ```cpp
11280
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12);
11281
* PY_CLASS_FREE_CONSTRUCTOR_12(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
11282
* ```
11283
*/
11284
#define PY_CLASS_FREE_CONSTRUCTOR_12( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 )\
11285
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12 > \
11286
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11287
PY_CLASS_FREE_CONSTRUCTOR(\
11288
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11289
11290
/** @brief Export free/static C++ factory function as Python constructor with 13 parameters.
11291
* @ingroup ClassConstructors
11292
*
11293
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 13
11294
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11295
*
11296
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11297
* @param f_cppFunction Free or static factory function that creates the class instance
11298
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 Parameter types for the constructor
11299
*
11300
* @par Example
11301
* ```cpp
11302
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13);
11303
* PY_CLASS_FREE_CONSTRUCTOR_13(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
11304
* ```
11305
*/
11306
#define PY_CLASS_FREE_CONSTRUCTOR_13( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 )\
11307
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13 > \
11308
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11309
PY_CLASS_FREE_CONSTRUCTOR(\
11310
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11311
11312
/** @brief Export free/static C++ factory function as Python constructor with 14 parameters.
11313
* @ingroup ClassConstructors
11314
*
11315
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 14
11316
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11317
*
11318
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11319
* @param f_cppFunction Free or static factory function that creates the class instance
11320
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 Parameter types for the constructor
11321
*
11322
* @par Example
11323
* ```cpp
11324
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14);
11325
* PY_CLASS_FREE_CONSTRUCTOR_14(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
11326
* ```
11327
*/
11328
#define PY_CLASS_FREE_CONSTRUCTOR_14( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 )\
11329
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14 > \
11330
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11331
PY_CLASS_FREE_CONSTRUCTOR(\
11332
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11333
11334
/** @brief Export free/static C++ factory function as Python constructor with 15 parameters.
11335
* @ingroup ClassConstructors
11336
*
11337
* Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 15
11338
* parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.
11339
*
11340
* @param i_cppClass C++ class to add the constructor to (unqualified name)
11341
* @param f_cppFunction Free or static factory function that creates the class instance
11342
* @param t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 Parameter types for the constructor
11343
*
11344
* @par Example
11345
* ```cpp
11346
* Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15);
11347
* PY_CLASS_FREE_CONSTRUCTOR_15(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
11348
* ```
11349
*/
11350
#define PY_CLASS_FREE_CONSTRUCTOR_15( i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 )\
11351
typedef ::lass::meta::TypeTuple< t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8, t_P9, t_P10, t_P11, t_P12, t_P13, t_P14, t_P15 > \
11352
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass));\
11353
PY_CLASS_FREE_CONSTRUCTOR(\
11354
i_cppClass, f_cppFunction, LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_TParams_, i_cppClass)))
11355
11356
11357
/** @} */
11358
11359
11360
11361
// --- internals -----------------------------------------------------------------------------------
11362
11363
/** @internal
11364
*/
11365
#define PY_CLASS_METHOD_IMPL(t_cppClass, i_cppMethod, s_methodName, s_doc, i_dispatcher, i_caller)\
11366
static ::lass::python::impl::OverloadLink LASS_CONCATENATE(i_dispatcher, _overloadChain);\
11367
extern "C" LASS_DLL_LOCAL PyObject* i_dispatcher(PyObject* iSelf, PyObject* iArgs)\
11368
{\
11369
PyObject* result = 0;\
11370
if (LASS_CONCATENATE(i_dispatcher, _overloadChain)(iSelf, iArgs, result))\
11371
{\
11372
return result;\
11373
}\
11374
[[maybe_unused]] typedef ::lass::python::impl::ShadowTraits< t_cppClass > TShadowTraits;\
11375
[[maybe_unused]] typedef TShadowTraits::TCppClass TCppClass;\
11376
LASS_ASSERT(result == 0);\
11377
return i_caller(iArgs, iSelf, i_cppMethod);\
11378
}\
11379
LASS_EXECUTE_BEFORE_MAIN_EX(LASS_CONCATENATE(i_dispatcher, _executeBeforeMain),\
11380
t_cppClass ::_lassPyClassDef.addMethod(\
11381
s_methodName, s_doc, \
11382
::lass::python::impl::FunctionTypeDispatcher< SPECIAL_SLOT_TYPE(s_methodName) , i_dispatcher>::fun,\
11383
LASS_CONCATENATE(i_dispatcher, _overloadChain));\
11384
)
11385
#endif
11386
11387
// EOF
is_charptr.h
is_member.h
module_definition.h
pyobject_call.inl
lass
python
pyobject_macros.h
Generated by
1.13.2