Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
copyable_holder_caster< type, holder_type, SFINAE > Struct Template Reference

#include <cast.h>

Inheritance diagram for copyable_holder_caster< type, holder_type, SFINAE >:
Inheritance graph
[legend]

Public Types

using base = type_caster_base< type >
 
- Public Types inherited from type_caster_base< type >
template<typename T >
using cast_op_type = detail::cast_op_type< T >
 

Public Member Functions

bool load (handle src, bool convert)
 
 operator holder_type & ()
 
 operator holder_type * ()
 
 operator type & ()
 
 operator type * ()
 
- Public Member Functions inherited from type_caster_base< type >
 operator itype & ()
 
 operator itype * ()
 
 type_caster_base ()
 
 type_caster_base (const std::type_info &info)
 
- Public Member Functions inherited from type_caster_generic
void check_holder_compat ()
 
bool load (handle src, bool convert)
 
template<typename ThisT >
PYBIND11_NOINLINE bool load_impl (handle src, bool convert)
 
void load_value (value_and_holder &&v_h)
 
bool try_direct_conversions (handle src)
 
bool try_implicit_casts (handle src, bool convert)
 
PYBIND11_NOINLINE bool try_load_foreign_module_local (handle src)
 
PYBIND11_NOINLINE type_caster_generic (const std::type_info &type_info)
 
 type_caster_generic (const type_info *typeinfo)
 

Static Public Member Functions

static handle cast (const holder_type &src, return_value_policy, handle)
 
- Static Public Member Functions inherited from type_caster_base< type >
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_holder (const itype *src, const void *holder)
 
static std::pair< const void *, const type_info * > src_and_type (const itype *src)
 
- Static Public Member Functions inherited from type_caster_generic
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)
 

Static Protected Member Functions

static bool try_direct_conversions (handle)
 
- Static Protected Member Functions inherited from type_caster_base< type >
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
 
static Constructor make_copy_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_move_constructor (...)
 

Protected Attributes

holder_type holder
 

Friends

class type_caster_generic
 

Additional Inherited Members

- Public Attributes inherited from type_caster_generic
const std::type_info * cpptype = nullptr
 
const type_infotypeinfo = nullptr
 
void * value = nullptr
 
- Static Public Attributes inherited from type_caster_base< type >
static constexpr auto name = const_name<type>()
 
- Protected Types inherited from type_caster_base< type >
using Constructor = void *(*)(const void *)
 

Detailed Description

template<typename type, typename holder_type, typename SFINAE = void>
struct copyable_holder_caster< type, holder_type, SFINAE >

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.

Definition at line 739 of file cast.h.

Member Typedef Documentation

◆ base

template<typename type, typename holder_type, typename SFINAE = void>
using copyable_holder_caster< type, holder_type, SFINAE >::base = type_caster_base<type>

Definition at line 741 of file cast.h.

Member Function Documentation

◆ cast()

template<typename type, typename holder_type, typename SFINAE = void>
static handle copyable_holder_caster< type, holder_type, SFINAE >::cast ( const holder_type &  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 760 of file cast.h.

◆ check_holder_compat()

template<typename type, typename holder_type, typename SFINAE = void>
void copyable_holder_caster< type, holder_type, SFINAE >::check_holder_compat ( )
inlineprotected

Definition at line 767 of file cast.h.

◆ load()

template<typename type, typename holder_type, typename SFINAE = void>
bool copyable_holder_caster< type, holder_type, SFINAE >::load ( handle  src,
bool  convert 
)
inline

Definition at line 749 of file cast.h.

◆ load_value()

template<typename type, typename holder_type, typename SFINAE = void>
bool copyable_holder_caster< type, holder_type, SFINAE >::load_value ( value_and_holder &&  v_h)
inlineprotected

Definition at line 773 of file cast.h.

◆ operator holder_type &()

template<typename type, typename holder_type, typename SFINAE = void>
copyable_holder_caster< type, holder_type, SFINAE >::operator holder_type & ( )
inlineexplicit

Definition at line 758 of file cast.h.

◆ operator holder_type *()

template<typename type, typename holder_type, typename SFINAE = void>
copyable_holder_caster< type, holder_type, SFINAE >::operator holder_type * ( )
inlineexplicit

Definition at line 757 of file cast.h.

◆ operator type &()

template<typename type, typename holder_type, typename SFINAE = void>
copyable_holder_caster< type, holder_type, SFINAE >::operator type & ( )
inlineexplicit

Definition at line 756 of file cast.h.

◆ operator type *()

template<typename type, typename holder_type, typename SFINAE = void>
copyable_holder_caster< type, holder_type, SFINAE >::operator type * ( )
inlineexplicit

Definition at line 753 of file cast.h.

◆ try_direct_conversions()

template<typename type, typename holder_type, typename SFINAE = void>
static bool copyable_holder_caster< type, holder_type, SFINAE >::try_direct_conversions ( handle  )
inlinestaticprotected

Definition at line 809 of file cast.h.

◆ try_implicit_casts() [1/2]

template<typename type, typename holder_type, typename SFINAE = void>
template<typename T = holder_type, detail::enable_if_t<!std::is_constructible< T, const T &, type *>::value, int > = 0>
bool copyable_holder_caster< type, holder_type, SFINAE >::try_implicit_casts ( handle  ,
bool   
)
inlineprotected

Definition at line 791 of file cast.h.

◆ try_implicit_casts() [2/2]

template<typename type, typename holder_type, typename SFINAE = void>
template<typename T = holder_type, detail::enable_if_t< std::is_constructible< T, const T &, type *>::value, int > = 0>
bool copyable_holder_caster< type, holder_type, SFINAE >::try_implicit_casts ( handle  src,
bool  convert 
)
inlineprotected

Definition at line 797 of file cast.h.

Friends And Related Function Documentation

◆ type_caster_generic

template<typename type, typename holder_type, typename SFINAE = void>
friend class type_caster_generic
friend

Definition at line 766 of file cast.h.

Member Data Documentation

◆ holder

template<typename type, typename holder_type, typename SFINAE = void>
holder_type copyable_holder_caster< type, holder_type, SFINAE >::holder
protected

Definition at line 811 of file cast.h.


The documentation for this struct was generated from the following file:


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:02