Library of Assembled Shared Sources
pyobject_call.inl File Reference
#include "python_common.h"
#include "pyobject_plus.h"
#include "py_tuple.h"
#include "pyshadow_object.h"
#include "argument_traits.h"
#include "exception.h"
#include "gil.h"
#include "../util/call_traits.h"
#include "../meta/if.h"
#include "../meta/select.h"
#include "../meta/wrap.h"
#include "../meta/type_list.h"
#include "../meta/type_tuple.h"
#include "../meta/is_const.h"
Include dependency graph for pyobject_call.inl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lass::python::impl::Caller< R >
 calls the actual function with provided parameters, and returns result as a PyObject pointer. More...
 
struct  lass::python::impl::Caller< void >
 specialisation for functions without return value, calls function and returns Py_None. More...
 

Namespaces

namespace  lass
 Library for Assembled Shared Sources.
 
namespace  lass::python
 Comprehensive C++ to Python binding library.
 

Functions

template<typename R>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)())
 calls C++ function without arguments
 
template<typename R, typename P1>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1))
 calls C++ function with 1 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2))
 calls C++ function with 2 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3))
 calls C++ function with 3 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4))
 calls C++ function with 4 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5))
 calls C++ function with 5 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6))
 calls C++ function with 6 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7))
 calls C++ function with 7 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8))
 calls C++ function with 8 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9))
 calls C++ function with 9 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10))
 calls C++ function with 10 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11))
 calls C++ function with 11 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12))
 calls C++ function with 12 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13))
 calls C++ function with 13 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14))
 calls C++ function with 14 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, R(*function)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15))
 calls C++ function with 15 arguments, translated from python arguments
 
template<typename R>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R()> function)
 calls std::function without arguments
 
template<typename R, typename P1>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1)> function)
 calls std::function with 1 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2)> function)
 calls std::function with 2 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3)> function)
 calls std::function with 3 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4)> function)
 calls std::function with 4 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5)> function)
 calls std::function with 5 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6)> function)
 calls std::function with 6 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7)> function)
 calls std::function with 7 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8)> function)
 calls std::function with 8 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9)> function)
 calls std::function with 9 arguments, translated from python arguments
 
template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)> function)
 calls std::function with 10 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)> function)
 calls std::function with 11 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)> function)
 calls std::function with 12 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)> function)
 calls std::function with 13 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)> function)
 calls std::function with 14 arguments, translated from python arguments
 
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>
PyObject * lass::python::impl::callFunction (PyObject *args, std::function< R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)> function)
 calls std::function with 15 arguments, translated from python arguments
 
template<typename ShadowTraits>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with default constructor.
 
template<typename ShadowTraits, typename P1>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 1 arguments.
 
template<typename ShadowTraits, typename P1, typename P2>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 2 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 3 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 4 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 5 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 6 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 7 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 8 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 9 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 10 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 11 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 12 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 13 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 14 arguments.
 
template<typename ShadowTraits, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15>
PyObject * lass::python::impl::construct (PyTypeObject *subType, PyObject *args)
 allocate a new object with 15 arguments.
 

Detailed Description

Author
Bram de Greve (bram@.nosp@m.coca.nosp@m.mware.nosp@m..com)
Tom De Muer (tom@c.nosp@m.ocam.nosp@m.ware..nosp@m.com)

*** BEGIN LICENSE INFORMATION ***

The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://lass.sourceforge.net/cpal-license. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is LASS - Library of Assembled Shared Sources.

The Initial Developer of the Original Code is Bram de Greve and Tom De Muer. The Original Developer is the Initial Developer.

All portions of the code written by the Initial Developer are: Copyright (C) 2004-2025 the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the GPL), in which case the provisions of GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the GPL.

*** END LICENSE INFORMATION ***

Definition in file pyobject_call.inl.