Developer Documentation
pybind11::detail::type_caster< DataType > Struct Template Reference

Public Member Functions

 PYBIND11_TYPE_CASTER (DataType, _("DataType"))
 
bool load (handle src, bool)
 

Static Public Member Functions

static handle cast (DataType src, return_value_policy, handle)
 

Detailed Description

template<>
struct pybind11::detail::type_caster< DataType >

Definition at line 607 of file PythonTypeConversions.hh.

Member Function Documentation

◆ cast()

static handle pybind11::detail::type_caster< DataType >::cast ( DataType  src,
return_value_policy  ,
handle   
)
inlinestatic

Conversion part 2 (C++ -> Python): convert an DataType instance into a Python object. The second and third arguments are used to indicate the return value policy and parent object (for return_value_policy::reference_internal) and are generally ignored by implicit casters.

Definition at line 651 of file PythonTypeConversions.hh.

◆ load()

bool pybind11::detail::type_caster< DataType >::load ( handle  src,
bool   
)
inline

Conversion part 1 (Python->C++): convert a PyObject into a DataType instance or return false upon failure. The second argument indicates whether implicit conversions should be applied.

Definition at line 621 of file PythonTypeConversions.hh.

◆ PYBIND11_TYPE_CASTER()

pybind11::detail::type_caster< DataType >::PYBIND11_TYPE_CASTER ( DataType  ,
_("DataType")   
)

This macro establishes the name 'DataType' in function signatures and declares a local variable 'value' of type DataType


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