Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
loader_life_support Class Reference

#include <type_caster_base.h>

Public Member Functions

 loader_life_support ()
 A new patient frame is created when a function is entered. More...
 
 ~loader_life_support ()
 ... and destroyed after it returns More...
 

Static Public Member Functions

static PYBIND11_NOINLINE void add_patient (handle h)
 

Static Private Member Functions

static loader_life_support ** get_stack_pp ()
 
static loader_life_supportget_stack_top ()
 
static void set_stack_top (loader_life_support *value)
 

Private Attributes

std::unordered_set< PyObject * > keep_alive
 
loader_life_supportparent = nullptr
 

Detailed Description

A life support system for temporary objects created by type_caster::load(). Adding a patient will keep it alive up until the enclosing function returns.

Definition at line 34 of file type_caster_base.h.

Constructor & Destructor Documentation

◆ loader_life_support()

loader_life_support::loader_life_support ( )
inline

A new patient frame is created when a function is entered.

Definition at line 66 of file type_caster_base.h.

◆ ~loader_life_support()

loader_life_support::~loader_life_support ( )
inline

... and destroyed after it returns

Definition at line 69 of file type_caster_base.h.

Member Function Documentation

◆ add_patient()

static PYBIND11_NOINLINE void loader_life_support::add_patient ( handle  h)
inlinestatic

This can only be used inside a pybind11-bound function, either by argument_loader at argument preparation time or by py::cast() at execution time.

Definition at line 81 of file type_caster_base.h.

◆ get_stack_pp()

static loader_life_support** loader_life_support::get_stack_pp ( )
inlinestaticprivate

Definition at line 56 of file type_caster_base.h.

◆ get_stack_top()

static loader_life_support* loader_life_support::get_stack_top ( )
inlinestaticprivate

Definition at line 60 of file type_caster_base.h.

◆ set_stack_top()

static void loader_life_support::set_stack_top ( loader_life_support value)
inlinestaticprivate

Definition at line 61 of file type_caster_base.h.

Member Data Documentation

◆ keep_alive

std::unordered_set<PyObject *> loader_life_support::keep_alive
private

Definition at line 37 of file type_caster_base.h.

◆ parent

loader_life_support* loader_life_support::parent = nullptr
private

Definition at line 36 of file type_caster_base.h.


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


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:08:15