Type caster for holder types like std::shared_ptr, etc. More...
#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/cast.h>
Public Types | |
using | base = type_caster_base< type > |
using | base = type_caster_base< type > |
![]() | |
template<typename T > | |
using | cast_op_type = detail::cast_op_type< T > |
template<typename T > | |
using | cast_op_type = detail::cast_op_type< T > |
Static Public Member Functions | |
static handle | cast (const holder_type &src, return_value_policy, handle) |
static handle | cast (const holder_type &src, return_value_policy, handle) |
static handle | cast (const itype &src, return_value_policy policy, handle parent) |
static handle | cast (itype &&src, return_value_policy, handle parent) |
static handle | cast (const itype *src, return_value_policy policy, handle parent) |
static handle | cast (const itype &src, return_value_policy policy, handle parent) |
static handle | cast (itype &&src, return_value_policy, handle parent) |
static handle | cast (const itype *src, return_value_policy policy, handle parent) |
static handle | cast (const itype &src, return_value_policy policy, handle parent) |
static handle | cast (itype &&src, return_value_policy, handle parent) |
static handle | cast (const itype *src, return_value_policy policy, handle parent) |
static handle | cast (const itype &src, return_value_policy policy, handle parent) |
static handle | cast (itype &&src, return_value_policy, handle parent) |
static handle | cast (const itype *src, return_value_policy policy, handle parent) |
![]() | |
static handle | cast (const itype &src, return_value_policy policy, handle parent) |
static handle | cast (itype &&src, return_value_policy, handle parent) |
static std::pair< const void *, const type_info * > | src_and_type (const itype *src) |
static handle | cast (const itype *src, return_value_policy policy, handle parent) |
static handle | cast_holder (const itype *src, const void *holder) |
static handle | cast (const itype &src, return_value_policy policy, handle parent) |
static handle | cast (itype &&src, return_value_policy, handle parent) |
static std::pair< const void *, const type_info * > | src_and_type (const itype *src) |
static handle | cast (const itype *src, return_value_policy policy, handle parent) |
static handle | cast_holder (const itype *src, const void *holder) |
![]() | |
static PYBIND11_NOINLINE handle | cast (const void *_src, return_value_policy policy, handle parent, const detail::type_info *tinfo, void *(*copy_constructor)(const void *), void *(*move_constructor)(const void *), const void *existing_holder=nullptr) |
static PYBIND11_NOINLINE void * | local_load (PyObject *src, const type_info *ti) |
static PYBIND11_NOINLINE std::pair< const void *, const type_info * > | src_and_type (const void *src, const std::type_info &cast_type, const std::type_info *rtti_type=nullptr) |
static PYBIND11_NOINLINE handle | cast (const void *_src, return_value_policy policy, handle parent, const detail::type_info *tinfo, void *(*copy_constructor)(const void *), void *(*move_constructor)(const void *), const void *existing_holder=nullptr) |
static PYBIND11_NOINLINE void * | local_load (PyObject *src, const type_info *ti) |
static PYBIND11_NOINLINE std::pair< const void *, const type_info * > | src_and_type (const void *src, const std::type_info &cast_type, const std::type_info *rtti_type=nullptr) |
Protected Member Functions | |
void | check_holder_compat () |
bool | load_value (value_and_holder &&v_h) |
template<typename T = holder_type, detail::enable_if_t<!std::is_constructible< T, const T &, type * >::value, int > = 0> | |
bool | try_implicit_casts (handle, bool) |
template<typename T = holder_type, detail::enable_if_t< std::is_constructible< T, const T &, type * >::value, int > = 0> | |
bool | try_implicit_casts (handle src, bool convert) |
void | check_holder_compat () |
bool | load_value (value_and_holder &&v_h) |
template<typename T = holder_type, detail::enable_if_t<!std::is_constructible< T, const T &, type * >::value, int > = 0> | |
bool | try_implicit_casts (handle, bool) |
template<typename T = holder_type, detail::enable_if_t< std::is_constructible< T, const T &, type * >::value, int > = 0> | |
bool | try_implicit_casts (handle src, bool convert) |
Static Protected Member Functions | |
static bool | try_direct_conversions (handle) |
static bool | try_direct_conversions (handle) |
![]() | |
template<typename T , typename = enable_if_t<is_copy_constructible<T>::value>> | |
static auto | make_copy_constructor (const T *) -> decltype(new T(std::declval< const T >()), Constructor{}) |
template<typename T , typename = enable_if_t<std::is_move_constructible<T>::value>> | |
static auto | make_move_constructor (const T *) -> decltype(new T(std::declval< T && >()), Constructor{}) |
static Constructor | make_copy_constructor (...) |
static Constructor | make_move_constructor (...) |
template<typename T , typename = enable_if_t<is_copy_constructible<T>::value>> | |
static auto | make_copy_constructor (const T *) -> decltype(new T(std::declval< const T >()), Constructor{}) |
template<typename T , typename = enable_if_t<std::is_move_constructible<T>::value>> | |
static auto | make_move_constructor (const T *) -> decltype(new T(std::declval< T && >()), Constructor{}) |
static Constructor | make_copy_constructor (...) |
static Constructor | make_move_constructor (...) |
Protected Attributes | |
holder_type | holder |
Friends | |
class | type_caster_generic |
Additional Inherited Members | |
![]() | |
const type_info * | typeinfo = nullptr |
const std::type_info * | cpptype = nullptr |
void * | value = nullptr |
![]() | |
static constexpr auto | name = const_name<type>() |
![]() | |
using | Constructor = void *(*)(const void *) |
using | Constructor = void *(*)(const void *) |
Type caster for holder types like std::shared_ptr, etc.
The SFINAE hook is provided to help work around the current lack of support for smart-pointer interoperability. Please consider it an implementation detail that may change in the future, as formal support for smart-pointer interoperability is added into pybind11.
using copyable_holder_caster< type, holder_type, SFINAE >::base = type_caster_base<type> |
using copyable_holder_caster< type, holder_type, SFINAE >::base = type_caster_base<type> |
|
inlinestatic |
Definition at line 771 of file cast.h.
References type_caster_base< type >::cast_holder(), and holder_helper< T >::get().
Referenced by copyable_holder_caster< type, holder_type, SFINAE >::try_implicit_casts().
|
inlinestatic |
Definition at line 764 of file cast.h.
References type_caster_base< type >::cast_holder(), and holder_helper< T >::get().
|
inlinestatic |
Definition at line 914 of file type_caster_base.h.
|
inlinestatic |
Definition at line 987 of file type_caster_base.h.
|
inlinestatic |
Definition at line 914 of file type_caster_base.h.
|
inlinestatic |
Definition at line 987 of file type_caster_base.h.
|
inlinestatic |
Definition at line 951 of file type_caster_base.h.
|
inlinestatic |
Definition at line 1024 of file type_caster_base.h.
|
inlinestatic |
Definition at line 951 of file type_caster_base.h.
|
inlinestatic |
Definition at line 1024 of file type_caster_base.h.
|
inlinestatic |
Definition at line 922 of file type_caster_base.h.
|
inlinestatic |
Definition at line 995 of file type_caster_base.h.
|
inlinestatic |
Definition at line 922 of file type_caster_base.h.
|
inlinestatic |
Definition at line 995 of file type_caster_base.h.
|
inlineprotected |
Definition at line 778 of file cast.h.
References type_info::default_holder, and type_caster_generic::typeinfo.
|
inlineprotected |
Definition at line 771 of file cast.h.
References type_info::default_holder, and type_caster_generic::typeinfo.
|
inline |
Definition at line 760 of file cast.h.
Referenced by copyable_holder_caster< type, holder_type, SFINAE >::try_implicit_casts().
|
inline |
|
inlineprotected |
Definition at line 784 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::holder, and type_caster_generic::value.
|
inlineprotected |
Definition at line 777 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::holder, PYBIND11_DETAILED_ERROR_MESSAGES, and type_caster_generic::value.
|
inlineexplicit |
Definition at line 769 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::holder.
|
inlineexplicit |
Definition at line 762 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::holder.
|
inlineexplicit |
Definition at line 768 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::holder.
|
inlineexplicit |
Definition at line 761 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::holder.
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlineprotected |
Definition at line 807 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::cast(), copyable_holder_caster< type, holder_type, SFINAE >::holder, type_info::implicit_casts, copyable_holder_caster< type, holder_type, SFINAE >::load(), type_caster_generic::typeinfo, and type_caster_generic::value.
|
inlineprotected |
Definition at line 801 of file cast.h.
References copyable_holder_caster< type, holder_type, SFINAE >::cast(), copyable_holder_caster< type, holder_type, SFINAE >::holder, type_info::implicit_casts, copyable_holder_caster< type, holder_type, SFINAE >::load(), type_caster_generic::typeinfo, and type_caster_generic::value.
|
inlineprotected |
|
inlineprotected |
|
friend |
|
protected |
Definition at line 821 of file cast.h.
Referenced by copyable_holder_caster< type, holder_type, SFINAE >::load_value(), copyable_holder_caster< type, holder_type, SFINAE >::operator holder_type &(), copyable_holder_caster< type, holder_type, SFINAE >::operator holder_type *(), and copyable_holder_caster< type, holder_type, SFINAE >::try_implicit_casts().