|
MLIR 22.0.0git
|
Template for a reference to a concrete type which captures a python reference to its underlying python object. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Types | |
| using | NBTypedT = nanobind::typed<nanobind::object, T> |
Public Member Functions | |
| PyObjectRef (T *referrent, nanobind::object object) | |
| PyObjectRef (PyObjectRef &&other) noexcept | |
| PyObjectRef (const PyObjectRef &other) | |
| ~PyObjectRef ()=default | |
| int | getRefCount () |
| nanobind::object | releaseObject () |
| Releases the object held by this instance, returning it. | |
| T * | get () |
| T * | operator-> () |
| nanobind::object | getObject () |
| operator bool () const | |
Template for a reference to a concrete type which captures a python reference to its underlying python object.
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyObjectRef< T >::NBTypedT = nanobind::typed<nanobind::object, T> |
|
inline |
|
inlinenoexcept |
|
inline |
|
default |
|
inline |
Definition at line 101 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAffine(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
Definition at line 106 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAffine(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
|
inline |
|
inline |
|
inline |
Releases the object held by this instance, returning it.
This is the proper thing to return from a function that wants to return the reference. Note that this does not work from initializers.
Definition at line 94 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().