#include "class.h"
Go to the source code of this file.
Typedefs | |
template<typename Class > | |
using | Cpp = typename Class::type |
template<typename Class > | |
using | Alias = typename Class::type_alias |
template<typename Class > | |
using | Holder = typename Class::holder_type |
template<typename Class > | |
using | is_alias_constructible = std::is_constructible< Alias< Class >, Cpp< Class > && > |
Functions | |
void | no_nullptr (void *ptr) |
template<typename Class , enable_if_t< Class::has_alias, int > = 0> | |
bool | is_alias (Cpp< Class > *ptr) |
template<typename > | |
constexpr bool | is_alias (void *) |
template<typename Class , typename... Args, detail::enable_if_t< std::is_constructible< Class, Args... >::value, int > = 0> | |
Class * | construct_or_initialize (Args &&...args) |
template<typename Class > | |
void | construct_alias_from_cpp (std::true_type, value_and_holder &v_h, Cpp< Class > &&base) |
template<typename Class > | |
void | construct_alias_from_cpp (std::false_type, value_and_holder &, Cpp< Class > &&) |
template<typename Class > | |
void | construct (...) |
template<typename Class > | |
void | construct (value_and_holder &v_h, Cpp< Class > *ptr, bool need_alias) |
template<typename Class , enable_if_t< Class::has_alias, int > = 0> | |
void | construct (value_and_holder &v_h, Alias< Class > *alias_ptr, bool) |
template<typename Class > | |
void | construct (value_and_holder &v_h, Holder< Class > holder, bool need_alias) |
template<typename Class > | |
void | construct (value_and_holder &v_h, Cpp< Class > &&result, bool need_alias) |
template<typename Class > | |
void | construct (value_and_holder &v_h, Alias< Class > &&result, bool) |
template<typename Class , typename T > | |
void | setstate (value_and_holder &v_h, T &&result, bool need_alias) |
Set just the C++ state. Same as __init__ . More... | |
template<typename Class , typename T , typename O , enable_if_t< std::is_convertible< O, handle >::value, int > = 0> | |
void | setstate (value_and_holder &v_h, std::pair< T, O > &&result, bool need_alias) |
Set both the C++ and Python states. More... | |
using Alias = typename Class::type_alias |
using Holder = typename Class::holder_type |
using is_alias_constructible = std::is_constructible<Alias<Class>, Cpp<Class> &&> |
void construct | ( | value_and_holder & | v_h, |
Alias< Class > && | result, | ||
bool | |||
) |
Definition at line 188 of file init.h.
References value_and_holder::value_ptr().
void construct | ( | value_and_holder & | v_h, |
Alias< Class > * | alias_ptr, | ||
bool | |||
) |
Definition at line 144 of file init.h.
References no_nullptr(), and value_and_holder::value_ptr().
void construct | ( | value_and_holder & | v_h, |
Cpp< Class > && | result, | ||
bool | need_alias | ||
) |
Definition at line 173 of file init.h.
References PYBIND11_SILENCE_MSVC_C4127, PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100, and value_and_holder::value_ptr().
void construct | ( | value_and_holder & | v_h, |
Cpp< Class > * | ptr, | ||
bool | need_alias | ||
) |
Definition at line 115 of file init.h.
References value_and_holder::holder(), value_and_holder::inst, no_nullptr(), PYBIND11_SILENCE_MSVC_C4127, PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100, value_and_holder::set_instance_registered(), value_and_holder::type, and value_and_holder::value_ptr().
void construct | ( | value_and_holder & | v_h, |
Holder< Class > | holder, | ||
bool | need_alias | ||
) |
Definition at line 154 of file init.h.
References value_and_holder::inst, no_nullptr(), PYBIND11_SILENCE_MSVC_C4127, PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100, value_and_holder::type, and value_and_holder::value_ptr().
void construct_alias_from_cpp | ( | std::false_type | , |
value_and_holder & | , | ||
Cpp< Class > && | |||
) |
void construct_alias_from_cpp | ( | std::true_type | , |
value_and_holder & | v_h, | ||
Cpp< Class > && | base | ||
) |
Definition at line 88 of file init.h.
References value_and_holder::value_ptr().
|
inline |
bool is_alias | ( | Cpp< Class > * | ptr | ) |
|
constexpr |
|
inline |
Definition at line 36 of file init.h.
Referenced by construct().
void setstate | ( | value_and_holder & | v_h, |
std::pair< T, O > && | result, | ||
bool | need_alias | ||
) |
Set both the C++ and Python states.
Definition at line 369 of file init.h.
References value_and_holder::inst, and setattr().
void setstate | ( | value_and_holder & | v_h, |
T && | result, | ||
bool | need_alias | ||
) |