Macros | Functions
class.h File Reference
#include "../attr.h"
#include "../options.h"
Include dependency graph for class.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PYBIND11_SET_OLDPY_QUALNAME(obj, nameobj)   setattr((PyObject *) obj, "__qualname__", nameobj)
 

Functions

void add_patient (PyObject *nurse, PyObject *patient)
 
void clear_instance (PyObject *self)
 
void clear_patients (PyObject *self)
 
bool deregister_instance (instance *self, void *valptr, const type_info *tinfo)
 
bool deregister_instance_impl (void *ptr, instance *self)
 
void enable_buffer_protocol (PyHeapTypeObject *heap_type)
 Give this type a buffer interface. More...
 
void enable_dynamic_attributes (PyHeapTypeObject *heap_type)
 Give instances of this type a __dict__ and opt into garbage collection. More...
 
PyTypeObject * make_default_metaclass ()
 
PyObject * make_new_instance (PyTypeObject *type)
 
PyObject * make_new_python_type (const type_record &rec)
 
PyObject * make_object_base_type (PyTypeObject *metaclass)
 
PyTypeObject * make_static_property_type ()
 
int pybind11_clear (PyObject *self)
 dynamic_attr: Allow the GC to clear the dictionary. More...
 
PyObject * pybind11_get_dict (PyObject *self, void *)
 dynamic_attr: Support for d = instance.__dict__. More...
 
int pybind11_getbuffer (PyObject *obj, Py_buffer *view, int flags)
 buffer_protocol: Fill in the view as specified by flags. More...
 
PyObject * pybind11_meta_call (PyObject *type, PyObject *args, PyObject *kwargs)
 metaclass __call__ function that is used to create all pybind11 objects. More...
 
int pybind11_meta_setattro (PyObject *obj, PyObject *name, PyObject *value)
 
void pybind11_object_dealloc (PyObject *self)
 
int pybind11_object_init (PyObject *self, PyObject *, PyObject *)
 
PyObject * pybind11_object_new (PyTypeObject *type, PyObject *, PyObject *)
 
void pybind11_releasebuffer (PyObject *, Py_buffer *view)
 buffer_protocol: Release the resources of the buffer. More...
 
int pybind11_set_dict (PyObject *self, PyObject *new_dict, void *)
 dynamic_attr: Support for instance.__dict__ = dict(). More...
 
PyObject * pybind11_static_get (PyObject *self, PyObject *, PyObject *cls)
 pybind11_static_property.__get__(): Always pass the class instead of the instance. More...
 
int pybind11_static_set (PyObject *self, PyObject *obj, PyObject *value)
 pybind11_static_property.__set__(): Just like the above __get__(). More...
 
int pybind11_traverse (PyObject *self, visitproc visit, void *arg)
 dynamic_attr: Allow the garbage collector to traverse the internal instance __dict__. More...
 
void register_instance (instance *self, void *valptr, const type_info *tinfo)
 
bool register_instance_impl (void *ptr, instance *self)
 
void traverse_offset_bases (void *valueptr, const detail::type_info *tinfo, instance *self, bool(*f)(void *, instance *))
 
PyTypeObject * type_incref (PyTypeObject *type)
 

Macro Definition Documentation

#define PYBIND11_SET_OLDPY_QUALNAME (   obj,
  nameobj 
)    setattr((PyObject *) obj, "__qualname__", nameobj)

Definition at line 24 of file class.h.

Function Documentation

void add_patient ( PyObject *  nurse,
PyObject *  patient 
)
inline

Definition at line 317 of file class.h.

void clear_instance ( PyObject *  self)
inline

Clears all internal data from the instance and removes it from registered instances in preparation for deallocation.

Definition at line 342 of file class.h.

void clear_patients ( PyObject *  self)
inline

Definition at line 325 of file class.h.

bool deregister_instance ( instance self,
void *  valptr,
const type_info tinfo 
)
inline

Definition at line 267 of file class.h.

bool deregister_instance_impl ( void *  ptr,
instance self 
)
inline

Definition at line 249 of file class.h.

void enable_buffer_protocol ( PyHeapTypeObject *  heap_type)
inline

Give this type a buffer interface.

Definition at line 545 of file class.h.

void enable_dynamic_attributes ( PyHeapTypeObject *  heap_type)
inline

Give instances of this type a __dict__ and opt into garbage collection.

Definition at line 476 of file class.h.

PyTypeObject* make_default_metaclass ( )
inline

This metaclass is assigned by default to all pybind11 types and is required in order for static properties to function correctly. Users may override this using py::metaclass. Return value: New reference.

Definition at line 187 of file class.h.

PyObject* make_new_instance ( PyTypeObject *  type)
inline

Instance creation function for all pybind11 types. It allocates the internal instance layout for holding C++ objects and holders. Allocation is done lazily (the first time the instance is cast to a reference or pointer), and initialization is done by an __init__ function.

Definition at line 277 of file class.h.

PyObject* make_new_python_type ( const type_record rec)
inline

Create a brand new Python type according to the type_record specification. Return value: New reference.

Definition at line 557 of file class.h.

PyObject* make_object_base_type ( PyTypeObject *  metaclass)
inline

Create the type which can be used as a common base for all classes. This is needed in order to satisfy Python's requirements for multiple inheritance. Return value: New reference.

Definition at line 398 of file class.h.

PyTypeObject* make_static_property_type ( )
inline

A static_property is the same as a property but the __get__() and __set__() methods are modified to always use the object type instead of a concrete instance. Return value: New reference.

Definition at line 48 of file class.h.

int pybind11_clear ( PyObject *  self)
inline

dynamic_attr: Allow the GC to clear the dictionary.

Definition at line 469 of file class.h.

PyObject* pybind11_get_dict ( PyObject *  self,
void *   
)
inline

dynamic_attr: Support for d = instance.__dict__.

Definition at line 439 of file class.h.

int pybind11_getbuffer ( PyObject *  obj,
Py_buffer *  view,
int  flags 
)
inline

buffer_protocol: Fill in the view as specified by flags.

Definition at line 497 of file class.h.

PyObject* pybind11_meta_call ( PyObject *  type,
PyObject *  args,
PyObject *  kwargs 
)
inline

metaclass __call__ function that is used to create all pybind11 objects.

Definition at line 160 of file class.h.

int pybind11_meta_setattro ( PyObject *  obj,
PyObject *  name,
PyObject *  value 
)
inline

Types with static properties need to handle Type.static_prop = x in a specific way. By default, Python replaces the static_property itself, but for wrapped C++ types we need to call static_property.__set__() in order to propagate the new value to the underlying C++ data structure.

Definition at line 110 of file class.h.

void pybind11_object_dealloc ( PyObject *  self)
inline

Instance destructor function for all pybind11 types. It calls type_info.dealloc to destroy the C++ object itself, while the rest is Python bookkeeping.

Definition at line 374 of file class.h.

int pybind11_object_init ( PyObject *  self,
PyObject *  ,
PyObject *   
)
inline

An __init__ function constructs the C++ object. Users should provide at least one of these using py::init or directly with .def(__init__, ...). Otherwise, the following default function will be used which simply throws an exception.

Definition at line 305 of file class.h.

PyObject* pybind11_object_new ( PyTypeObject *  type,
PyObject *  ,
PyObject *   
)
inline

Instance creation function for all pybind11 types. It only allocates space for the C++ object, but doesn't call the constructor – an __init__ function must do that.

Definition at line 298 of file class.h.

void pybind11_releasebuffer ( PyObject *  ,
Py_buffer *  view 
)
inline

buffer_protocol: Release the resources of the buffer.

Definition at line 540 of file class.h.

int pybind11_set_dict ( PyObject *  self,
PyObject *  new_dict,
void *   
)
inline

dynamic_attr: Support for instance.__dict__ = dict().

Definition at line 448 of file class.h.

PyObject* pybind11_static_get ( PyObject *  self,
PyObject *  ,
PyObject *  cls 
)
inline

pybind11_static_property.__get__(): Always pass the class instead of the instance.

Definition at line 35 of file class.h.

int pybind11_static_set ( PyObject *  self,
PyObject *  obj,
PyObject *  value 
)
inline

pybind11_static_property.__set__(): Just like the above __get__().

Definition at line 40 of file class.h.

int pybind11_traverse ( PyObject *  self,
visitproc  visit,
void *  arg 
)
inline

dynamic_attr: Allow the garbage collector to traverse the internal instance __dict__.

Definition at line 462 of file class.h.

void register_instance ( instance self,
void *  valptr,
const type_info tinfo 
)
inline

Definition at line 261 of file class.h.

bool register_instance_impl ( void *  ptr,
instance self 
)
inline

Definition at line 245 of file class.h.

void traverse_offset_bases ( void *  valueptr,
const detail::type_info *  tinfo,
instance self,
bool(*)(void *, instance *)  f 
)
inline

For multiple inheritance types we need to recursively register/deregister base pointers for any base classes with pointers that are difference from the instance value pointer so that we can correctly recognize an offset base class pointer. This calls a function with any offset base ptrs.

Definition at line 228 of file class.h.

PyTypeObject* type_incref ( PyTypeObject *  type)
inline

Definition at line 27 of file class.h.



gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:28