51#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H
52#define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H
71 class FunctorPythonBase
74 FunctorPythonBase(
const TPyObjPtr& callable): callable_(callable) {}
75 bool operator==(
const FunctorPythonBase& other)
const
77 return callable_.get() == other.callable_.get();
79 bool operator!()
const
91 LASS_ASSERT(callable_);
92 const TPyObjPtr result(PyObject_CallObject(callable_.get(), args.get()));
106 template <
typename R>
107 class FunctorPythonRBase
110 FunctorPythonRBase(
const TPyObjPtr& callable): callable_(callable) {}
111 bool operator==(
const FunctorPythonRBase<R>& other)
const
113 return callable_.get() == other.callable_.get();
115 bool operator!()
const
126 static_assert(!std::is_reference_v<R> && !std::is_pointer_v<R>,
"Python callbacks must return by value, not by reference or pointer");
128 LASS_ASSERT(callable_);
129 const TPyObjPtr result(PyObject_CallObject(callable_.get(), args.get()));
135 typename TraitsR::TStorage temp;
136 if (pyGetSimpleObject(result.get(), temp) != 0)
140 return TraitsR::arg(temp);
146 class PyCallbackImplBase
149 virtual ~PyCallbackImplBase() =
default;
150 virtual PyObject* call(PyObject* args)
const = 0;
157 using TPimpl = std::unique_ptr<PyCallbackImplBase>;
159 PyCallback(TPimpl impl);
161 template <
typename PyCallbackImplType>
162 bool get(
typename PyCallbackImplType::TCallback& v)
const
164 PyCallbackImplBase* p = pimpl_.get();
165 if (p &&
typeid(*p) ==
typeid(PyCallbackImplType))
167 v =
static_cast<PyCallbackImplType*
>(p)->callable();
173 static PyObject* _tp_call(PyObject* self, PyObject* args, PyObject* kwargs);
189template <
typename CallbackType,
typename PyCallbackImplType,
typename ExportTraits>
192 static int get(PyObject* value, CallbackType& callback)
194 if (value == Py_None)
199 impl::initLassModule();
200 if (PyType_IsSubtype(Py_TYPE(value), impl::PyCallback::_lassPyClassDef.type()))
202 if (
static_cast<impl::PyCallback*
>(value)->get<PyCallbackImplType>(callback))
208 if (pyGetSimpleObject(value, callable) != 0)
218 if (!PyCallable_Check(callable.get()))
220 std::ostringstream buffer;
221 buffer << ExportTraits::className() <<
": not callable";
222 PyErr_SetString(PyExc_TypeError, buffer.str().c_str());
225 using TFunctor =
typename PyCallbackImplType::TFunctor;
226 callback = TFunctor(callable);
229 static PyObject* build(
const CallbackType& callback)
236 using TDispatcher =
typename PyCallbackImplType::TDispatcher;
237 auto dispatcher = callback.dispatcher().get();
238 if (dispatcher &&
typeid(*dispatcher) ==
typeid(TDispatcher))
244 impl::PyCallback::TPimpl pimpl(
new PyCallbackImplType(callback));
245 return new impl::PyCallback(std::move(pimpl));
254#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_0)
255# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_0
256# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_0
264 class Functor0Python:
public FunctorPythonBase
267 Functor0Python(
const python::TPyObjPtr& callable): FunctorPythonBase(callable) {}
268 void operator()()
const
275 class PyCallback0Impl:
public PyCallbackImplBase
278 using TCallback = util::Callback0;
279 using TFunctor = Functor0Python;
280 using TDispatcher = util::impl::Dispatcher0Function<TFunctor>;
282 PyCallback0Impl(TCallback callback): callback_(std::move(callback)) {}
283 const TCallback& callable()
const {
return callback_; }
285 PyObject* call(PyObject* args)
const override
287 if ( decodeTuple(args) != 0 )
291 return Caller<void>::callFunction<const TCallback&>(callback_);
325 impl::PyCallback0Impl,
326 PyExportTraits< util::Callback0 >
329 static constexpr const char* py_typing =
"Callable[[], None]";
331 static const char* className() {
return "Callback0"; }
340#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_1)
341# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_1
342# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_1
350 template <
typename P1>
351 class Functor1Python:
public FunctorPythonBase
354 Functor1Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
355 void operator()(
typename util::CallTraits<P1>::TParam p1)
const
358 this->call(makeTuple(p1));
362 template <
typename P1>
363 class PyCallback1Impl:
public PyCallbackImplBase
366 using TCallback = util::Callback1<P1>;
367 using TFunctor = Functor1Python<P1>;
368 using TDispatcher = util::impl::Dispatcher1Function<P1, TFunctor>;
370 PyCallback1Impl(TCallback callback): callback_(std::move(callback)) {}
371 const TCallback& callable()
const {
return callback_; }
373 PyObject* call(PyObject* args)
const override
375 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
377 if ( decodeTuple<S1>(args, p1) != 0 )
381 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1));
411template <
typename P1>
415 impl::PyCallback1Impl<P1>,
416 PyExportTraits< util::Callback1<P1> >
419 static constexpr const char* py_typing =
"Callable[[P1!], None]";
421 static const char* className() {
return "Callback1"; }
430#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_2)
431# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_2
432# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_2
440 template <
typename P1,
typename P2>
441 class Functor2Python:
public FunctorPythonBase
444 Functor2Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
445 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2)
const
448 this->call(makeTuple(p1, p2));
452 template <
typename P1,
typename P2>
453 class PyCallback2Impl:
public PyCallbackImplBase
456 using TCallback = util::Callback2<P1, P2>;
457 using TFunctor = Functor2Python<P1, P2>;
458 using TDispatcher = util::impl::Dispatcher2Function<P1, P2, TFunctor>;
460 PyCallback2Impl(TCallback callback): callback_(std::move(callback)) {}
461 const TCallback& callable()
const {
return callback_; }
463 PyObject* call(PyObject* args)
const override
465 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
466 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
468 if ( decodeTuple<S1, S2>(args, p1, p2) != 0 )
472 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2));
502template <
typename P1,
typename P2>
505 util::Callback2<P1, P2>,
506 impl::PyCallback2Impl<P1, P2>,
507 PyExportTraits< util::Callback2<P1, P2> >
510 static constexpr const char* py_typing =
"Callable[[P1!, P2!], None]";
512 static const char* className() {
return "Callback2"; }
521#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_3)
522# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_3
523# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_3
531 template <
typename P1,
typename P2,
typename P3>
532 class Functor3Python:
public FunctorPythonBase
535 Functor3Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
536 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3)
const
539 this->call(makeTuple(p1, p2, p3));
543 template <
typename P1,
typename P2,
typename P3>
544 class PyCallback3Impl:
public PyCallbackImplBase
547 using TCallback = util::Callback3<P1, P2, P3>;
548 using TFunctor = Functor3Python<P1, P2, P3>;
549 using TDispatcher = util::impl::Dispatcher3Function<P1, P2, P3, TFunctor>;
551 PyCallback3Impl(TCallback callback): callback_(std::move(callback)) {}
552 const TCallback& callable()
const {
return callback_; }
554 PyObject* call(PyObject* args)
const override
556 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
557 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
558 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
560 if ( decodeTuple<S1, S2, S3>(args, p1, p2, p3) != 0 )
564 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3));
594template <
typename P1,
typename P2,
typename P3>
597 util::Callback3<P1, P2, P3>,
598 impl::PyCallback3Impl<P1, P2, P3>,
599 PyExportTraits< util::Callback3<P1, P2, P3> >
602 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!], None]";
604 static const char* className() {
return "Callback3"; }
613#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_4)
614# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_4
615# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_4
623 template <
typename P1,
typename P2,
typename P3,
typename P4>
624 class Functor4Python:
public FunctorPythonBase
627 Functor4Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
628 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4)
const
631 this->call(makeTuple(p1, p2, p3, p4));
635 template <
typename P1,
typename P2,
typename P3,
typename P4>
636 class PyCallback4Impl:
public PyCallbackImplBase
639 using TCallback = util::Callback4<P1, P2, P3, P4>;
640 using TFunctor = Functor4Python<P1, P2, P3, P4>;
641 using TDispatcher = util::impl::Dispatcher4Function<P1, P2, P3, P4, TFunctor>;
643 PyCallback4Impl(TCallback callback): callback_(std::move(callback)) {}
644 const TCallback& callable()
const {
return callback_; }
646 PyObject* call(PyObject* args)
const override
648 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
649 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
650 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
651 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
653 if ( decodeTuple<S1, S2, S3, S4>(args, p1, p2, p3, p4) != 0 )
657 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4));
687template <
typename P1,
typename P2,
typename P3,
typename P4>
690 util::Callback4<P1, P2, P3, P4>,
691 impl::PyCallback4Impl<P1, P2, P3, P4>,
692 PyExportTraits< util::Callback4<P1, P2, P3, P4> >
695 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!], None]";
697 static const char* className() {
return "Callback4"; }
706#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_5)
707# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_5
708# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_5
716 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
717 class Functor5Python:
public FunctorPythonBase
720 Functor5Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
721 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5)
const
724 this->call(makeTuple(p1, p2, p3, p4, p5));
728 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
729 class PyCallback5Impl:
public PyCallbackImplBase
732 using TCallback = util::Callback5<P1, P2, P3, P4, P5>;
733 using TFunctor = Functor5Python<P1, P2, P3, P4, P5>;
734 using TDispatcher = util::impl::Dispatcher5Function<P1, P2, P3, P4, P5, TFunctor>;
736 PyCallback5Impl(TCallback callback): callback_(std::move(callback)) {}
737 const TCallback& callable()
const {
return callback_; }
739 PyObject* call(PyObject* args)
const override
741 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
742 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
743 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
744 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
745 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
747 if ( decodeTuple<S1, S2, S3, S4, S5>(args, p1, p2, p3, p4, p5) != 0 )
751 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5));
781template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
784 util::Callback5<P1, P2, P3, P4, P5>,
785 impl::PyCallback5Impl<P1, P2, P3, P4, P5>,
786 PyExportTraits< util::Callback5<P1, P2, P3, P4, P5> >
789 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!], None]";
791 static const char* className() {
return "Callback5"; }
800#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_6)
801# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_6
802# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_6
810 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
811 class Functor6Python:
public FunctorPythonBase
814 Functor6Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
815 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6)
const
818 this->call(makeTuple(p1, p2, p3, p4, p5, p6));
822 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
823 class PyCallback6Impl:
public PyCallbackImplBase
826 using TCallback = util::Callback6<P1, P2, P3, P4, P5, P6>;
827 using TFunctor = Functor6Python<P1, P2, P3, P4, P5, P6>;
828 using TDispatcher = util::impl::Dispatcher6Function<P1, P2, P3, P4, P5, P6, TFunctor>;
830 PyCallback6Impl(TCallback callback): callback_(std::move(callback)) {}
831 const TCallback& callable()
const {
return callback_; }
833 PyObject* call(PyObject* args)
const override
835 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
836 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
837 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
838 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
839 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
840 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
842 if ( decodeTuple<S1, S2, S3, S4, S5, S6>(args, p1, p2, p3, p4, p5, p6) != 0 )
846 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6));
876template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
879 util::Callback6<P1, P2, P3, P4, P5, P6>,
880 impl::PyCallback6Impl<P1, P2, P3, P4, P5, P6>,
881 PyExportTraits< util::Callback6<P1, P2, P3, P4, P5, P6> >
884 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!], None]";
886 static const char* className() {
return "Callback6"; }
895#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_7)
896# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_7
897# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_7
905 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
906 class Functor7Python:
public FunctorPythonBase
909 Functor7Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
910 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7)
const
913 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7));
917 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
918 class PyCallback7Impl:
public PyCallbackImplBase
921 using TCallback = util::Callback7<P1, P2, P3, P4, P5, P6, P7>;
922 using TFunctor = Functor7Python<P1, P2, P3, P4, P5, P6, P7>;
923 using TDispatcher = util::impl::Dispatcher7Function<P1, P2, P3, P4, P5, P6, P7, TFunctor>;
925 PyCallback7Impl(TCallback callback): callback_(std::move(callback)) {}
926 const TCallback& callable()
const {
return callback_; }
928 PyObject* call(PyObject* args)
const override
930 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
931 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
932 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
933 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
934 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
935 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
936 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
938 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7>(args, p1, p2, p3, p4, p5, p6, p7) != 0 )
942 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7));
972template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
975 util::Callback7<P1, P2, P3, P4, P5, P6, P7>,
976 impl::PyCallback7Impl<P1, P2, P3, P4, P5, P6, P7>,
977 PyExportTraits< util::Callback7<P1, P2, P3, P4, P5, P6, P7> >
980 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!], None]";
982 static const char* className() {
return "Callback7"; }
991#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_8)
992# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_8
993# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_8
1001 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
1002 class Functor8Python:
public FunctorPythonBase
1005 Functor8Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1006 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8)
const
1009 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8));
1013 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
1014 class PyCallback8Impl:
public PyCallbackImplBase
1017 using TCallback = util::Callback8<P1, P2, P3, P4, P5, P6, P7, P8>;
1018 using TFunctor = Functor8Python<P1, P2, P3, P4, P5, P6, P7, P8>;
1019 using TDispatcher = util::impl::Dispatcher8Function<P1, P2, P3, P4, P5, P6, P7, P8, TFunctor>;
1021 PyCallback8Impl(TCallback callback): callback_(std::move(callback)) {}
1022 const TCallback& callable()
const {
return callback_; }
1024 PyObject* call(PyObject* args)
const override
1026 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1027 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1028 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1029 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1030 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1031 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1032 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1033 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1035 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>(args, p1, p2, p3, p4, p5, p6, p7, p8) != 0 )
1039 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8));
1042 TCallback callback_;
1069template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
1072 util::Callback8<P1, P2, P3, P4, P5, P6, P7, P8>,
1073 impl::PyCallback8Impl<P1, P2, P3, P4, P5, P6, P7, P8>,
1074 PyExportTraits< util::Callback8<P1, P2, P3, P4, P5, P6, P7, P8> >
1077 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!], None]";
1079 static const char* className() {
return "Callback8"; }
1088#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_9)
1089# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_9
1090# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_9
1098 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
1099 class Functor9Python:
public FunctorPythonBase
1102 Functor9Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1103 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9)
const
1106 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9));
1110 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
1111 class PyCallback9Impl:
public PyCallbackImplBase
1114 using TCallback = util::Callback9<P1, P2, P3, P4, P5, P6, P7, P8, P9>;
1115 using TFunctor = Functor9Python<P1, P2, P3, P4, P5, P6, P7, P8, P9>;
1116 using TDispatcher = util::impl::Dispatcher9Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, TFunctor>;
1118 PyCallback9Impl(TCallback callback): callback_(std::move(callback)) {}
1119 const TCallback& callable()
const {
return callback_; }
1121 PyObject* call(PyObject* args)
const override
1123 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1124 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1125 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1126 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1127 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1128 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1129 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1130 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1131 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1133 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9) != 0 )
1137 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9));
1140 TCallback callback_;
1167template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
1170 util::Callback9<P1, P2, P3, P4, P5, P6, P7, P8, P9>,
1171 impl::PyCallback9Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9>,
1172 PyExportTraits< util::Callback9<P1, P2, P3, P4, P5, P6, P7, P8, P9> >
1175 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!], None]";
1177 static const char* className() {
return "Callback9"; }
1186#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_10)
1187# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_10
1188# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_10
1196 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10>
1197 class Functor10Python:
public FunctorPythonBase
1200 Functor10Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1201 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10)
const
1204 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10));
1208 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10>
1209 class PyCallback10Impl:
public PyCallbackImplBase
1212 using TCallback = util::Callback10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>;
1213 using TFunctor = Functor10Python<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>;
1214 using TDispatcher = util::impl::Dispatcher10Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, TFunctor>;
1216 PyCallback10Impl(TCallback callback): callback_(std::move(callback)) {}
1217 const TCallback& callable()
const {
return callback_; }
1219 PyObject* call(PyObject* args)
const override
1221 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1222 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1223 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1224 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1225 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1226 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1227 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1228 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1229 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1230 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
1232 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) != 0 )
1236 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10));
1239 TCallback callback_;
1266template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10>
1269 util::Callback10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>,
1270 impl::PyCallback10Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>,
1271 PyExportTraits< util::Callback10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> >
1274 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!], None]";
1276 static const char* className() {
return "Callback10"; }
1285#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_11)
1286# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_11
1287# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_11
1295 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11>
1296 class Functor11Python:
public FunctorPythonBase
1299 Functor11Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1300 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11)
const
1303 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11));
1307 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11>
1308 class PyCallback11Impl:
public PyCallbackImplBase
1311 using TCallback = util::Callback11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>;
1312 using TFunctor = Functor11Python<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>;
1313 using TDispatcher = util::impl::Dispatcher11Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, TFunctor>;
1315 PyCallback11Impl(TCallback callback): callback_(std::move(callback)) {}
1316 const TCallback& callable()
const {
return callback_; }
1318 PyObject* call(PyObject* args)
const override
1320 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1321 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1322 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1323 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1324 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1325 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1326 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1327 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1328 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1329 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
1330 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
1332 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) != 0 )
1336 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11));
1339 TCallback callback_;
1366template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11>
1367struct PyExportTraits<
util::Callback11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> >:
1369 util::Callback11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>,
1370 impl::PyCallback11Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>,
1371 PyExportTraits< util::Callback11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> >
1374 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!], None]";
1376 static const char* className() {
return "Callback11"; }
1385#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_12)
1386# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_12
1387# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_12
1395 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12>
1396 class Functor12Python:
public FunctorPythonBase
1399 Functor12Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1400 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12)
const
1403 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12));
1407 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12>
1408 class PyCallback12Impl:
public PyCallbackImplBase
1411 using TCallback = util::Callback12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>;
1412 using TFunctor = Functor12Python<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>;
1413 using TDispatcher = util::impl::Dispatcher12Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, TFunctor>;
1415 PyCallback12Impl(TCallback callback): callback_(std::move(callback)) {}
1416 const TCallback& callable()
const {
return callback_; }
1418 PyObject* call(PyObject* args)
const override
1420 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1421 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1422 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1423 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1424 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1425 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1426 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1427 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1428 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1429 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
1430 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
1431 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
1433 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) != 0 )
1437 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12));
1440 TCallback callback_;
1467template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12>
1468struct PyExportTraits<
util::Callback12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> >:
1470 util::Callback12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>,
1471 impl::PyCallback12Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>,
1472 PyExportTraits< util::Callback12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> >
1475 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!], None]";
1477 static const char* className() {
return "Callback12"; }
1486#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_13)
1487# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_13
1488# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_13
1496 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13>
1497 class Functor13Python:
public FunctorPythonBase
1500 Functor13Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1501 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12,
typename util::CallTraits<P13>::TParam p13)
const
1504 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13));
1508 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13>
1509 class PyCallback13Impl:
public PyCallbackImplBase
1512 using TCallback = util::Callback13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>;
1513 using TFunctor = Functor13Python<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>;
1514 using TDispatcher = util::impl::Dispatcher13Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, TFunctor>;
1516 PyCallback13Impl(TCallback callback): callback_(std::move(callback)) {}
1517 const TCallback& callable()
const {
return callback_; }
1519 PyObject* call(PyObject* args)
const override
1521 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1522 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1523 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1524 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1525 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1526 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1527 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1528 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1529 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1530 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
1531 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
1532 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
1533 typedef ArgumentTraits<P13> TArg13;
typedef typename TArg13::TStorage S13; S13 p13 = S13();
1535 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) != 0 )
1539 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13));
1542 TCallback callback_;
1569template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13>
1570struct PyExportTraits<
util::Callback13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> >:
1572 util::Callback13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>,
1573 impl::PyCallback13Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>,
1574 PyExportTraits< util::Callback13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> >
1577 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!, P13!], None]";
1579 static const char* className() {
return "Callback13"; }
1588#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_14)
1589# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_14
1590# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_14
1598 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14>
1599 class Functor14Python:
public FunctorPythonBase
1602 Functor14Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1603 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12,
typename util::CallTraits<P13>::TParam p13,
typename util::CallTraits<P14>::TParam p14)
const
1606 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14));
1610 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14>
1611 class PyCallback14Impl:
public PyCallbackImplBase
1614 using TCallback = util::Callback14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>;
1615 using TFunctor = Functor14Python<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>;
1616 using TDispatcher = util::impl::Dispatcher14Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, TFunctor>;
1618 PyCallback14Impl(TCallback callback): callback_(std::move(callback)) {}
1619 const TCallback& callable()
const {
return callback_; }
1621 PyObject* call(PyObject* args)
const override
1623 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1624 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1625 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1626 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1627 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1628 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1629 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1630 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1631 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1632 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
1633 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
1634 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
1635 typedef ArgumentTraits<P13> TArg13;
typedef typename TArg13::TStorage S13; S13 p13 = S13();
1636 typedef ArgumentTraits<P14> TArg14;
typedef typename TArg14::TStorage S14; S14 p14 = S14();
1638 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) != 0 )
1642 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14));
1645 TCallback callback_;
1672template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14>
1673struct PyExportTraits<
util::Callback14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> >:
1675 util::Callback14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>,
1676 impl::PyCallback14Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>,
1677 PyExportTraits< util::Callback14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> >
1680 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!, P13!, P14!], None]";
1682 static const char* className() {
return "Callback14"; }
1691#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_15)
1692# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_15
1693# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_15
1701 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15>
1702 class Functor15Python:
public FunctorPythonBase
1705 Functor15Python(
const TPyObjPtr& callable): FunctorPythonBase(callable) {}
1706 void operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12,
typename util::CallTraits<P13>::TParam p13,
typename util::CallTraits<P14>::TParam p14,
typename util::CallTraits<P15>::TParam p15)
const
1709 this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15));
1713 template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15>
1714 class PyCallback15Impl:
public PyCallbackImplBase
1717 using TCallback = util::Callback15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>;
1718 using TFunctor = Functor15Python<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>;
1719 using TDispatcher = util::impl::Dispatcher15Function<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, TFunctor>;
1721 PyCallback15Impl(TCallback callback): callback_(std::move(callback)) {}
1722 const TCallback& callable()
const {
return callback_; }
1724 PyObject* call(PyObject* args)
const override
1726 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1727 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
1728 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
1729 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
1730 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
1731 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
1732 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
1733 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
1734 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
1735 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
1736 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
1737 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
1738 typedef ArgumentTraits<P13> TArg13;
typedef typename TArg13::TStorage S13; S13 p13 = S13();
1739 typedef ArgumentTraits<P14> TArg14;
typedef typename TArg14::TStorage S14; S14 p14 = S14();
1740 typedef ArgumentTraits<P15> TArg15;
typedef typename TArg15::TStorage S15; S15 p15 = S15();
1742 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) != 0 )
1746 return Caller<void>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15));
1749 TCallback callback_;
1776template <
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15>
1777struct PyExportTraits<
util::Callback15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> >:
1779 util::Callback15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>,
1780 impl::PyCallback15Impl<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>,
1781 PyExportTraits< util::Callback15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> >
1784 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!, P13!, P14!, P15!], None]";
1786 static const char* className() {
return "Callback15"; }
1799#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R0)
1800# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R0
1801# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R0
1809 template <
typename R>
1810 class FunctorPythonR0:
public FunctorPythonRBase<R>
1813 FunctorPythonR0(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
1814 R operator()()
const
1821 template <
typename R>
1822 class PyCallbackR0Impl:
public PyCallbackImplBase
1825 using TCallback = util::CallbackR0<R>;
1826 using TFunctor = FunctorPythonR0<R>;
1827 using TDispatcher = util::impl::DispatcherR0Function<R, TFunctor>;
1829 PyCallbackR0Impl(TCallback callback): callback_(std::move(callback)) {}
1830 const TCallback& callable()
const {
return callback_; }
1832 PyObject* call(PyObject* args)
const override
1834 if ( decodeTuple(args) != 0 )
1838 return Caller<R>::template callFunction<const TCallback&>(callback_);
1841 TCallback callback_;
1868template <
typename R>
1871 util::CallbackR0<R>,
1872 impl::PyCallbackR0Impl<R>,
1873 PyExportTraits< util::CallbackR0<R> >
1876 static constexpr const char* py_typing =
"Callable[[], R!]";
1878 static const char* className() {
return "CallbackR0"; }
1887#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R1)
1888# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R1
1889# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R1
1897 template <
typename R,
typename P1>
1898 class FunctorPythonR1:
public FunctorPythonRBase<R>
1901 FunctorPythonR1(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
1902 R operator()(
typename util::CallTraits<P1>::TParam p1)
const
1905 return this->call(makeTuple(p1));
1909 template <
typename R,
typename P1>
1910 class PyCallbackR1Impl:
public PyCallbackImplBase
1913 using TCallback = util::CallbackR1<R, P1>;
1914 using TFunctor = FunctorPythonR1<R, P1>;
1915 using TDispatcher = util::impl::DispatcherR1Function<R, P1, TFunctor>;
1917 PyCallbackR1Impl(TCallback callback): callback_(std::move(callback)) {}
1918 const TCallback& callable()
const {
return callback_; }
1920 PyObject* call(PyObject* args)
const override
1922 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
1924 if ( decodeTuple<S1>(args, p1) != 0 )
1928 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1));
1931 TCallback callback_;
1959template <
typename R,
typename P1>
1962 util::CallbackR1<R, P1>,
1963 impl::PyCallbackR1Impl<R, P1>,
1964 PyExportTraits< util::CallbackR1<R, P1> >
1967 static constexpr const char* py_typing =
"Callable[[P1!], R!]";
1969 static const char* className() {
return "CallbackR1"; }
1978#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R2)
1979# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R2
1980# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R2
1988 template <
typename R,
typename P1,
typename P2>
1989 class FunctorPythonR2:
public FunctorPythonRBase<R>
1992 FunctorPythonR2(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
1993 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2)
const
1996 return this->call(makeTuple(p1, p2));
2000 template <
typename R,
typename P1,
typename P2>
2001 class PyCallbackR2Impl:
public PyCallbackImplBase
2004 using TCallback = util::CallbackR2<R, P1, P2>;
2005 using TFunctor = FunctorPythonR2<R, P1, P2>;
2006 using TDispatcher = util::impl::DispatcherR2Function<R, P1, P2, TFunctor>;
2008 PyCallbackR2Impl(TCallback callback): callback_(std::move(callback)) {}
2009 const TCallback& callable()
const {
return callback_; }
2011 PyObject* call(PyObject* args)
const override
2013 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2014 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2016 if ( decodeTuple<S1, S2>(args, p1, p2) != 0 )
2020 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2));
2023 TCallback callback_;
2051template <
typename R,
typename P1,
typename P2>
2054 util::CallbackR2<R, P1, P2>,
2055 impl::PyCallbackR2Impl<R, P1, P2>,
2056 PyExportTraits< util::CallbackR2<R, P1, P2> >
2059 static constexpr const char* py_typing =
"Callable[[P1!, P2!], R!]";
2061 static const char* className() {
return "CallbackR2"; }
2070#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R3)
2071# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R3
2072# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R3
2080 template <
typename R,
typename P1,
typename P2,
typename P3>
2081 class FunctorPythonR3:
public FunctorPythonRBase<R>
2084 FunctorPythonR3(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2085 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3)
const
2088 return this->call(makeTuple(p1, p2, p3));
2092 template <
typename R,
typename P1,
typename P2,
typename P3>
2093 class PyCallbackR3Impl:
public PyCallbackImplBase
2096 using TCallback = util::CallbackR3<R, P1, P2, P3>;
2097 using TFunctor = FunctorPythonR3<R, P1, P2, P3>;
2098 using TDispatcher = util::impl::DispatcherR3Function<R, P1, P2, P3, TFunctor>;
2100 PyCallbackR3Impl(TCallback callback): callback_(std::move(callback)) {}
2101 const TCallback& callable()
const {
return callback_; }
2103 PyObject* call(PyObject* args)
const override
2105 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2106 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2107 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2109 if ( decodeTuple<S1, S2, S3>(args, p1, p2, p3) != 0 )
2113 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3));
2116 TCallback callback_;
2144template <
typename R,
typename P1,
typename P2,
typename P3>
2147 util::CallbackR3<R, P1, P2, P3>,
2148 impl::PyCallbackR3Impl<R, P1, P2, P3>,
2149 PyExportTraits< util::CallbackR3<R, P1, P2, P3> >
2152 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!], R!]";
2154 static const char* className() {
return "CallbackR3"; }
2163#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R4)
2164# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R4
2165# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R4
2173 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4>
2174 class FunctorPythonR4:
public FunctorPythonRBase<R>
2177 FunctorPythonR4(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2178 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4)
const
2181 return this->call(makeTuple(p1, p2, p3, p4));
2185 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4>
2186 class PyCallbackR4Impl:
public PyCallbackImplBase
2189 using TCallback = util::CallbackR4<R, P1, P2, P3, P4>;
2190 using TFunctor = FunctorPythonR4<R, P1, P2, P3, P4>;
2191 using TDispatcher = util::impl::DispatcherR4Function<R, P1, P2, P3, P4, TFunctor>;
2193 PyCallbackR4Impl(TCallback callback): callback_(std::move(callback)) {}
2194 const TCallback& callable()
const {
return callback_; }
2196 PyObject* call(PyObject* args)
const override
2198 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2199 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2200 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2201 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2203 if ( decodeTuple<S1, S2, S3, S4>(args, p1, p2, p3, p4) != 0 )
2207 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4));
2210 TCallback callback_;
2238template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4>
2241 util::CallbackR4<R, P1, P2, P3, P4>,
2242 impl::PyCallbackR4Impl<R, P1, P2, P3, P4>,
2243 PyExportTraits< util::CallbackR4<R, P1, P2, P3, P4> >
2246 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!], R!]";
2248 static const char* className() {
return "CallbackR4"; }
2257#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R5)
2258# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R5
2259# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R5
2267 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
2268 class FunctorPythonR5:
public FunctorPythonRBase<R>
2271 FunctorPythonR5(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2272 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5)
const
2275 return this->call(makeTuple(p1, p2, p3, p4, p5));
2279 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
2280 class PyCallbackR5Impl:
public PyCallbackImplBase
2283 using TCallback = util::CallbackR5<R, P1, P2, P3, P4, P5>;
2284 using TFunctor = FunctorPythonR5<R, P1, P2, P3, P4, P5>;
2285 using TDispatcher = util::impl::DispatcherR5Function<R, P1, P2, P3, P4, P5, TFunctor>;
2287 PyCallbackR5Impl(TCallback callback): callback_(std::move(callback)) {}
2288 const TCallback& callable()
const {
return callback_; }
2290 PyObject* call(PyObject* args)
const override
2292 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2293 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2294 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2295 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2296 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2298 if ( decodeTuple<S1, S2, S3, S4, S5>(args, p1, p2, p3, p4, p5) != 0 )
2302 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5));
2305 TCallback callback_;
2333template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
2336 util::CallbackR5<R, P1, P2, P3, P4, P5>,
2337 impl::PyCallbackR5Impl<R, P1, P2, P3, P4, P5>,
2338 PyExportTraits< util::CallbackR5<R, P1, P2, P3, P4, P5> >
2341 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!], R!]";
2343 static const char* className() {
return "CallbackR5"; }
2352#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R6)
2353# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R6
2354# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R6
2362 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
2363 class FunctorPythonR6:
public FunctorPythonRBase<R>
2366 FunctorPythonR6(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2367 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6)
const
2370 return this->call(makeTuple(p1, p2, p3, p4, p5, p6));
2374 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
2375 class PyCallbackR6Impl:
public PyCallbackImplBase
2378 using TCallback = util::CallbackR6<R, P1, P2, P3, P4, P5, P6>;
2379 using TFunctor = FunctorPythonR6<R, P1, P2, P3, P4, P5, P6>;
2380 using TDispatcher = util::impl::DispatcherR6Function<R, P1, P2, P3, P4, P5, P6, TFunctor>;
2382 PyCallbackR6Impl(TCallback callback): callback_(std::move(callback)) {}
2383 const TCallback& callable()
const {
return callback_; }
2385 PyObject* call(PyObject* args)
const override
2387 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2388 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2389 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2390 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2391 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2392 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2394 if ( decodeTuple<S1, S2, S3, S4, S5, S6>(args, p1, p2, p3, p4, p5, p6) != 0 )
2398 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6));
2401 TCallback callback_;
2429template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
2432 util::CallbackR6<R, P1, P2, P3, P4, P5, P6>,
2433 impl::PyCallbackR6Impl<R, P1, P2, P3, P4, P5, P6>,
2434 PyExportTraits< util::CallbackR6<R, P1, P2, P3, P4, P5, P6> >
2437 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!], R!]";
2439 static const char* className() {
return "CallbackR6"; }
2448#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R7)
2449# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R7
2450# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R7
2458 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
2459 class FunctorPythonR7:
public FunctorPythonRBase<R>
2462 FunctorPythonR7(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2463 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7)
const
2466 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7));
2470 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
2471 class PyCallbackR7Impl:
public PyCallbackImplBase
2474 using TCallback = util::CallbackR7<R, P1, P2, P3, P4, P5, P6, P7>;
2475 using TFunctor = FunctorPythonR7<R, P1, P2, P3, P4, P5, P6, P7>;
2476 using TDispatcher = util::impl::DispatcherR7Function<R, P1, P2, P3, P4, P5, P6, P7, TFunctor>;
2478 PyCallbackR7Impl(TCallback callback): callback_(std::move(callback)) {}
2479 const TCallback& callable()
const {
return callback_; }
2481 PyObject* call(PyObject* args)
const override
2483 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2484 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2485 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2486 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2487 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2488 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2489 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
2491 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7>(args, p1, p2, p3, p4, p5, p6, p7) != 0 )
2495 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7));
2498 TCallback callback_;
2526template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
2529 util::CallbackR7<R, P1, P2, P3, P4, P5, P6, P7>,
2530 impl::PyCallbackR7Impl<R, P1, P2, P3, P4, P5, P6, P7>,
2531 PyExportTraits< util::CallbackR7<R, P1, P2, P3, P4, P5, P6, P7> >
2534 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!], R!]";
2536 static const char* className() {
return "CallbackR7"; }
2545#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R8)
2546# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R8
2547# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R8
2555 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
2556 class FunctorPythonR8:
public FunctorPythonRBase<R>
2559 FunctorPythonR8(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2560 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8)
const
2563 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8));
2567 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
2568 class PyCallbackR8Impl:
public PyCallbackImplBase
2571 using TCallback = util::CallbackR8<R, P1, P2, P3, P4, P5, P6, P7, P8>;
2572 using TFunctor = FunctorPythonR8<R, P1, P2, P3, P4, P5, P6, P7, P8>;
2573 using TDispatcher = util::impl::DispatcherR8Function<R, P1, P2, P3, P4, P5, P6, P7, P8, TFunctor>;
2575 PyCallbackR8Impl(TCallback callback): callback_(std::move(callback)) {}
2576 const TCallback& callable()
const {
return callback_; }
2578 PyObject* call(PyObject* args)
const override
2580 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2581 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2582 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2583 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2584 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2585 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2586 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
2587 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
2589 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8>(args, p1, p2, p3, p4, p5, p6, p7, p8) != 0 )
2593 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8));
2596 TCallback callback_;
2624template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8>
2627 util::CallbackR8<R, P1, P2, P3, P4, P5, P6, P7, P8>,
2628 impl::PyCallbackR8Impl<R, P1, P2, P3, P4, P5, P6, P7, P8>,
2629 PyExportTraits< util::CallbackR8<R, P1, P2, P3, P4, P5, P6, P7, P8> >
2632 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!], R!]";
2634 static const char* className() {
return "CallbackR8"; }
2643#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R9)
2644# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R9
2645# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R9
2653 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
2654 class FunctorPythonR9:
public FunctorPythonRBase<R>
2657 FunctorPythonR9(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2658 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9)
const
2661 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9));
2665 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
2666 class PyCallbackR9Impl:
public PyCallbackImplBase
2669 using TCallback = util::CallbackR9<R, P1, P2, P3, P4, P5, P6, P7, P8, P9>;
2670 using TFunctor = FunctorPythonR9<R, P1, P2, P3, P4, P5, P6, P7, P8, P9>;
2671 using TDispatcher = util::impl::DispatcherR9Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, TFunctor>;
2673 PyCallbackR9Impl(TCallback callback): callback_(std::move(callback)) {}
2674 const TCallback& callable()
const {
return callback_; }
2676 PyObject* call(PyObject* args)
const override
2678 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2679 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2680 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2681 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2682 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2683 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2684 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
2685 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
2686 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
2688 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9) != 0 )
2692 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9));
2695 TCallback callback_;
2723template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9>
2726 util::CallbackR9<R, P1, P2, P3, P4, P5, P6, P7, P8, P9>,
2727 impl::PyCallbackR9Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9>,
2728 PyExportTraits< util::CallbackR9<R, P1, P2, P3, P4, P5, P6, P7, P8, P9> >
2731 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!], R!]";
2733 static const char* className() {
return "CallbackR9"; }
2742#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R10)
2743# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R10
2744# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R10
2752 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10>
2753 class FunctorPythonR10:
public FunctorPythonRBase<R>
2756 FunctorPythonR10(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2757 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10)
const
2760 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10));
2764 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10>
2765 class PyCallbackR10Impl:
public PyCallbackImplBase
2768 using TCallback = util::CallbackR10<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>;
2769 using TFunctor = FunctorPythonR10<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>;
2770 using TDispatcher = util::impl::DispatcherR10Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, TFunctor>;
2772 PyCallbackR10Impl(TCallback callback): callback_(std::move(callback)) {}
2773 const TCallback& callable()
const {
return callback_; }
2775 PyObject* call(PyObject* args)
const override
2777 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2778 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2779 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2780 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2781 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2782 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2783 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
2784 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
2785 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
2786 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
2788 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) != 0 )
2792 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10));
2795 TCallback callback_;
2823template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10>
2824struct PyExportTraits<
util::CallbackR10<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> >:
2826 util::CallbackR10<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>,
2827 impl::PyCallbackR10Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>,
2828 PyExportTraits< util::CallbackR10<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> >
2831 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!], R!]";
2833 static const char* className() {
return "CallbackR10"; }
2842#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R11)
2843# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R11
2844# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R11
2852 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11>
2853 class FunctorPythonR11:
public FunctorPythonRBase<R>
2856 FunctorPythonR11(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2857 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11)
const
2860 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11));
2864 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11>
2865 class PyCallbackR11Impl:
public PyCallbackImplBase
2868 using TCallback = util::CallbackR11<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>;
2869 using TFunctor = FunctorPythonR11<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>;
2870 using TDispatcher = util::impl::DispatcherR11Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, TFunctor>;
2872 PyCallbackR11Impl(TCallback callback): callback_(std::move(callback)) {}
2873 const TCallback& callable()
const {
return callback_; }
2875 PyObject* call(PyObject* args)
const override
2877 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2878 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2879 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2880 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2881 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2882 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2883 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
2884 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
2885 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
2886 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
2887 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
2889 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) != 0 )
2893 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11));
2896 TCallback callback_;
2924template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11>
2925struct PyExportTraits<
util::CallbackR11<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> >:
2927 util::CallbackR11<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>,
2928 impl::PyCallbackR11Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>,
2929 PyExportTraits< util::CallbackR11<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> >
2932 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!], R!]";
2934 static const char* className() {
return "CallbackR11"; }
2943#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R12)
2944# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R12
2945# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R12
2953 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12>
2954 class FunctorPythonR12:
public FunctorPythonRBase<R>
2957 FunctorPythonR12(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
2958 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12)
const
2961 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12));
2965 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12>
2966 class PyCallbackR12Impl:
public PyCallbackImplBase
2969 using TCallback = util::CallbackR12<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>;
2970 using TFunctor = FunctorPythonR12<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>;
2971 using TDispatcher = util::impl::DispatcherR12Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, TFunctor>;
2973 PyCallbackR12Impl(TCallback callback): callback_(std::move(callback)) {}
2974 const TCallback& callable()
const {
return callback_; }
2976 PyObject* call(PyObject* args)
const override
2978 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
2979 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
2980 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
2981 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
2982 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
2983 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
2984 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
2985 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
2986 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
2987 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
2988 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
2989 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
2991 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) != 0 )
2995 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12));
2998 TCallback callback_;
3026template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12>
3027struct PyExportTraits<
util::CallbackR12<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> >:
3029 util::CallbackR12<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>,
3030 impl::PyCallbackR12Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>,
3031 PyExportTraits< util::CallbackR12<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> >
3034 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!], R!]";
3036 static const char* className() {
return "CallbackR12"; }
3045#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R13)
3046# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R13
3047# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R13
3055 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13>
3056 class FunctorPythonR13:
public FunctorPythonRBase<R>
3059 FunctorPythonR13(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
3060 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12,
typename util::CallTraits<P13>::TParam p13)
const
3063 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13));
3067 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13>
3068 class PyCallbackR13Impl:
public PyCallbackImplBase
3071 using TCallback = util::CallbackR13<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>;
3072 using TFunctor = FunctorPythonR13<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>;
3073 using TDispatcher = util::impl::DispatcherR13Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, TFunctor>;
3075 PyCallbackR13Impl(TCallback callback): callback_(std::move(callback)) {}
3076 const TCallback& callable()
const {
return callback_; }
3078 PyObject* call(PyObject* args)
const override
3080 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
3081 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
3082 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
3083 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
3084 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
3085 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
3086 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
3087 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
3088 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
3089 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
3090 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
3091 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
3092 typedef ArgumentTraits<P13> TArg13;
typedef typename TArg13::TStorage S13; S13 p13 = S13();
3094 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) != 0 )
3098 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13));
3101 TCallback callback_;
3129template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13>
3130struct PyExportTraits<
util::CallbackR13<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> >:
3132 util::CallbackR13<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>,
3133 impl::PyCallbackR13Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13>,
3134 PyExportTraits< util::CallbackR13<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> >
3137 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!, P13!], R!]";
3139 static const char* className() {
return "CallbackR13"; }
3148#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R14)
3149# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R14
3150# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R14
3158 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14>
3159 class FunctorPythonR14:
public FunctorPythonRBase<R>
3162 FunctorPythonR14(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
3163 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12,
typename util::CallTraits<P13>::TParam p13,
typename util::CallTraits<P14>::TParam p14)
const
3166 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14));
3170 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14>
3171 class PyCallbackR14Impl:
public PyCallbackImplBase
3174 using TCallback = util::CallbackR14<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>;
3175 using TFunctor = FunctorPythonR14<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>;
3176 using TDispatcher = util::impl::DispatcherR14Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, TFunctor>;
3178 PyCallbackR14Impl(TCallback callback): callback_(std::move(callback)) {}
3179 const TCallback& callable()
const {
return callback_; }
3181 PyObject* call(PyObject* args)
const override
3183 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
3184 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
3185 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
3186 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
3187 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
3188 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
3189 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
3190 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
3191 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
3192 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
3193 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
3194 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
3195 typedef ArgumentTraits<P13> TArg13;
typedef typename TArg13::TStorage S13; S13 p13 = S13();
3196 typedef ArgumentTraits<P14> TArg14;
typedef typename TArg14::TStorage S14; S14 p14 = S14();
3198 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) != 0 )
3202 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14));
3205 TCallback callback_;
3233template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14>
3234struct PyExportTraits<
util::CallbackR14<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> >:
3236 util::CallbackR14<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>,
3237 impl::PyCallbackR14Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14>,
3238 PyExportTraits< util::CallbackR14<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> >
3241 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!, P13!, P14!], R!]";
3243 static const char* className() {
return "CallbackR14"; }
3252#if defined(LASS_PRIM_HAVE_PY_EXPORT_TRAITS_CALLBACK_R15)
3253# ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R15
3254# define LASS_GUARDIAN_OF_INCLUSION_UTIL_CALLBACK_PYTHON_H_CALLBACK_R15
3262 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15>
3263 class FunctorPythonR15:
public FunctorPythonRBase<R>
3266 FunctorPythonR15(
const TPyObjPtr& callable): FunctorPythonRBase<R>(callable) {}
3267 R operator()(
typename util::CallTraits<P1>::TParam p1,
typename util::CallTraits<P2>::TParam p2,
typename util::CallTraits<P3>::TParam p3,
typename util::CallTraits<P4>::TParam p4,
typename util::CallTraits<P5>::TParam p5,
typename util::CallTraits<P6>::TParam p6,
typename util::CallTraits<P7>::TParam p7,
typename util::CallTraits<P8>::TParam p8,
typename util::CallTraits<P9>::TParam p9,
typename util::CallTraits<P10>::TParam p10,
typename util::CallTraits<P11>::TParam p11,
typename util::CallTraits<P12>::TParam p12,
typename util::CallTraits<P13>::TParam p13,
typename util::CallTraits<P14>::TParam p14,
typename util::CallTraits<P15>::TParam p15)
const
3270 return this->call(makeTuple(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15));
3274 template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15>
3275 class PyCallbackR15Impl:
public PyCallbackImplBase
3278 using TCallback = util::CallbackR15<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>;
3279 using TFunctor = FunctorPythonR15<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>;
3280 using TDispatcher = util::impl::DispatcherR15Function<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, TFunctor>;
3282 PyCallbackR15Impl(TCallback callback): callback_(std::move(callback)) {}
3283 const TCallback& callable()
const {
return callback_; }
3285 PyObject* call(PyObject* args)
const override
3287 typedef ArgumentTraits<P1> TArg1;
typedef typename TArg1::TStorage S1; S1 p1 = S1();
3288 typedef ArgumentTraits<P2> TArg2;
typedef typename TArg2::TStorage S2; S2 p2 = S2();
3289 typedef ArgumentTraits<P3> TArg3;
typedef typename TArg3::TStorage S3; S3 p3 = S3();
3290 typedef ArgumentTraits<P4> TArg4;
typedef typename TArg4::TStorage S4; S4 p4 = S4();
3291 typedef ArgumentTraits<P5> TArg5;
typedef typename TArg5::TStorage S5; S5 p5 = S5();
3292 typedef ArgumentTraits<P6> TArg6;
typedef typename TArg6::TStorage S6; S6 p6 = S6();
3293 typedef ArgumentTraits<P7> TArg7;
typedef typename TArg7::TStorage S7; S7 p7 = S7();
3294 typedef ArgumentTraits<P8> TArg8;
typedef typename TArg8::TStorage S8; S8 p8 = S8();
3295 typedef ArgumentTraits<P9> TArg9;
typedef typename TArg9::TStorage S9; S9 p9 = S9();
3296 typedef ArgumentTraits<P10> TArg10;
typedef typename TArg10::TStorage S10; S10 p10 = S10();
3297 typedef ArgumentTraits<P11> TArg11;
typedef typename TArg11::TStorage S11; S11 p11 = S11();
3298 typedef ArgumentTraits<P12> TArg12;
typedef typename TArg12::TStorage S12; S12 p12 = S12();
3299 typedef ArgumentTraits<P13> TArg13;
typedef typename TArg13::TStorage S13; S13 p13 = S13();
3300 typedef ArgumentTraits<P14> TArg14;
typedef typename TArg14::TStorage S14; S14 p14 = S14();
3301 typedef ArgumentTraits<P15> TArg15;
typedef typename TArg15::TStorage S15; S15 p15 = S15();
3303 if ( decodeTuple<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15>(args, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) != 0 )
3307 return Caller<R>::template callFunction<const TCallback&>(callback_, TArg1::arg(p1), TArg2::arg(p2), TArg3::arg(p3), TArg4::arg(p4), TArg5::arg(p5), TArg6::arg(p6), TArg7::arg(p7), TArg8::arg(p8), TArg9::arg(p9), TArg10::arg(p10), TArg11::arg(p11), TArg12::arg(p12), TArg13::arg(p13), TArg14::arg(p14), TArg15::arg(p15));
3310 TCallback callback_;
3338template <
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15>
3339struct PyExportTraits<
util::CallbackR15<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> >:
3341 util::CallbackR15<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>,
3342 impl::PyCallbackR15Impl<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>,
3343 PyExportTraits< util::CallbackR15<R, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> >
3346 static constexpr const char* py_typing =
"Callable[[P1!, P2!, P3!, P4!, P5!, P6!, P7!, P8!, P9!, P10!, P11!, P12!, P13!, P14!, P15!], R!]";
3348 static const char* className() {
return "CallbackR15"; }
acquire the GIL for the current scope.
void addMessageHeader(const char *header)
Prepend a message to the current Python exception value.
void fetchAndThrowPythonException(std::string loc)
Fetch the current Python exception and throw it as a C++ PythonException.
PyObjectPtr< PyObject >::Type TPyObjPtr
PyObjectPtr to a PyObject.
#define PY_HEADER(t_parentClass)
Place as first line of your Pythonized class.
PyObject * fromSharedPtrToNakedCast(const util::SharedPtr< T, PyObjectStorage, PyObjectCounter > &object)
fromSharedPtrToNakedCast.
Comprehensive C++ to Python binding library.
general utility, debug facilities, ...
Library for Assembled Shared Sources.
Helper class to implement PyExportTraits for Callback types.
by copy, general case assumes shadow type or PyObjectPlus based type.