μHAL (v2.8.6)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Typedefs | Functions
pybind11.h File Reference
#include "attr.h"
#include "options.h"
#include "detail/class.h"
#include "detail/init.h"
#include <memory>
#include <vector>
#include <string>
#include <utility>
Include dependency graph for pybind11.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cpp_function
 Wraps an arbitrary C++ function/method/lambda function/.. into a callable Python object. More...
 
class  module_
 Wrapper for Python extension modules. More...
 
struct  module_::module_def
 
class  generic_type
 Generic support for creating new Python heap types. More...
 
struct  has_operator_delete< T, SFINAE >
 
struct  has_operator_delete< T, void_t< decltype(static_cast< void(*)(void *)>(T::operator delete))> >
 
struct  has_operator_delete_size< T, SFINAE >
 
struct  has_operator_delete_size< T, void_t< decltype(static_cast< void(*)(void *, size_t)>(T::operator delete))> >
 
class  class_< type_, options >
 
struct  class_< type_, options >::is_valid_class_option< T >
 
struct  enum_base
 
class  enum_< Type >
 Binds C++ enumerations and enumeration classes to Python. More...
 
struct  iterator_state< Iterator, Sentinel, KeyIterator, Policy >
 
class  exception< type >
 Wrapper to generate a new Python exception type. More...
 
class  gil_scoped_acquire
 
class  gil_scoped_release
 

Macros

#define PYBIND11_ENUM_OP_STRICT(op, expr, strict_behavior)
 
#define PYBIND11_ENUM_OP_CONV(op, expr)
 
#define PYBIND11_ENUM_OP_CONV_LHS(op, expr)
 
#define PYBIND11_THROW   throw type_error("Expected an enumeration of matching type!");
 
#define PYBIND11_OVERRIDE_IMPL(ret_type, cname, name, ...)
 
#define PYBIND11_OVERRIDE_NAME(ret_type, cname, name, fn, ...)
 \rst Macro to populate the virtual method in the trampoline class. More...
 
#define PYBIND11_OVERRIDE_PURE_NAME(ret_type, cname, name, fn, ...)
 \rst Macro for pure virtual functions, this function is identical to :c:macro:PYBIND11_OVERRIDE_NAME, except that it throws if no override can be found. More...
 
#define PYBIND11_OVERRIDE(ret_type, cname, fn, ...)   PYBIND11_OVERRIDE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)
 \rst Macro to populate the virtual method in the trampoline class. More...
 
#define PYBIND11_OVERRIDE_PURE(ret_type, cname, fn, ...)   PYBIND11_OVERRIDE_PURE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)
 \rst Macro for pure virtual functions, this function is identical to :c:macro:PYBIND11_OVERRIDE, except that it throws if no override can be found. More...
 
#define PYBIND11_OVERLOAD_INT(ret_type, cname, name, ...)   PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__)
 
#define PYBIND11_OVERLOAD_NAME(ret_type, cname, name, fn, ...)   PYBIND11_OVERRIDE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, fn, __VA_ARGS__)
 
#define PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...)   PYBIND11_OVERRIDE_PURE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, fn, __VA_ARGS__);
 
#define PYBIND11_OVERLOAD(ret_type, cname, fn, ...)   PYBIND11_OVERRIDE(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), fn, __VA_ARGS__)
 
#define PYBIND11_OVERLOAD_PURE(ret_type, cname, fn, ...)   PYBIND11_OVERRIDE_PURE(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), fn, __VA_ARGS__);
 

Typedefs

using module = module_
 

Functions

dict globals ()
 
template<typename T , typename = void_t<decltype(static_cast<void *(*)(size_t)>(T::operator new))>>
void set_operator_new (type_record *r)
 Set the pointer to operator new if it exists. The cast is needed because it can be overloaded. More...
 
template<typename >
void set_operator_new (...)
 
template<typename T , enable_if_t< has_operator_delete< T >::value, int > = 0>
void call_operator_delete (T *p, size_t, size_t)
 Call class-specific delete if it exists or global otherwise. Can also be an overload set. More...
 
void call_operator_delete (void *p, size_t s, size_t a)
 
void add_class_method (object &cls, const char *name_, const cpp_function &cf)
 
template<typename , typename F >
auto method_adaptor (F &&f) -> decltype(std::forward< F >(f))
 Given a pointer to a member function, cast it to its Derived version. More...
 
template<typename Derived , typename Return , typename Class , typename... Args>
auto method_adaptor (Return(Class::*pmf)(Args...)) -> Return(Derived::*)(Args...)
 
template<typename... Args>
detail::initimpl::constructor< Args... > init ()
 Binds an existing constructor taking arguments Args... More...
 
template<typename... Args>
detail::initimpl::alias_constructor< Args... > init_alias ()
 Like init<Args...>(), but the instance is always constructed through the alias class (even when not inheriting on the Python side). More...
 
template<typename Func , typename Ret = detail::initimpl::factory<Func>>
Ret init (Func &&f)
 Binds a factory function as a constructor. More...
 
template<typename CFunc , typename AFunc , typename Ret = detail::initimpl::factory<CFunc, AFunc>>
Ret init (CFunc &&c, AFunc &&a)
 Dual-argument factory function: the first function is called when no alias is needed, the second when an alias is needed (i.e. More...
 
template<typename GetState , typename SetState >
detail::initimpl::pickle_factory< GetState, SetState > pickle (GetState &&g, SetState &&s)
 Binds pickling functions __getstate__ and __setstate__ and ensures that the type returned by __getstate__ is the same as the argument accepted by __setstate__. More...
 
str enum_name (handle arg)
 
void keep_alive_impl (handle nurse, handle patient)
 
PYBIND11_NOINLINE void keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret)
 
std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache (PyTypeObject *type)
 
template<return_value_policy Policy = return_value_policy::reference_internal, typename Iterator , typename Sentinel , typename ValueType = decltype(*std::declval<Iterator>()), typename... Extra>
iterator make_iterator (Iterator first, Sentinel last, Extra &&... extra)
 Makes a python iterator from a first and past-the-end C++ InputIterator. More...
 
template<return_value_policy Policy = return_value_policy::reference_internal, typename Iterator , typename Sentinel , typename KeyType = decltype((*std::declval<Iterator>()).first), typename... Extra>
iterator make_key_iterator (Iterator first, Sentinel last, Extra &&... extra)
 Makes an python iterator over the keys (.first) of a iterator over pairs from a first and past-the-end InputIterator. More...
 
template<return_value_policy Policy = return_value_policy::reference_internal, typename Type , typename... Extra>
iterator make_iterator (Type &value, Extra &&... extra)
 Makes an iterator over values of an stl container or other container supporting std::begin()/std::end() More...
 
template<return_value_policy Policy = return_value_policy::reference_internal, typename Type , typename... Extra>
iterator make_key_iterator (Type &value, Extra &&... extra)
 Makes an iterator over the keys (.first) of a stl map-like container supporting std::begin()/std::end() More...
 
template<typename InputType , typename OutputType >
void implicitly_convertible ()
 
template<typename ExceptionTranslator >
void register_exception_translator (ExceptionTranslator &&translator)
 
template<typename CppException >
exception< CppException > & get_exception_object ()
 
template<typename CppException >
exception< CppException > & register_exception (handle scope, const char *name, handle base=PyExc_Exception)
 Registers a Python exception in m of the given name and installs an exception translator to translate the C++ exception to the created Python exception using the exceptions what() method. More...
 
PYBIND11_NOINLINE void print (tuple args, dict kwargs)
 
template<return_value_policy policy = return_value_policy::automatic_reference, typename... Args>
void print (Args &&...args)
 
function get_type_override (const void *this_ptr, const type_info *this_type, const char *name)
 
template<class T >
function get_override (const T *this_ptr, const char *name)
 \rst Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr. More...
 
function get_type_overload (const void *this_ptr, const detail::type_info *this_type, const char *name)
 
template<class T >
function get_overload (const T *this_ptr, const char *name)
 

Macro Definition Documentation

◆ PYBIND11_ENUM_OP_CONV

#define PYBIND11_ENUM_OP_CONV (   op,
  expr 
)
Value:
m_base.attr(op) = cpp_function( \
[](object a_, object b_) { \
int_ a(a_), b(b_); \
return expr; \
}, \
name(op), is_method(m_base), arg("other"))

◆ PYBIND11_ENUM_OP_CONV_LHS

#define PYBIND11_ENUM_OP_CONV_LHS (   op,
  expr 
)
Value:
m_base.attr(op) = cpp_function( \
[](object a_, object b) { \
int_ a(a_); \
return expr; \
}, \
name(op), is_method(m_base), arg("other"))

◆ PYBIND11_ENUM_OP_STRICT

#define PYBIND11_ENUM_OP_STRICT (   op,
  expr,
  strict_behavior 
)
Value:
m_base.attr(op) = cpp_function( \
[](object a, object b) { \
if (!type::handle_of(a).is(type::handle_of(b))) \
strict_behavior; \
return expr; \
}, \
name(op), is_method(m_base), arg("other"))

◆ PYBIND11_OVERLOAD

#define PYBIND11_OVERLOAD (   ret_type,
  cname,
  fn,
  ... 
)    PYBIND11_OVERRIDE(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), fn, __VA_ARGS__)

Definition at line 2368 of file pybind11.h.

◆ PYBIND11_OVERLOAD_INT

#define PYBIND11_OVERLOAD_INT (   ret_type,
  cname,
  name,
  ... 
)    PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__)

Definition at line 2362 of file pybind11.h.

◆ PYBIND11_OVERLOAD_NAME

#define PYBIND11_OVERLOAD_NAME (   ret_type,
  cname,
  name,
  fn,
  ... 
)    PYBIND11_OVERRIDE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, fn, __VA_ARGS__)

Definition at line 2364 of file pybind11.h.

◆ PYBIND11_OVERLOAD_PURE

#define PYBIND11_OVERLOAD_PURE (   ret_type,
  cname,
  fn,
  ... 
)    PYBIND11_OVERRIDE_PURE(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), fn, __VA_ARGS__);

Definition at line 2370 of file pybind11.h.

◆ PYBIND11_OVERLOAD_PURE_NAME

#define PYBIND11_OVERLOAD_PURE_NAME (   ret_type,
  cname,
  name,
  fn,
  ... 
)    PYBIND11_OVERRIDE_PURE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, fn, __VA_ARGS__);

Definition at line 2366 of file pybind11.h.

◆ PYBIND11_OVERRIDE

#define PYBIND11_OVERRIDE (   ret_type,
  cname,
  fn,
  ... 
)    PYBIND11_OVERRIDE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)

\rst Macro to populate the virtual method in the trampoline class.

This macro tries to look up the method from the Python side, deals with the :ref:gil and necessary argument conversions to call this method and return the appropriate type. This macro should be used if the method name in C and in Python are identical. See :ref:overriding_virtuals for more information.

.. code-block:: cpp

class PyAnimal : public Animal { public: Inherit the constructors using Animal::Animal;

Trampoline (need one for each virtual function) std::string go(int n_times) override { PYBIND11_OVERRIDE_PURE( std::string, // Return type (ret_type) Animal, // Parent class (cname) go, // Name of function in C++ (must match Python name) (fn) n_times // Argument(s) (...) ); } }; \endrst

Definition at line 2339 of file pybind11.h.

◆ PYBIND11_OVERRIDE_IMPL

#define PYBIND11_OVERRIDE_IMPL (   ret_type,
  cname,
  name,
  ... 
)
Value:
do { \
pybind11::gil_scoped_acquire gil; \
pybind11::function override = pybind11::get_override(static_cast<const cname *>(this), name); \
if (override) { \
auto o = override(__VA_ARGS__); \
static pybind11::detail::override_caster_t<ret_type> caster; \
return pybind11::detail::cast_ref<ret_type>(std::move(o), caster); \
} \
else return pybind11::detail::cast_safe<ret_type>(std::move(o)); \
} \
} while (false)

Definition at line 2268 of file pybind11.h.

◆ PYBIND11_OVERRIDE_NAME

#define PYBIND11_OVERRIDE_NAME (   ret_type,
  cname,
  name,
  fn,
  ... 
)
Value:
do { \
PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__); \
return cname::fn(__VA_ARGS__); \
} while (false)

\rst Macro to populate the virtual method in the trampoline class.

This macro tries to look up a method named 'fn' from the Python side, deals with the :ref:gil and necessary argument conversions to call this method and return the appropriate type. See :ref:overriding_virtuals for more information. This macro should be used when the method name in C is not the same as the method name in Python. For example with __str__.

.. code-block:: cpp

std::string toString() override { PYBIND11_OVERRIDE_NAME( std::string, // Return type (ret_type) Animal, // Parent class (cname) "__str__", // Name of method in Python (name) toString, // Name of function in C++ (fn) ); } \endrst

Definition at line 2299 of file pybind11.h.

◆ PYBIND11_OVERRIDE_PURE

#define PYBIND11_OVERRIDE_PURE (   ret_type,
  cname,
  fn,
  ... 
)    PYBIND11_OVERRIDE_PURE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)

\rst Macro for pure virtual functions, this function is identical to :c:macro:PYBIND11_OVERRIDE, except that it throws if no override can be found.

\endrst

Definition at line 2346 of file pybind11.h.

◆ PYBIND11_OVERRIDE_PURE_NAME

#define PYBIND11_OVERRIDE_PURE_NAME (   ret_type,
  cname,
  name,
  fn,
  ... 
)
Value:
do { \
PYBIND11_OVERRIDE_IMPL(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__); \
pybind11::pybind11_fail("Tried to call pure virtual function \"" PYBIND11_STRINGIFY(cname) "::" name "\""); \
} while (false)

\rst Macro for pure virtual functions, this function is identical to :c:macro:PYBIND11_OVERRIDE_NAME, except that it throws if no override can be found.

\endrst

Definition at line 2309 of file pybind11.h.

◆ PYBIND11_THROW

#define PYBIND11_THROW   throw type_error("Expected an enumeration of matching type!");

Typedef Documentation

◆ module

using module = module_

Definition at line 1017 of file pybind11.h.

Function Documentation

◆ add_class_method()

void add_class_method ( object cls,
const char *  name_,
const cpp_function cf 
)
inline

Definition at line 1164 of file pybind11.h.

References cpp_function::name().

Referenced by class_< Type >::def().

◆ all_type_info_get_cache()

std::pair<decltype(internals::registered_types_py)::iterator, bool> all_type_info_get_cache ( PyTypeObject *  type)
inline

◆ call_operator_delete() [1/2]

template<typename T , enable_if_t< has_operator_delete< T >::value, int > = 0>
void call_operator_delete ( T *  p,
size_t  s,
size_t   
)

Call class-specific delete if it exists or global otherwise. Can also be an overload set.

Definition at line 1141 of file pybind11.h.

Referenced by class_< Type >::dealloc().

◆ call_operator_delete() [2/2]

void call_operator_delete ( void *  p,
size_t  s,
size_t  a 
)
inline

Definition at line 1145 of file pybind11.h.

◆ enum_name()

str enum_name ( handle  arg)
inline

Definition at line 1563 of file pybind11.h.

References handle::handle().

Referenced by enum_base::init().

◆ get_exception_object()

template<typename CppException >
exception<CppException>& get_exception_object ( )

Definition at line 1974 of file pybind11.h.

◆ get_overload()

template<class T >
function get_overload ( const T *  this_ptr,
const char *  name 
)
inline

Definition at line 2357 of file pybind11.h.

References get_override().

◆ get_override()

template<class T >
function get_override ( const T *  this_ptr,
const char *  name 
)

\rst Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr.

:this_ptr: The pointer to the object the overriden method should be retrieved for. This should be the first non-trampoline class encountered in the inheritance chain. :name: The name of the overridden Python method to retrieve. :return: The Python method by this name from the object or an empty function wrapper. \endrst

Definition at line 2262 of file pybind11.h.

References get_type_info(), and get_type_override().

Referenced by get_overload().

◆ get_type_overload()

function get_type_overload ( const void *  this_ptr,
const detail::type_info *  this_type,
const char *  name 
)
inline

Definition at line 2352 of file pybind11.h.

References get_type_override().

◆ get_type_override()

function get_type_override ( const void *  this_ptr,
const type_info this_type,
const char *  name 
)
inline

◆ implicitly_convertible()

template<typename InputType , typename OutputType >
void implicitly_convertible ( )

Definition at line 1909 of file pybind11.h.

References get_type_info(), handle::ptr(), and pybind11_fail().

◆ init() [1/3]

template<typename... Args>
detail::initimpl::constructor<Args...> init ( )

◆ init() [2/3]

template<typename CFunc , typename AFunc , typename Ret = detail::initimpl::factory<CFunc, AFunc>>
Ret init ( CFunc &&  c,
AFunc &&  a 
)

Dual-argument factory function: the first function is called when no alias is needed, the second when an alias is needed (i.e.

due to python-side inheritance). Arguments must be identical.

Definition at line 1550 of file pybind11.h.

References uhal::tests::c.

◆ init() [3/3]

template<typename Func , typename Ret = detail::initimpl::factory<Func>>
Ret init ( Func &&  f)

Binds a factory function as a constructor.

Definition at line 1545 of file pybind11.h.

◆ init_alias()

template<typename... Args>
detail::initimpl::alias_constructor<Args...> init_alias ( )

Like init<Args...>(), but the instance is always constructed through the alias class (even when not inheriting on the Python side).

Definition at line 1541 of file pybind11.h.

◆ keep_alive_impl() [1/2]

void keep_alive_impl ( handle  nurse,
handle  patient 
)
inline

◆ keep_alive_impl() [2/2]

PYBIND11_NOINLINE void keep_alive_impl ( size_t  Nurse,
size_t  Patient,
function_call call,
handle  ret 
)
inline

◆ make_iterator() [1/2]

template<return_value_policy Policy = return_value_policy::reference_internal, typename Iterator , typename Sentinel , typename ValueType = decltype(*std::declval<Iterator>()), typename... Extra>
iterator make_iterator ( Iterator  first,
Sentinel  last,
Extra &&...  extra 
)

Makes a python iterator from a first and past-the-end C++ InputIterator.

Definition at line 1844 of file pybind11.h.

References handle::cast(), class_< type_, options >::def(), first(), get_type_info(), handle::handle(), uhal::tests::if(), and last().

Referenced by bind_map(), PYBIND11_MODULE(), TEST_SUBMODULE(), and vector_accessor().

◆ make_iterator() [2/2]

template<return_value_policy Policy = return_value_policy::reference_internal, typename Type , typename... Extra>
iterator make_iterator ( Type &  value,
Extra &&...  extra 
)

Makes an iterator over values of an stl container or other container supporting std::begin()/std::end()

Definition at line 1898 of file pybind11.h.

References libsize::end, and test_callbacks::value.

◆ make_key_iterator() [1/2]

template<return_value_policy Policy = return_value_policy::reference_internal, typename Iterator , typename Sentinel , typename KeyType = decltype((*std::declval<Iterator>()).first), typename... Extra>
iterator make_key_iterator ( Iterator  first,
Sentinel  last,
Extra &&...  extra 
)

Makes an python iterator over the keys (.first) of a iterator over pairs from a first and past-the-end InputIterator.

Definition at line 1873 of file pybind11.h.

References handle::cast(), class_< type_, options >::def(), first(), get_type_info(), handle::handle(), uhal::tests::if(), and last().

Referenced by bind_map(), and TEST_SUBMODULE().

◆ make_key_iterator() [2/2]

template<return_value_policy Policy = return_value_policy::reference_internal, typename Type , typename... Extra>
iterator make_key_iterator ( Type &  value,
Extra &&...  extra 
)

Makes an iterator over the keys (.first) of a stl map-like container supporting std::begin()/std::end()

Definition at line 1905 of file pybind11.h.

References libsize::end, and test_callbacks::value.

◆ method_adaptor() [1/2]

template<typename , typename F >
auto method_adaptor ( F &&  f) -> decltype(std::forward<F>(f))

Given a pointer to a member function, cast it to its Derived version.

Forward everything else unchanged.

Definition at line 1176 of file pybind11.h.

◆ method_adaptor() [2/2]

template<typename Derived , typename Return , typename Class , typename... Args>
auto method_adaptor ( Return(Class::*)(Args...)  pmf) -> Return (Derived::*)(Args...)

Definition at line 1179 of file pybind11.h.

References test_callbacks::value.

◆ pickle()

template<typename GetState , typename SetState >
detail::initimpl::pickle_factory<GetState, SetState> pickle ( GetState &&  g,
SetState &&  s 
)

Binds pickling functions __getstate__ and __setstate__ and ensures that the type returned by __getstate__ is the same as the argument accepted by __setstate__.

Definition at line 1557 of file pybind11.h.

Referenced by TEST_SUBMODULE().

◆ print() [1/2]

template<return_value_policy policy = return_value_policy::automatic_reference, typename... Args>
void print ( Args &&...  args)

Definition at line 2035 of file pybind11.h.

References uhal::tests::c, and print().

◆ print() [2/2]

PYBIND11_NOINLINE void print ( tuple  args,
dict  kwargs 
)
inline

◆ register_exception()

template<typename CppException >
exception<CppException>& register_exception ( handle  scope,
const char *  name,
handle  base = PyExc_Exception 
)

Registers a Python exception in m of the given name and installs an exception translator to translate the C++ exception to the created Python exception using the exceptions what() method.

This is intended for simple exception translations; for more complex translation, register the exception object and translator directly.

Definition at line 1984 of file pybind11.h.

References register_exception_translator().

◆ register_exception_translator()

template<typename ExceptionTranslator >
void register_exception_translator ( ExceptionTranslator &&  translator)

Definition at line 1937 of file pybind11.h.

References get_internals(), and internals::registered_exception_translators.

Referenced by register_exception(), and TEST_SUBMODULE().

◆ set_operator_new() [1/2]

template<typename >
void set_operator_new (   ...)

Definition at line 1131 of file pybind11.h.

◆ set_operator_new() [2/2]

template<typename T , typename = void_t<decltype(static_cast<void *(*)(size_t)>(T::operator new))>>
void set_operator_new ( type_record r)

Set the pointer to operator new if it exists. The cast is needed because it can be overloaded.

Definition at line 1129 of file pybind11.h.

References type_record::operator_new.

name
Annotation for function names.
Definition: attr.h:36
pybind11_fail
PyExc_RuntimeError PYBIND11_NOINLINE void pybind11_fail(const char *reason)
Used internally.
Definition: common.h:725
is_method
Annotation for methods.
Definition: attr.h:21
type::handle_of
static handle handle_of()
Convert C++ type to handle if previously registered.
Definition: cast.h:2200
get_override
function get_override(const T *this_ptr, const char *name)
\rst Try to retrieve a python method by the provided name from the instance pointed to by the this_pt...
Definition: pybind11.h:2262
arg
Definition: cast.h:1844
PYBIND11_STRINGIFY
#define PYBIND11_STRINGIFY(x)
Definition: common.h:233
uhal::tests::fn
boost::filesystem::path fn("dummy_address.xml")
cpp_function
Wraps an arbitrary C++ function/method/lambda function/.. into a callable Python object.
Definition: pybind11.h:62
PYBIND11_TYPE
#define PYBIND11_TYPE(...)
Lets you pass a type containing a , through a macro parameter without needing a separate typedef,...
Definition: cast.h:2217
test_callbacks.value
value
Definition: test_callbacks.py:126