Scarab  v2.9.1
Project 8 C++ Utility Library
Classes | Typedefs | Functions
pybind11::detail::initimpl Namespace Reference

Classes

struct  alias_constructor
 
struct  constructor
 
struct  factory
 
struct  factory< CFunc, AFunc, CReturn(CArgs...), AReturn(AArgs...)>
 
struct  factory< Func, void_type(*)(), Return(Args...)>
 
struct  pickle_factory
 Implementation for py::pickle(GetState, SetState) More...
 
struct  pickle_factory< Get, Set, RetState(Self), NewInstance(ArgState)>
 

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

Typedef Documentation

◆ Alias

using Alias = typename Class::type_alias

Definition at line 41 of file init.h.

◆ Cpp

using Cpp = typename Class::type

Definition at line 40 of file init.h.

◆ Holder

using Holder = typename Class::holder_type

Definition at line 42 of file init.h.

◆ is_alias_constructible

using is_alias_constructible = std::is_constructible<Alias<Class>, Cpp<Class> &&>

Definition at line 44 of file init.h.

Function Documentation

◆ construct() [1/6]

void pybind11::detail::initimpl::construct (   ...)

Definition at line 85 of file init.h.

◆ construct() [2/6]

void pybind11::detail::initimpl::construct ( value_and_holder v_h,
Cpp< Class > *  ptr,
bool  need_alias 
)

Definition at line 96 of file init.h.

◆ construct() [3/6]

void pybind11::detail::initimpl::construct ( value_and_holder v_h,
Alias< Class > *  alias_ptr,
bool   
)

Definition at line 124 of file init.h.

◆ construct() [4/6]

void pybind11::detail::initimpl::construct ( value_and_holder v_h,
Holder< Class >  holder,
bool  need_alias 
)

Definition at line 133 of file init.h.

◆ construct() [5/6]

void pybind11::detail::initimpl::construct ( value_and_holder v_h,
Cpp< Class > &&  result,
bool  need_alias 
)

Definition at line 149 of file init.h.

◆ construct() [6/6]

void pybind11::detail::initimpl::construct ( value_and_holder v_h,
Alias< Class > &&  result,
bool   
)

Definition at line 162 of file init.h.

◆ construct_alias_from_cpp() [1/2]

void pybind11::detail::initimpl::construct_alias_from_cpp ( std::true_type  ,
value_and_holder v_h,
Cpp< Class > &&  base 
)

Definition at line 71 of file init.h.

◆ construct_alias_from_cpp() [2/2]

void pybind11::detail::initimpl::construct_alias_from_cpp ( std::false_type  ,
value_and_holder ,
Cpp< Class > &&   
)

Definition at line 76 of file init.h.

◆ construct_or_initialize()

Class * construct_or_initialize ( Args &&...  args)
inline

Definition at line 61 of file init.h.

◆ is_alias() [1/2]

bool pybind11::detail::initimpl::is_alias ( Cpp< Class > *  ptr)

Definition at line 48 of file init.h.

◆ is_alias() [2/2]

constexpr bool pybind11::detail::initimpl::is_alias ( void *  )

Definition at line 53 of file init.h.

◆ no_nullptr()

void pybind11::detail::initimpl::no_nullptr ( void *  ptr)
inline

Definition at line 35 of file init.h.

◆ setstate() [1/2]

void pybind11::detail::initimpl::setstate ( value_and_holder v_h,
T &&  result,
bool  need_alias 
)

Set just the C++ state. Same as __init__.

Definition at line 286 of file init.h.

◆ setstate() [2/2]

void pybind11::detail::initimpl::setstate ( value_and_holder v_h,
std::pair< T, O > &&  result,
bool  need_alias 
)

Set both the C++ and Python states.

Definition at line 293 of file init.h.