μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Static Private Member Functions | List of all members
class_< type_, options > Class Template Reference

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/pybind11.h>

Inheritance diagram for class_< type_, options >:
[legend]
Collaboration diagram for class_< type_, options >:
[legend]

Classes

struct  is_valid_class_option
 

Public Types

using type = type_
 
using type_alias = detail::exactly_one_t< is_subtype, void, options... >
 
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... >
 
using holder_type = detail::exactly_one_t< is_holder, std::unique_ptr< type >, 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<typename Func , typename... Extra>
class_def_static (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<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... 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<typename C , typename D , typename... Extra>
class_def_readwrite (const char *name, D C::*pm, const Extra &...extra)
 
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_readwrite_static (const char *name, D *pm, const Extra &...extra)
 
template<typename D , typename... Extra>
class_def_readonly_static (const char *name, const D *pm, const Extra &...extra)
 
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 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_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... 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<typename Func , typename... Extra>
class_def_static (const char *name_, Func &&f, const Extra &...extra)
 
template<typename T , typename... Extra, detail::enable_if_t< T::op_enable_if_hook, int > = 0>
class_def (const T &op, const Extra &...extra)
 
template<typename T , typename... Extra, detail::enable_if_t< T::op_enable_if_hook, int > = 0>
class_def_cast (const T &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<typename C , typename D , typename... Extra>
class_def_readwrite (const char *name, D C::*pm, const Extra &...extra)
 
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_readwrite_static (const char *name, D *pm, const Extra &...extra)
 
template<typename D , typename... Extra>
class_def_readonly_static (const char *name, const D *pm, const Extra &...extra)
 
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 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_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...
 

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 &)
 
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_holder = detail::is_holder_type< type_, T >
 
template<typename T >
using is_subtype = detail::is_strict_base_of< type_, T >
 
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 >
 
template<typename T >
using is_base = detail::is_strict_base_of< T, type_ >
 

Static Private Member Functions

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_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_holder (detail::instance *inst, detail::value_and_holder &v_h, const holder_type *holder_ptr, const void *)
 Initialize holder object, variant 2: try to construct from existing holder object, if possible. More...
 
static void init_instance (detail::instance *inst, const void *holder_ptr)
 Performs instance initialization including constructing a holder and registering the known instance. More...
 
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_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_holder (detail::instance *inst, detail::value_and_holder &v_h, const holder_type *holder_ptr, const void *)
 Initialize holder object, variant 2: try to construct from existing holder object, if possible. More...
 
static void init_instance (detail::instance *inst, const void *holder_ptr)
 Performs instance initialization including constructing a holder and registering the known instance. More...
 
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)
 

Detailed Description

template<typename type_, typename... options>
class class_< type_, options >

Definition at line 1499 of file pybind11.h.

Member Typedef Documentation

◆ holder_type [1/2]

template<typename type_ , typename... options>
using class_< type_, options >::holder_type = detail::exactly_one_t<is_holder, std::unique_ptr<type>, options...>

Definition at line 1514 of file pybind11.h.

◆ holder_type [2/2]

template<typename type_ , typename... options>
using class_< type_, options >::holder_type = detail::exactly_one_t<is_holder, std::unique_ptr<type>, options...>

Definition at line 1504 of file pybind11.h.

◆ is_base [1/2]

template<typename type_ , typename... options>
template<typename T >
using class_< type_, options >::is_base = detail::is_strict_base_of<T, type_>
private

Definition at line 1505 of file pybind11.h.

◆ is_base [2/2]

template<typename type_ , typename... options>
template<typename T >
using class_< type_, options >::is_base = detail::is_strict_base_of<T, type_>
private

Definition at line 1495 of file pybind11.h.

◆ is_holder [1/2]

template<typename type_ , typename... options>
template<typename T >
using class_< type_, options >::is_holder = detail::is_holder_type<type_, T>
private

Definition at line 1501 of file pybind11.h.

◆ is_holder [2/2]

template<typename type_ , typename... options>
template<typename T >
using class_< type_, options >::is_holder = detail::is_holder_type<type_, T>
private

Definition at line 1491 of file pybind11.h.

◆ is_subtype [1/2]

template<typename type_ , typename... options>
template<typename T >
using class_< type_, options >::is_subtype = detail::is_strict_base_of<type_, T>
private

Definition at line 1503 of file pybind11.h.

◆ is_subtype [2/2]

template<typename type_ , typename... options>
template<typename T >
using class_< type_, options >::is_subtype = detail::is_strict_base_of<type_, T>
private

Definition at line 1493 of file pybind11.h.

◆ type [1/2]

template<typename type_ , typename... options>
using class_< type_, options >::type = type_

Definition at line 1511 of file pybind11.h.

◆ type [2/2]

template<typename type_ , typename... options>
using class_< type_, options >::type = type_

Definition at line 1501 of file pybind11.h.

◆ type_alias [1/2]

template<typename type_ , typename... options>
using class_< type_, options >::type_alias = detail::exactly_one_t<is_subtype, void, options...>

Definition at line 1512 of file pybind11.h.

◆ type_alias [2/2]

template<typename type_ , typename... options>
using class_< type_, options >::type_alias = detail::exactly_one_t<is_subtype, void, options...>

Definition at line 1502 of file pybind11.h.

Constructor & Destructor Documentation

◆ class_() [1/2]

template<typename type_ , typename... options>
template<typename... Extra>
class_< type_, options >::class_ ( handle  scope,
const char *  name,
const Extra &...  extra 
)
inline

◆ class_() [2/2]

template<typename type_ , typename... options>
template<typename... Extra>
class_< type_, options >::class_ ( handle  scope,
const char *  name,
const Extra &...  extra 
)
inline

Member Function Documentation

◆ add_base() [1/4]

template<typename type_ , typename... options>
template<typename Base , detail::enable_if_t<!is_base< Base >::value, int > = 0>
static void class_< type_, options >::add_base ( detail::type_record &  )
inlinestatic

Definition at line 1574 of file pybind11.h.

◆ add_base() [2/4]

template<typename type_ , typename... options>
template<typename Base , detail::enable_if_t<!is_base< Base >::value, int > = 0>
static void class_< type_, options >::add_base ( detail::type_record &  )
inlinestatic

Definition at line 1564 of file pybind11.h.

◆ add_base() [3/4]

template<typename type_ , typename... options>
template<typename Base , detail::enable_if_t< is_base< Base >::value, int > = 0>
static void class_< type_, options >::add_base ( detail::type_record &  rec)
inlinestatic

Definition at line 1567 of file pybind11.h.

◆ add_base() [4/4]

template<typename type_ , typename... options>
template<typename Base , detail::enable_if_t< is_base< Base >::value, int > = 0>
static void class_< type_, options >::add_base ( detail::type_record &  rec)
inlinestatic

Definition at line 1557 of file pybind11.h.

◆ dealloc() [1/2]

template<typename type_ , typename... options>
static void class_< type_, options >::dealloc ( detail::value_and_holder &  v_h)
inlinestaticprivate

Deallocates an instance; via holder, if constructed; otherwise via operator delete.

Definition at line 1872 of file pybind11.h.

Referenced by class_< type_, options >::class_().

◆ dealloc() [2/2]

template<typename type_ , typename... options>
static void class_< type_, options >::dealloc ( detail::value_and_holder &  v_h)
inlinestaticprivate

Deallocates an instance; via holder, if constructed; otherwise via operator delete.

Definition at line 1863 of file pybind11.h.

◆ def() [1/12]

template<typename type_ , typename... options>
template<typename Func , typename... Extra>
class_ & class_< type_, options >::def ( const char *  name_,
Func &&  f,
const Extra &...  extra 
)
inline

Definition at line 1577 of file pybind11.h.

References add_class_method(), and getattr().

Referenced by add_ostream_redirect(), and make_iterator_impl().

◆ def() [2/12]

template<typename type_ , typename... options>
template<typename Func , typename... Extra>
class_ & class_< type_, options >::def ( const char *  name_,
Func &&  f,
const Extra &...  extra 
)
inline

Definition at line 1567 of file pybind11.h.

References add_class_method(), and getattr().

◆ def() [3/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( const detail::initimpl::alias_constructor< Args... > &  init,
const Extra &...  extra 
)
inline

Definition at line 1620 of file pybind11.h.

References init(), and PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100.

◆ def() [4/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( const detail::initimpl::alias_constructor< Args... > &  init,
const Extra &...  extra 
)
inline

Definition at line 1611 of file pybind11.h.

References init(), and PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100.

◆ def() [5/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( const detail::initimpl::constructor< Args... > &  init,
const Extra &...  extra 
)
inline

Definition at line 1613 of file pybind11.h.

References init(), and PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100.

◆ def() [6/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( const detail::initimpl::constructor< Args... > &  init,
const Extra &...  extra 
)
inline

Definition at line 1604 of file pybind11.h.

References init(), and PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100.

◆ def() [7/12]

template<typename type_ , typename... options>
template<detail::op_id id, detail::op_type ot, typename L , typename R , typename... Extra>
class_ & class_< type_, options >::def ( const detail::op_< id, ot, L, R > &  op,
const Extra &...  extra 
)
inline

Definition at line 1601 of file pybind11.h.

◆ def() [8/12]

template<typename type_ , typename... options>
template<typename T , typename... Extra, detail::enable_if_t< T::op_enable_if_hook, int > = 0>
class_ & class_< type_, options >::def ( const T &  op,
const Extra &...  extra 
)
inline

Definition at line 1592 of file pybind11.h.

◆ def() [9/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( detail::initimpl::factory< Args... > &&  init,
const Extra &...  extra 
)
inline

Definition at line 1627 of file pybind11.h.

References init().

◆ def() [10/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( detail::initimpl::factory< Args... > &&  init,
const Extra &...  extra 
)
inline

Definition at line 1618 of file pybind11.h.

References init().

◆ def() [11/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( detail::initimpl::pickle_factory< Args... > &&  pf,
const Extra &...  extra 
)
inline

Definition at line 1633 of file pybind11.h.

◆ def() [12/12]

template<typename type_ , typename... options>
template<typename... Args, typename... Extra>
class_ & class_< type_, options >::def ( detail::initimpl::pickle_factory< Args... > &&  pf,
const Extra &...  extra 
)
inline

Definition at line 1624 of file pybind11.h.

◆ def_buffer() [1/6]

template<typename type_ , typename... options>
template<typename Func >
class_ & class_< type_, options >::def_buffer ( Func &&  func)
inline

Definition at line 1639 of file pybind11.h.

References handle::dec_ref(), and object::release().

Referenced by class_< type_, options >::def_buffer().

◆ def_buffer() [2/6]

template<typename type_ , typename... options>
template<typename Func >
class_ & class_< type_, options >::def_buffer ( Func &&  func)
inline

Definition at line 1630 of file pybind11.h.

References handle::dec_ref(), and object::release().

◆ def_buffer() [3/6]

template<typename type_ , typename... options>
template<typename Return , typename Class , typename... Args>
class_ & class_< type_, options >::def_buffer ( Return(Class::*)(Args...) const  func)
inline

Definition at line 1667 of file pybind11.h.

References class_< type_, options >::def_buffer().

◆ def_buffer() [4/6]

template<typename type_ , typename... options>
template<typename Return , typename Class , typename... Args>
class_ & class_< type_, options >::def_buffer ( Return(Class::*)(Args...) const  func)
inline

Definition at line 1658 of file pybind11.h.

References class_< type_, options >::def_buffer().

◆ def_buffer() [5/6]

template<typename type_ , typename... options>
template<typename Return , typename Class , typename... Args>
class_ & class_< type_, options >::def_buffer ( Return(Class::*)(Args...)  func)
inline

Definition at line 1662 of file pybind11.h.

References class_< type_, options >::def_buffer().

◆ def_buffer() [6/6]

template<typename type_ , typename... options>
template<typename Return , typename Class , typename... Args>
class_ & class_< type_, options >::def_buffer ( Return(Class::*)(Args...)  func)
inline

Definition at line 1653 of file pybind11.h.

References class_< type_, options >::def_buffer().

◆ def_cast() [1/2]

template<typename type_ , typename... options>
template<detail::op_id id, detail::op_type ot, typename L , typename R , typename... Extra>
class_ & class_< type_, options >::def_cast ( const detail::op_< id, ot, L, R > &  op,
const Extra &...  extra 
)
inline

Definition at line 1607 of file pybind11.h.

◆ def_cast() [2/2]

template<typename type_ , typename... options>
template<typename T , typename... Extra, detail::enable_if_t< T::op_enable_if_hook, int > = 0>
class_ & class_< type_, options >::def_cast ( const T &  op,
const Extra &...  extra 
)
inline

Definition at line 1598 of file pybind11.h.

◆ def_property() [1/6]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property ( const char *  name,
const cpp_function fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1757 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_property() [2/6]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property ( const char *  name,
const cpp_function fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1748 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_property() [3/6]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property ( const char *  name,
const Getter &  fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Definition at line 1744 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_property() [4/6]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property ( const char *  name,
const Getter &  fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Definition at line 1735 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_property() [5/6]

template<typename type_ , typename... options>
template<typename Getter , typename Setter , typename... Extra>
class_ & class_< type_, options >::def_property ( const char *  name,
const Getter &  fget,
const Setter &  fset,
const Extra &...  extra 
)
inline

Uses return_value_policy::reference_internal by default.

Definition at line 1740 of file pybind11.h.

References class_< type_, options >::def_property().

Referenced by class_< type_, options >::def_property(), class_< type_, options >::def_property_readonly(), and class_< type_, options >::def_readwrite().

◆ def_property() [6/6]

template<typename type_ , typename... options>
template<typename Getter , typename Setter , typename... Extra>
class_ & class_< type_, options >::def_property ( const char *  name,
const Getter &  fget,
const Setter &  fset,
const Extra &...  extra 
)
inline

Uses return_value_policy::reference_internal by default.

Definition at line 1731 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_property_readonly() [1/4]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property_readonly ( const char *  name,
const cpp_function fget,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1717 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_property_readonly() [2/4]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property_readonly ( const char *  name,
const cpp_function fget,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1708 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_property_readonly() [3/4]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property_readonly ( const char *  name,
const Getter &  fget,
const Extra &...  extra 
)
inline

Uses return_value_policy::reference_internal by default.

Definition at line 1707 of file pybind11.h.

References class_< type_, options >::def_property_readonly().

Referenced by class_< type_, options >::def_property_readonly(), and class_< type_, options >::def_readonly().

◆ def_property_readonly() [4/4]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property_readonly ( const char *  name,
const Getter &  fget,
const Extra &...  extra 
)
inline

Uses return_value_policy::reference_internal by default.

Definition at line 1698 of file pybind11.h.

References class_< type_, options >::def_property_readonly().

◆ def_property_readonly_static() [1/4]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property_readonly_static ( const char *  name,
const cpp_function fget,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1731 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_property_readonly_static() [2/4]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property_readonly_static ( const char *  name,
const cpp_function fget,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1722 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_property_readonly_static() [3/4]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property_readonly_static ( const char *  name,
const Getter &  fget,
const Extra &...  extra 
)
inline

◆ def_property_readonly_static() [4/4]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property_readonly_static ( const char *  name,
const Getter &  fget,
const Extra &...  extra 
)
inline

Uses return_value_policy::reference by default.

Definition at line 1715 of file pybind11.h.

References class_< type_, options >::def_property_readonly_static().

◆ def_property_static() [1/4]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property_static ( const char *  name,
const cpp_function fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1776 of file pybind11.h.

References class_< type_, options >::get_function_record(), and PYBIND11_COMPAT_STRDUP.

◆ def_property_static() [2/4]

template<typename type_ , typename... options>
template<typename... Extra>
class_ & class_< type_, options >::def_property_static ( const char *  name,
const cpp_function fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Uses cpp_function's return_value_policy by default.

Definition at line 1767 of file pybind11.h.

References class_< type_, options >::get_function_record(), and PYBIND11_COMPAT_STRDUP.

◆ def_property_static() [3/4]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property_static ( const char *  name,
const Getter &  fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

◆ def_property_static() [4/4]

template<typename type_ , typename... options>
template<typename Getter , typename... Extra>
class_ & class_< type_, options >::def_property_static ( const char *  name,
const Getter &  fget,
const cpp_function fset,
const Extra &...  extra 
)
inline

Uses return_value_policy::reference by default.

Definition at line 1757 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_readonly() [1/2]

template<typename type_ , typename... options>
template<typename C , typename D , typename... Extra>
class_ & class_< type_, options >::def_readonly ( const char *  name,
const D C::*  pm,
const Extra &...  extra 
)
inline

Definition at line 1682 of file pybind11.h.

References class_< type_, options >::def_property_readonly().

◆ def_readonly() [2/2]

template<typename type_ , typename... options>
template<typename C , typename D , typename... Extra>
class_ & class_< type_, options >::def_readonly ( const char *  name,
const D C::*  pm,
const Extra &...  extra 
)
inline

Definition at line 1673 of file pybind11.h.

References class_< type_, options >::def_property_readonly().

◆ def_readonly_static() [1/2]

template<typename type_ , typename... options>
template<typename D , typename... Extra>
class_ & class_< type_, options >::def_readonly_static ( const char *  name,
const D *  pm,
const Extra &...  extra 
)
inline

◆ def_readonly_static() [2/2]

template<typename type_ , typename... options>
template<typename D , typename... Extra>
class_ & class_< type_, options >::def_readonly_static ( const char *  name,
const D *  pm,
const Extra &...  extra 
)
inline

◆ def_readwrite() [1/2]

template<typename type_ , typename... options>
template<typename C , typename D , typename... Extra>
class_ & class_< type_, options >::def_readwrite ( const char *  name,
D C::*  pm,
const Extra &...  extra 
)
inline

Definition at line 1672 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_readwrite() [2/2]

template<typename type_ , typename... options>
template<typename C , typename D , typename... Extra>
class_ & class_< type_, options >::def_readwrite ( const char *  name,
D C::*  pm,
const Extra &...  extra 
)
inline

Definition at line 1663 of file pybind11.h.

References class_< type_, options >::def_property().

◆ def_readwrite_static() [1/2]

template<typename type_ , typename... options>
template<typename D , typename... Extra>
class_ & class_< type_, options >::def_readwrite_static ( const char *  name,
D *  pm,
const Extra &...  extra 
)
inline

Definition at line 1691 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_readwrite_static() [2/2]

template<typename type_ , typename... options>
template<typename D , typename... Extra>
class_ & class_< type_, options >::def_readwrite_static ( const char *  name,
D *  pm,
const Extra &...  extra 
)
inline

Definition at line 1682 of file pybind11.h.

References class_< type_, options >::def_property_static().

◆ def_static() [1/2]

template<typename type_ , typename... options>
template<typename Func , typename... Extra>
class_ & class_< type_, options >::def_static ( const char *  name_,
Func &&  f,
const Extra &...  extra 
)
inline

Definition at line 1588 of file pybind11.h.

References getattr(), and cpp_function::name().

◆ def_static() [2/2]

template<typename type_ , typename... options>
template<typename Func , typename... Extra>
class_ & class_< type_, options >::def_static ( const char *  name_,
Func &&  f,
const Extra &...  extra 
)
inline

Definition at line 1578 of file pybind11.h.

References getattr(), and cpp_function::name().

◆ get_function_record() [1/2]

template<typename type_ , typename... options>
static detail::function_record * class_< type_, options >::get_function_record ( handle  h)
inlinestaticprivate

Definition at line 1890 of file pybind11.h.

References handle::ptr().

Referenced by class_< type_, options >::def_property_static().

◆ get_function_record() [2/2]

template<typename type_ , typename... options>
static detail::function_record * class_< type_, options >::get_function_record ( handle  h)
inlinestaticprivate

Definition at line 1881 of file pybind11.h.

References handle::ptr().

◆ init_holder() [1/4]

template<typename type_ , typename... options>
template<typename T >
static void class_< type_, options >::init_holder ( detail::instance *  inst,
detail::value_and_holder &  v_h,
const holder_type ,
const std::enable_shared_from_this< T > *   
)
inlinestaticprivate

Initialize holder object, variant 1: object derives from enable_shared_from_this.

Definition at line 1811 of file pybind11.h.

Referenced by class_< type_, options >::init_instance().

◆ init_holder() [2/4]

template<typename type_ , typename... options>
template<typename T >
static void class_< type_, options >::init_holder ( detail::instance *  inst,
detail::value_and_holder &  v_h,
const holder_type ,
const std::enable_shared_from_this< T > *   
)
inlinestaticprivate

Initialize holder object, variant 1: object derives from enable_shared_from_this.

Definition at line 1802 of file pybind11.h.

◆ init_holder() [3/4]

template<typename type_ , typename... options>
static void class_< type_, options >::init_holder ( detail::instance *  inst,
detail::value_and_holder &  v_h,
const holder_type holder_ptr,
const void *   
)
inlinestaticprivate

Initialize holder object, variant 2: try to construct from existing holder object, if possible.

Definition at line 1845 of file pybind11.h.

References class_< type_, options >::init_holder_from_existing().

◆ init_holder() [4/4]

template<typename type_ , typename... options>
static void class_< type_, options >::init_holder ( detail::instance *  inst,
detail::value_and_holder &  v_h,
const holder_type holder_ptr,
const void *   
)
inlinestaticprivate

Initialize holder object, variant 2: try to construct from existing holder object, if possible.

Definition at line 1836 of file pybind11.h.

References class_< type_, options >::init_holder_from_existing().

◆ init_holder_from_existing() [1/4]

template<typename type_ , typename... options>
static void class_< type_, options >::init_holder_from_existing ( const detail::value_and_holder &  v_h,
const holder_type holder_ptr,
std::false_type   
)
inlinestaticprivate

Definition at line 1836 of file pybind11.h.

◆ init_holder_from_existing() [2/4]

template<typename type_ , typename... options>
static void class_< type_, options >::init_holder_from_existing ( const detail::value_and_holder &  v_h,
const holder_type holder_ptr,
std::false_type   
)
inlinestaticprivate

Definition at line 1827 of file pybind11.h.

◆ init_holder_from_existing() [3/4]

template<typename type_ , typename... options>
static void class_< type_, options >::init_holder_from_existing ( const detail::value_and_holder &  v_h,
const holder_type holder_ptr,
std::true_type   
)
inlinestaticprivate

Definition at line 1829 of file pybind11.h.

Referenced by class_< type_, options >::init_holder().

◆ init_holder_from_existing() [4/4]

template<typename type_ , typename... options>
static void class_< type_, options >::init_holder_from_existing ( const detail::value_and_holder &  v_h,
const holder_type holder_ptr,
std::true_type   
)
inlinestaticprivate

Definition at line 1820 of file pybind11.h.

◆ init_instance() [1/2]

template<typename type_ , typename... options>
static void class_< type_, options >::init_instance ( detail::instance *  inst,
const void *  holder_ptr 
)
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 1862 of file pybind11.h.

References class_< type_, options >::init_holder(), and register_instance().

Referenced by class_< type_, options >::class_().

◆ init_instance() [2/2]

template<typename type_ , typename... options>
static void class_< type_, options >::init_instance ( detail::instance *  inst,
const void *  holder_ptr 
)
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 1853 of file pybind11.h.

References class_< type_, options >::init_holder(), and register_instance().

Member Data Documentation

◆ has_alias

template<typename type_ , typename... options>
static constexpr bool class_< type_, options >::has_alias = !std::is_void<type_alias>::value
staticconstexpr

Definition at line 1513 of file pybind11.h.

Referenced by class_< type_, options >::class_().


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