#include <pybind11.h>
Classes | |
struct | is_valid_class_option |
Public Types | |
using | holder_type = detail::exactly_one_t< is_holder, std::unique_ptr< type >, options... > |
using | type = type_ |
using | type_alias = detail::exactly_one_t< is_subtype, void, options... > |
Public Member Functions | |
template<typename... Extra> | |
class_ (handle scope, const char *name, const Extra &...extra) | |
template<typename Func , typename... Extra> | |
class_ & | def (const char *name_, Func &&f, const Extra &...extra) |
template<detail::op_id id, detail::op_type ot, typename L , typename R , typename... Extra> | |
class_ & | def (const detail::op_< id, ot, L, R > &op, const Extra &...extra) |
template<typename... Args, typename... Extra> | |
class_ & | def (const detail::initimpl::constructor< Args... > &init, const Extra &...extra) |
template<typename... Args, typename... Extra> | |
class_ & | def (const detail::initimpl::alias_constructor< Args... > &init, const Extra &...extra) |
template<typename... Args, typename... Extra> | |
class_ & | def (detail::initimpl::factory< Args... > &&init, const Extra &...extra) |
template<typename... Args, typename... Extra> | |
class_ & | def (detail::initimpl::pickle_factory< Args... > &&pf, const Extra &...extra) |
template<typename Func > | |
class_ & | def_buffer (Func &&func) |
template<typename Return , typename Class , typename... Args> | |
class_ & | def_buffer (Return(Class::*func)(Args...)) |
template<typename Return , typename Class , typename... Args> | |
class_ & | def_buffer (Return(Class::*func)(Args...) const) |
template<detail::op_id id, detail::op_type ot, typename L , typename R , typename... Extra> | |
class_ & | def_cast (const detail::op_< id, ot, L, R > &op, const Extra &...extra) |
template<typename Getter , typename Setter , typename... Extra> | |
class_ & | def_property (const char *name, const Getter &fget, const Setter &fset, const Extra &...extra) |
Uses return_value_policy::reference_internal by default. More... | |
template<typename Getter , typename... Extra> | |
class_ & | def_property (const char *name, const Getter &fget, const cpp_function &fset, const Extra &...extra) |
template<typename... Extra> | |
class_ & | def_property (const char *name, const cpp_function &fget, const cpp_function &fset, const Extra &...extra) |
Uses cpp_function's return_value_policy by default. More... | |
template<typename Getter , typename... Extra> | |
class_ & | def_property_readonly (const char *name, const Getter &fget, const Extra &...extra) |
Uses return_value_policy::reference_internal by default. More... | |
template<typename... Extra> | |
class_ & | def_property_readonly (const char *name, const cpp_function &fget, const Extra &...extra) |
Uses cpp_function's return_value_policy by default. More... | |
template<typename Getter , typename... Extra> | |
class_ & | def_property_readonly_static (const char *name, const Getter &fget, const Extra &...extra) |
Uses return_value_policy::reference by default. More... | |
template<typename... Extra> | |
class_ & | def_property_readonly_static (const char *name, const cpp_function &fget, const Extra &...extra) |
Uses cpp_function's return_value_policy by default. More... | |
template<typename Getter , typename... Extra> | |
class_ & | def_property_static (const char *name, const Getter &fget, const cpp_function &fset, const Extra &...extra) |
Uses return_value_policy::reference by default. More... | |
template<typename... Extra> | |
class_ & | def_property_static (const char *name, const cpp_function &fget, const cpp_function &fset, const Extra &...extra) |
Uses cpp_function's return_value_policy by default. More... | |
template<typename C , typename D , typename... Extra> | |
class_ & | def_readonly (const char *name, const D C::*pm, const Extra &...extra) |
template<typename D , typename... Extra> | |
class_ & | def_readonly_static (const char *name, const D *pm, const Extra &...extra) |
template<typename C , typename D , typename... Extra> | |
class_ & | def_readwrite (const char *name, D C::*pm, const Extra &...extra) |
template<typename D , typename... Extra> | |
class_ & | def_readwrite_static (const char *name, D *pm, const Extra &...extra) |
template<typename Func , typename... Extra> | |
class_ & | def_static (const char *name_, Func &&f, const Extra &...extra) |
Static Public Member Functions | |
template<typename Base , detail::enable_if_t< is_base< Base >::value, int > = 0> | |
static void | add_base (detail::type_record &rec) |
template<typename Base , detail::enable_if_t<!is_base< Base >::value, int > = 0> | |
static void | add_base (detail::type_record &) |
Static Public Attributes | |
static constexpr bool | has_alias = !std::is_void<type_alias>::value |
Private Types | |
template<typename T > | |
using | is_base = detail::is_strict_base_of< T, type_ > |
template<typename T > | |
using | is_holder = detail::is_holder_type< type_, T > |
template<typename T > | |
using | is_subtype = detail::is_strict_base_of< type_, T > |
Static Private Member Functions | |
static void | dealloc (detail::value_and_holder &v_h) |
Deallocates an instance; via holder, if constructed; otherwise via operator delete. More... | |
static detail::function_record * | get_function_record (handle h) |
template<typename T > | |
static void | init_holder (detail::instance *inst, detail::value_and_holder &v_h, const holder_type *, const std::enable_shared_from_this< T > *) |
Initialize holder object, variant 1: object derives from enable_shared_from_this. More... | |
static void | init_holder (detail::instance *inst, detail::value_and_holder &v_h, const holder_type *holder_ptr, const void *) |
static void | init_holder_from_existing (const detail::value_and_holder &v_h, const holder_type *holder_ptr, std::true_type) |
static void | init_holder_from_existing (const detail::value_and_holder &v_h, const holder_type *holder_ptr, std::false_type) |
static void | init_instance (detail::instance *inst, const void *holder_ptr) |
Definition at line 1479 of file pybind11.h.
using class_< type_, options >::holder_type = detail::exactly_one_t<is_holder, std::unique_ptr<type>, options...> |
Definition at line 1494 of file pybind11.h.
|
private |
Definition at line 1485 of file pybind11.h.
|
private |
Definition at line 1481 of file pybind11.h.
|
private |
Definition at line 1483 of file pybind11.h.
Definition at line 1491 of file pybind11.h.
using class_< type_, options >::type_alias = detail::exactly_one_t<is_subtype, void, options...> |
Definition at line 1492 of file pybind11.h.
|
inline |
Definition at line 1505 of file pybind11.h.
|
inlinestatic |
Definition at line 1547 of file pybind11.h.
|
inlinestatic |
Definition at line 1554 of file pybind11.h.
|
inlinestaticprivate |
Deallocates an instance; via holder, if constructed; otherwise via operator delete.
Definition at line 1854 of file pybind11.h.
|
inline |
Definition at line 1557 of file pybind11.h.
|
inline |
Definition at line 1582 of file pybind11.h.
|
inline |
Definition at line 1594 of file pybind11.h.
|
inline |
Definition at line 1601 of file pybind11.h.
|
inline |
Definition at line 1608 of file pybind11.h.
|
inline |
Definition at line 1614 of file pybind11.h.
|
inline |
Definition at line 1620 of file pybind11.h.
|
inline |
Definition at line 1643 of file pybind11.h.
|
inline |
Definition at line 1648 of file pybind11.h.
|
inline |
Definition at line 1588 of file pybind11.h.
|
inline |
Uses return_value_policy::reference_internal by default.
Definition at line 1721 of file pybind11.h.
|
inline |
Definition at line 1725 of file pybind11.h.
|
inline |
Uses cpp_function's return_value_policy by default.
Definition at line 1738 of file pybind11.h.
|
inline |
Uses return_value_policy::reference_internal by default.
Definition at line 1688 of file pybind11.h.
|
inline |
Uses cpp_function's return_value_policy by default.
Definition at line 1698 of file pybind11.h.
|
inline |
Uses return_value_policy::reference by default.
Definition at line 1705 of file pybind11.h.
|
inline |
Uses cpp_function's return_value_policy by default.
Definition at line 1712 of file pybind11.h.
|
inline |
Uses return_value_policy::reference by default.
Definition at line 1747 of file pybind11.h.
|
inline |
Uses cpp_function's return_value_policy by default.
Definition at line 1757 of file pybind11.h.
|
inline |
Definition at line 1663 of file pybind11.h.
|
inline |
Definition at line 1680 of file pybind11.h.
|
inline |
Definition at line 1653 of file pybind11.h.
|
inline |
Definition at line 1672 of file pybind11.h.
|
inline |
Definition at line 1568 of file pybind11.h.
|
inlinestaticprivate |
Definition at line 1872 of file pybind11.h.
|
inlinestaticprivate |
Initialize holder object, variant 1: object derives from enable_shared_from_this.
Definition at line 1792 of file pybind11.h.
|
inlinestaticprivate |
Initialize holder object, variant 2: try to construct from existing holder object, if possible
Definition at line 1826 of file pybind11.h.
|
inlinestaticprivate |
Definition at line 1810 of file pybind11.h.
|
inlinestaticprivate |
Definition at line 1817 of file pybind11.h.
|
inlinestaticprivate |
Performs instance initialization including constructing a holder and registering the known instance. Should be called as soon as the type
value_ptr is set for an instance. Takes an optional pointer to an existing holder to use; if not specified and the instance is .owned
, a new holder will be constructed to manage the value pointer.
Definition at line 1844 of file pybind11.h.
|
static |
Definition at line 1493 of file pybind11.h.