Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Static Protected Member Functions | Private Types | List of all members
type_caster_base< type > Class Template Reference

Generic type caster for objects stored on the heap. More...

#include <type_caster_base.h>

Inheritance diagram for type_caster_base< type >:
Inheritance graph
[legend]

Public Types

template<typename T >
using cast_op_type = detail::cast_op_type< T >
 

Public Member Functions

 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 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)
 

Static Public Attributes

static constexpr auto name = const_name<type>()
 

Protected Types

using Constructor = void *(*)(const void *)
 

Static Protected Member Functions

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 (...)
 

Private Types

using itype = intrinsic_t< type >
 

Additional Inherited Members

- Public Attributes inherited from type_caster_generic
const std::type_info * cpptype = nullptr
 
const type_infotypeinfo = nullptr
 
void * value = nullptr
 

Detailed Description

template<typename type>
class type_caster_base< type >

Generic type caster for objects stored on the heap.

Definition at line 905 of file type_caster_base.h.

Member Typedef Documentation

◆ cast_op_type

template<typename type>
template<typename T >
using type_caster_base< type >::cast_op_type = detail::cast_op_type<T>

Definition at line 973 of file type_caster_base.h.

◆ Constructor

template<typename type>
using type_caster_base< type >::Constructor = void *(*) (const void *)
protected

Definition at line 986 of file type_caster_base.h.

◆ itype

template<typename type>
using type_caster_base< type >::itype = intrinsic_t<type>
private

Definition at line 906 of file type_caster_base.h.

Constructor & Destructor Documentation

◆ type_caster_base() [1/2]

template<typename type>
type_caster_base< type >::type_caster_base ( )
inline

Definition at line 911 of file type_caster_base.h.

◆ type_caster_base() [2/2]

template<typename type>
type_caster_base< type >::type_caster_base ( const std::type_info &  info)
inlineexplicit

Definition at line 912 of file type_caster_base.h.

Member Function Documentation

◆ cast() [1/3]

template<typename type>
static handle type_caster_base< type >::cast ( const itype src,
return_value_policy  policy,
handle  parent 
)
inlinestatic

Definition at line 914 of file type_caster_base.h.

◆ cast() [2/3]

template<typename type>
static handle type_caster_base< type >::cast ( itype &&  src,
return_value_policy  ,
handle  parent 
)
inlinestatic

Definition at line 922 of file type_caster_base.h.

◆ cast() [3/3]

template<typename type>
static handle type_caster_base< type >::cast ( const itype src,
return_value_policy  policy,
handle  parent 
)
inlinestatic

Definition at line 951 of file type_caster_base.h.

◆ cast_holder()

template<typename type>
static handle type_caster_base< type >::cast_holder ( const itype src,
const void *  holder 
)
inlinestatic

Definition at line 961 of file type_caster_base.h.

◆ make_copy_constructor() [1/2]

template<typename type>
template<typename T , typename = enable_if_t<is_copy_constructible<T>::value>>
static auto type_caster_base< type >::make_copy_constructor ( const T ) -> decltype(new T(std::declval<const T>()), Constructor
inlinestaticprotected

Definition at line 992 of file type_caster_base.h.

◆ make_copy_constructor() [2/2]

template<typename type>
static Constructor type_caster_base< type >::make_copy_constructor (   ...)
inlinestaticprotected

Definition at line 1005 of file type_caster_base.h.

◆ make_move_constructor() [1/2]

template<typename type>
template<typename T , typename = enable_if_t<std::is_move_constructible<T>::value>>
static auto type_caster_base< type >::make_move_constructor ( const T ) -> decltype(new T(std::declval<T &&>()), Constructor
inlinestaticprotected

Definition at line 998 of file type_caster_base.h.

◆ make_move_constructor() [2/2]

template<typename type>
static Constructor type_caster_base< type >::make_move_constructor (   ...)
inlinestaticprotected

Definition at line 1006 of file type_caster_base.h.

◆ operator itype &()

template<typename type>
type_caster_base< type >::operator itype & ( )
inline

Definition at line 978 of file type_caster_base.h.

◆ operator itype *()

template<typename type>
type_caster_base< type >::operator itype * ( )
inline

Definition at line 976 of file type_caster_base.h.

◆ src_and_type()

template<typename type>
static std::pair<const void *, const type_info *> type_caster_base< type >::src_and_type ( const itype src)
inlinestatic

Definition at line 929 of file type_caster_base.h.

Member Data Documentation

◆ name

template<typename type>
constexpr auto type_caster_base< type >::name = const_name<type>()
static

Definition at line 909 of file type_caster_base.h.


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


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