Library of Assembled Shared Sources
 
Loading...
Searching...
No Matches
Constructor Export Macros

Detailed Description

Export C++ constructors directly as Python class constructors.

These macros make abstract Python classes concrete by adding constructors that can create instances from Python code using the actual C++ constructors.

Besides exporting constructors from the C++ class directly as Python class constructors, you can also export free or static factory functions that return a new instance of that class as a constructor.

Overloading

Just like other functions, multiple constructors can be exported on the same class, to overload them on the parameter types.

Note
Overload resolution uses first-fit, not best-fit like C++. The first exported constructor that matches the arguments will be called.
Naming and Documentation
Note
None of the constructor export macros allow you to specify a name or a docstring. The name is fixed to __init__, and constructor documentation has to be added to the class' docstring.
Example
class Parrot
{
public:
Parrot();
Parrot(const std::string& name);
Parrot(const std::string& name, bool alive);
};
Parrot makeParrot(bool alive);
PY_CLASS_CONSTRUCTOR_0(Parrot) // p = Parrot()
PY_CLASS_CONSTRUCTOR_1(Parrot, const std::string&) // p = Parrot("bird")
PY_CLASS_CONSTRUCTOR_2(Parrot, const std::string&, bool) // p = Parrot("bird", False)
PY_CLASS_FREE_CONSTRUCTOR_1(Parrot, makeParrot, bool) // p = Parrot(True)
#define PY_CLASS_FREE_CONSTRUCTOR_1(i_cppClass, f_cppFunction, t_P1)
Export free/static C++ factory function as Python constructor with 1 parameters.
#define PY_CLASS_CONSTRUCTOR_1(i_cppClass, t_P1)
Export C++ constructor as Python class constructor with 1 parameters.
#define PY_CLASS_CONSTRUCTOR_0(i_cppClass)
Export C++ default constructor as Python class constructor.
#define PY_CLASS_CONSTRUCTOR_2(i_cppClass, t_P1, t_P2)
Export C++ constructor as Python class constructor with 2 parameters.
#define PY_DECLARE_CLASS(i_cppClass)
Declare a Python class with automatic name and no documentation.
#define PY_HEADER(t_parentClass)
Place as first line of your Pythonized class.

Class Constructor Export Macros

Constructors need to be fully qualified to be exported.

You always need to provide the full list of parameter types to disambiguate overloaded constructors. This is why there are no _QUALIFIED versions of these macros, they already are fully qualified.

The list of parameter types can be passed as a single lass::meta::TypeTuple, or as individual arguments. For the latter, the _<N> tells the number of arguments. The _<N> form is the most often used one, and simply packs its types into a TypeTuple.

There's also the _EX form in case you need a custom dispatcher name, but that should be rarely used.

Form Fixed parameters Adds parameters
PY_CLASS_CONSTRUCTOR i_cppClass t_params as lass::meta::TypeTuple
PY_CLASS_CONSTRUCTOR_EX t_cppClass t_params, i_dispatcher
PY_CLASS_CONSTRUCTOR_<N> i_cppClass t_P1, t_P2, ... t_P<N>
#define PY_CLASS_CONSTRUCTOR_EX(t_cppClass, t_params, i_dispatcher)
 Export C++ constructor as Python class constructor with full control.
 
#define PY_CLASS_CONSTRUCTOR(i_cppClass, t_params)
 Export C++ constructor as Python class constructor.
 
#define PY_CLASS_CONSTRUCTOR_0(i_cppClass)
 Export C++ default constructor as Python class constructor.
 
#define PY_CLASS_CONSTRUCTOR_1(i_cppClass, t_P1)
 Export C++ constructor as Python class constructor with 1 parameters.
 
#define PY_CLASS_CONSTRUCTOR_2(i_cppClass, t_P1, t_P2)
 Export C++ constructor as Python class constructor with 2 parameters.
 
#define PY_CLASS_CONSTRUCTOR_3(i_cppClass, t_P1, t_P2, t_P3)
 Export C++ constructor as Python class constructor with 3 parameters.
 
#define PY_CLASS_CONSTRUCTOR_4(i_cppClass, t_P1, t_P2, t_P3, t_P4)
 Export C++ constructor as Python class constructor with 4 parameters.
 
#define PY_CLASS_CONSTRUCTOR_5(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5)
 Export C++ constructor as Python class constructor with 5 parameters.
 
#define PY_CLASS_CONSTRUCTOR_6(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6)
 Export C++ constructor as Python class constructor with 6 parameters.
 
#define PY_CLASS_CONSTRUCTOR_7(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7)
 Export C++ constructor as Python class constructor with 7 parameters.
 
#define PY_CLASS_CONSTRUCTOR_8(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8)
 Export C++ constructor as Python class constructor with 8 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 9 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 10 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 11 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 12 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 13 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 14 parameters.
 
#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)
 Export C++ constructor as Python class constructor with 15 parameters.
 

Free Function Constructor Export Macros

Export factory functions as Python class constructors.

These macros allow C++ functions that return instances of a class to be used as Python constructors. This is useful when you need special construction logic or when the actual constructor is not accessible from Python. The functions must return an instance of the target class.

Form Fixed parameters Adds parameters
PY_CLASS_FREE_CONSTRUCTOR i_cppClass, f_cppFunction t_params as lass::meta::TypeTuple
PY_CLASS_FREE_CONSTRUCTOR_EX t_cppClass, f_cppFunction t_params, i_dispatcher
PY_CLASS_FREE_CONSTRUCTOR_<N> i_cppClass, f_cppFunction t_P1, t_P2, ... t_P<N>
#define PY_CLASS_FREE_CONSTRUCTOR_EX(t_cppClass, f_cppFunction, t_params, i_dispatcher)
 Export free/static C++ factory function as Python constructor with full control.
 
#define PY_CLASS_FREE_CONSTRUCTOR(i_cppClass, f_cppFunction, t_params)
 Export free/static C++ factory function as Python class constructor.
 
#define PY_CLASS_FREE_CONSTRUCTOR_0(i_cppClass, f_cppFunction)
 Export free/static C++ factory function as Python constructor with 0 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_1(i_cppClass, f_cppFunction, t_P1)
 Export free/static C++ factory function as Python constructor with 1 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_2(i_cppClass, f_cppFunction, t_P1, t_P2)
 Export free/static C++ factory function as Python constructor with 2 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_3(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3)
 Export free/static C++ factory function as Python constructor with 3 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_4(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4)
 Export free/static C++ factory function as Python constructor with 4 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_5(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5)
 Export free/static C++ factory function as Python constructor with 5 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_6(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6)
 Export free/static C++ factory function as Python constructor with 6 parameters.
 
#define PY_CLASS_FREE_CONSTRUCTOR_7(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7)
 Export free/static C++ factory function as Python constructor with 7 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 8 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 9 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 10 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 11 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 12 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 13 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 14 parameters.
 
#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)
 Export free/static C++ factory function as Python constructor with 15 parameters.
 

Macro Definition Documentation

◆ PY_CLASS_CONSTRUCTOR_EX

#define PY_CLASS_CONSTRUCTOR_EX ( t_cppClass,
t_params,
i_dispatcher )

Export C++ constructor as Python class constructor with full control.

This macro provides the most flexible constructor export with manual dispatcher naming.

Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.

Parameters
t_cppClassC++ class to add the constructor to
t_paramsConstructor parameter types as lass::meta::TypeTuple (empty for none)
i_dispatcherUnique identifier for the generated dispatcher functions
Example
using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
PY_CLASS_CONSTRUCTOR_EX(Parrot, TParrotArgs, parrot_constructor)
#define PY_CLASS_CONSTRUCTOR_EX(t_cppClass, t_params, i_dispatcher)
Export C++ constructor as Python class constructor with full control.

Definition at line 10560 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR

#define PY_CLASS_CONSTRUCTOR ( i_cppClass,
t_params )
Value:
PY_CLASS_CONSTRUCTOR_EX(i_cppClass, t_params,\
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_constructor_, i_cppClass)))

Export C++ constructor as Python class constructor.

Wraps PY_CLASS_CONSTRUCTOR_EX() with auto-generated dispatcher name.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_paramslass::meta::TypeTuple of constructor parameter types
Example
using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
PY_CLASS_CONSTRUCTOR(Parrot, TParrotArgs)
#define PY_CLASS_CONSTRUCTOR(i_cppClass, t_params)
Export C++ constructor as Python class constructor.

Definition at line 10604 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_0

#define PY_CLASS_CONSTRUCTOR_0 ( i_cppClass)
Value:
An ordered list of types.
Definition type_tuple.h:74

Export C++ default constructor as Python class constructor.

Convenience macro for exporting a parameterless C++ constructor. Equivalent to PY_CLASS_CONSTRUCTOR(i_cppClass, meta::TypeTuple<>).

Parameters
i_cppClassC++ class to add the default constructor to (unqualified name)
Example

Definition at line 10621 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_1

#define PY_CLASS_CONSTRUCTOR_1 ( i_cppClass,
t_P1 )

Export C++ constructor as Python class constructor with 1 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 1 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1Parameter types for the constructor
Example

Definition at line 10638 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_2

#define PY_CLASS_CONSTRUCTOR_2 ( i_cppClass,
t_P1,
t_P2 )

Export C++ constructor as Python class constructor with 2 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 2 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_2(Parrot, T1, T2)

Definition at line 10658 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_3

#define PY_CLASS_CONSTRUCTOR_3 ( i_cppClass,
t_P1,
t_P2,
t_P3 )

Export C++ constructor as Python class constructor with 3 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 3 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_3(Parrot, T1, T2, T3)
#define PY_CLASS_CONSTRUCTOR_3(i_cppClass, t_P1, t_P2, t_P3)
Export C++ constructor as Python class constructor with 3 parameters.

Definition at line 10678 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_4

#define PY_CLASS_CONSTRUCTOR_4 ( i_cppClass,
t_P1,
t_P2,
t_P3,
t_P4 )

Export C++ constructor as Python class constructor with 4 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 4 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_4(Parrot, T1, T2, T3, T4)
#define PY_CLASS_CONSTRUCTOR_4(i_cppClass, t_P1, t_P2, t_P3, t_P4)
Export C++ constructor as Python class constructor with 4 parameters.

Definition at line 10698 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_5

#define PY_CLASS_CONSTRUCTOR_5 ( i_cppClass,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5 )

Export C++ constructor as Python class constructor with 5 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 5 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_5(Parrot, T1, T2, T3, T4, T5)
#define PY_CLASS_CONSTRUCTOR_5(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5)
Export C++ constructor as Python class constructor with 5 parameters.

Definition at line 10718 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_6

#define PY_CLASS_CONSTRUCTOR_6 ( i_cppClass,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5,
t_P6 )

Export C++ constructor as Python class constructor with 6 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 6 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_6(Parrot, T1, T2, T3, T4, T5, T6)
#define PY_CLASS_CONSTRUCTOR_6(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6)
Export C++ constructor as Python class constructor with 6 parameters.

Definition at line 10738 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_7

#define PY_CLASS_CONSTRUCTOR_7 ( i_cppClass,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5,
t_P6,
t_P7 )

Export C++ constructor as Python class constructor with 7 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 7 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_7(Parrot, T1, T2, T3, T4, T5, T6, T7)
#define PY_CLASS_CONSTRUCTOR_7(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7)
Export C++ constructor as Python class constructor with 7 parameters.

Definition at line 10758 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_8

#define PY_CLASS_CONSTRUCTOR_8 ( i_cppClass,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5,
t_P6,
t_P7,
t_P8 )

Export C++ constructor as Python class constructor with 8 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 8 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_8(Parrot, T1, T2, T3, T4, T5, T6, T7, T8)
#define PY_CLASS_CONSTRUCTOR_8(i_cppClass, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7, t_P8)
Export C++ constructor as Python class constructor with 8 parameters.

Definition at line 10778 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_9

#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 )

Export C++ constructor as Python class constructor with 9 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 9 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_9(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9)
#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)
Export C++ constructor as Python class constructor with 9 parameters.

Definition at line 10798 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_10

#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 )

Export C++ constructor as Python class constructor with 10 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 10 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9,t_P10Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_10(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
#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)
Export C++ constructor as Python class constructor with 10 parameters.

Definition at line 10818 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_11

#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 )

Export C++ constructor as Python class constructor with 11 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 11 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9,t_P10,t_P11Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_11(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
#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)
Export C++ constructor as Python class constructor with 11 parameters.

Definition at line 10838 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_12

#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 )

Export C++ constructor as Python class constructor with 12 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 12 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9,t_P10,t_P11,t_P12Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_12(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
#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)
Export C++ constructor as Python class constructor with 12 parameters.

Definition at line 10858 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_13

#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 )

Export C++ constructor as Python class constructor with 13 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 13 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
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_P13Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_13(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
#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)
Export C++ constructor as Python class constructor with 13 parameters.

Definition at line 10878 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_14

#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 )

Export C++ constructor as Python class constructor with 14 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 14 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
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_P14Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_14(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
#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)
Export C++ constructor as Python class constructor with 14 parameters.

Definition at line 10898 of file pyobject_macros.h.

◆ PY_CLASS_CONSTRUCTOR_15

#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 )

Export C++ constructor as Python class constructor with 15 parameters.

Wraps PY_CLASS_CONSTRUCTOR() for exporting a C++ constructor with exactly 15 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
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_P15Parameter types for the constructor
Example
PY_CLASS_CONSTRUCTOR_15(Parrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
#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)
Export C++ constructor as Python class constructor with 15 parameters.

Definition at line 10918 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_EX

#define PY_CLASS_FREE_CONSTRUCTOR_EX ( t_cppClass,
f_cppFunction,
t_params,
i_dispatcher )

Export free/static C++ factory function as Python constructor with full control.

The most detailed macro for exporting factory functions as constructors. Allows manual specification of all parameters including the dispatcher name for maximum control over the export process.

Here you can use a fully qualified class name, at the cost of having to provide a unique suffix.

Parameters
t_cppClassC++ class to add the constructor to
f_cppFunctionFree or static factory function that creates the class instance
t_paramsConstructor parameter types as lass::meta::TypeTuple (empty for none)
i_dispatcherUnique identifier for the generated dispatcher functions
Example
Parrot makeParrot(const std::string&, bool);
using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
PY_CLASS_FREE_CONSTRUCTOR_EX(Parrot, makeParrot, TParrotArgs, parrot_free_constructor)
#define PY_CLASS_FREE_CONSTRUCTOR_EX(t_cppClass, f_cppFunction, t_params, i_dispatcher)
Export free/static C++ factory function as Python constructor with full control.

Definition at line 10966 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR

#define PY_CLASS_FREE_CONSTRUCTOR ( i_cppClass,
f_cppFunction,
t_params )
Value:
PY_CLASS_FREE_CONSTRUCTOR_EX(i_cppClass, f_cppFunction, t_params,\
LASS_UNIQUENAME(LASS_CONCATENATE(lassPyImpl_constructor_, i_cppClass)))

Export free/static C++ factory function as Python class constructor.

Wraps PY_CLASS_FREE_CONSTRUCTOR_EX() with auto-generated dispatcher name.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_paramsConstructor parameter types as lass::meta::TypeTuple (empty for none)
Example
Parrot makeParrot(const std::string&, bool);
using TParrotArgs = meta::TypeTuple<const std::string&, bool>;
PY_CLASS_FREE_CONSTRUCTOR(Parrot, makeParrot, TParrotArgs)
#define PY_CLASS_FREE_CONSTRUCTOR(i_cppClass, f_cppFunction, t_params)
Export free/static C++ factory function as Python class constructor.

Definition at line 11005 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_0

#define PY_CLASS_FREE_CONSTRUCTOR_0 ( i_cppClass,
f_cppFunction )
Value:

Export free/static C++ factory function as Python constructor with 0 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes no parameters.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
Example
Parrot makeParrot();
PY_CLASS_FREE_CONSTRUCTOR_0(Parrot, makeParrot)
#define PY_CLASS_FREE_CONSTRUCTOR_0(i_cppClass, f_cppFunction)
Export free/static C++ factory function as Python constructor with 0 parameters.

Definition at line 11023 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_1

#define PY_CLASS_FREE_CONSTRUCTOR_1 ( i_cppClass,
f_cppFunction,
t_P1 )

Export free/static C++ factory function as Python constructor with 1 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 1 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1Parameter types for the constructor
Example
Parrot makeParrot(T1);
PY_CLASS_FREE_CONSTRUCTOR_1(Parrot, makeParrot, T1)

Definition at line 11042 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_2

#define PY_CLASS_FREE_CONSTRUCTOR_2 ( i_cppClass,
f_cppFunction,
t_P1,
t_P2 )

Export free/static C++ factory function as Python constructor with 2 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 2 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2Parameter types for the constructor
Example
Parrot makeParrot(T1, T2);
PY_CLASS_FREE_CONSTRUCTOR_2(Parrot, makeParrot, T1, T2)
#define PY_CLASS_FREE_CONSTRUCTOR_2(i_cppClass, f_cppFunction, t_P1, t_P2)
Export free/static C++ factory function as Python constructor with 2 parameters.

Definition at line 11064 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_3

#define PY_CLASS_FREE_CONSTRUCTOR_3 ( i_cppClass,
f_cppFunction,
t_P1,
t_P2,
t_P3 )

Export free/static C++ factory function as Python constructor with 3 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 3 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3);
PY_CLASS_FREE_CONSTRUCTOR_3(Parrot, makeParrot, T1, T2, T3)
#define PY_CLASS_FREE_CONSTRUCTOR_3(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3)
Export free/static C++ factory function as Python constructor with 3 parameters.

Definition at line 11086 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_4

#define PY_CLASS_FREE_CONSTRUCTOR_4 ( i_cppClass,
f_cppFunction,
t_P1,
t_P2,
t_P3,
t_P4 )

Export free/static C++ factory function as Python constructor with 4 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 4 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4);
PY_CLASS_FREE_CONSTRUCTOR_4(Parrot, makeParrot, T1, T2, T3, T4)
#define PY_CLASS_FREE_CONSTRUCTOR_4(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4)
Export free/static C++ factory function as Python constructor with 4 parameters.

Definition at line 11108 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_5

#define PY_CLASS_FREE_CONSTRUCTOR_5 ( i_cppClass,
f_cppFunction,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5 )

Export free/static C++ factory function as Python constructor with 5 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 5 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5);
PY_CLASS_FREE_CONSTRUCTOR_5(Parrot, makeParrot, T1, T2, T3, T4, T5)
#define PY_CLASS_FREE_CONSTRUCTOR_5(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5)
Export free/static C++ factory function as Python constructor with 5 parameters.

Definition at line 11130 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_6

#define PY_CLASS_FREE_CONSTRUCTOR_6 ( i_cppClass,
f_cppFunction,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5,
t_P6 )

Export free/static C++ factory function as Python constructor with 6 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 6 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6);
PY_CLASS_FREE_CONSTRUCTOR_6(Parrot, makeParrot, T1, T2, T3, T4, T5, T6)
#define PY_CLASS_FREE_CONSTRUCTOR_6(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6)
Export free/static C++ factory function as Python constructor with 6 parameters.

Definition at line 11152 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_7

#define PY_CLASS_FREE_CONSTRUCTOR_7 ( i_cppClass,
f_cppFunction,
t_P1,
t_P2,
t_P3,
t_P4,
t_P5,
t_P6,
t_P7 )

Export free/static C++ factory function as Python constructor with 7 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 7 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7);
PY_CLASS_FREE_CONSTRUCTOR_7(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7)
#define PY_CLASS_FREE_CONSTRUCTOR_7(i_cppClass, f_cppFunction, t_P1, t_P2, t_P3, t_P4, t_P5, t_P6, t_P7)
Export free/static C++ factory function as Python constructor with 7 parameters.

Definition at line 11174 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_8

#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 )

Export free/static C++ factory function as Python constructor with 8 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 8 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8);
PY_CLASS_FREE_CONSTRUCTOR_8(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8)
#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)
Export free/static C++ factory function as Python constructor with 8 parameters.

Definition at line 11196 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_9

#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 )

Export free/static C++ factory function as Python constructor with 9 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 9 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9);
PY_CLASS_FREE_CONSTRUCTOR_9(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9)
#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)
Export free/static C++ factory function as Python constructor with 9 parameters.

Definition at line 11218 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_10

#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 )

Export free/static C++ factory function as Python constructor with 10 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 10 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9,t_P10Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10);
PY_CLASS_FREE_CONSTRUCTOR_10(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
#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)
Export free/static C++ factory function as Python constructor with 10 parameters.

Definition at line 11240 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_11

#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 )

Export free/static C++ factory function as Python constructor with 11 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 11 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9,t_P10,t_P11Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11);
PY_CLASS_FREE_CONSTRUCTOR_11(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
#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)
Export free/static C++ factory function as Python constructor with 11 parameters.

Definition at line 11262 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_12

#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 )

Export free/static C++ factory function as Python constructor with 12 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 12 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
t_P1,t_P2,t_P3,t_P4,t_P5,t_P6,t_P7,t_P8,t_P9,t_P10,t_P11,t_P12Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12);
PY_CLASS_FREE_CONSTRUCTOR_12(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
#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)
Export free/static C++ factory function as Python constructor with 12 parameters.

Definition at line 11284 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_13

#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 )

Export free/static C++ factory function as Python constructor with 13 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 13 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
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_P13Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13);
PY_CLASS_FREE_CONSTRUCTOR_13(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
#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)
Export free/static C++ factory function as Python constructor with 13 parameters.

Definition at line 11306 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_14

#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 )

Export free/static C++ factory function as Python constructor with 14 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 14 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
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_P14Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14);
PY_CLASS_FREE_CONSTRUCTOR_14(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
#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)
Export free/static C++ factory function as Python constructor with 14 parameters.

Definition at line 11328 of file pyobject_macros.h.

◆ PY_CLASS_FREE_CONSTRUCTOR_15

#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 )

Export free/static C++ factory function as Python constructor with 15 parameters.

Wraps PY_CLASS_FREE_CONSTRUCTOR() for exporting a factory function that takes exactly 15 parameters. Automatically creates the required lass::meta::TypeTuple from the parameter types.

Parameters
i_cppClassC++ class to add the constructor to (unqualified name)
f_cppFunctionFree or static factory function that creates the class instance
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_P15Parameter types for the constructor
Example
Parrot makeParrot(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15);
PY_CLASS_FREE_CONSTRUCTOR_15(Parrot, makeParrot, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
#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)
Export free/static C++ factory function as Python constructor with 15 parameters.

Definition at line 11350 of file pyobject_macros.h.