|
| tuple (size_t size=0) |
|
size_t | size () const |
|
bool | empty () const |
|
detail::tuple_accessor | operator[] (size_t index) const |
|
detail::item_accessor | operator[] (handle h) const |
|
detail::tuple_iterator | begin () const |
|
detail::tuple_iterator | end () const |
|
| PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h |
|
handle | release () |
|
template<typename T > |
T | cast () const & |
|
template<typename T > |
T | cast () && |
|
template<typename T > |
T | cast () const & |
|
template<typename T > |
T | cast () && |
|
template<> |
void | cast () const & |
|
template<> |
void | cast () && |
|
template<typename T > |
T | cast () const |
|
PyObject * | ptr () const |
| Return the underlying PyObject * pointer. More...
|
|
PyObject *& | ptr () |
|
const handle & | inc_ref () const & |
|
const handle & | dec_ref () const & |
|
| operator bool () const |
| Return true when the handle wraps a valid Python object. More...
|
|
bool | operator== (const handle &h) const |
|
bool | operator!= (const handle &h) const |
|
bool | check () const |
|
|
PyObject * | m_ptr = nullptr |
|
Definition at line 1260 of file pytypes.h.
◆ cast()
Attempt to cast the Python object into the given C++ type. A cast_error
will be throw upon failure.
Definition at line 1743 of file cast.h.
◆ dec_ref()
const handle& dec_ref |
( |
| ) |
const & |
|
inlineinherited |
Manually decrease the reference count of the Python object. Usually, it is preferable to use the object
class which derives from handle
and calls this function automatically. Returns a reference to itself.
Definition at line 199 of file pytypes.h.
◆ inc_ref()
const handle& inc_ref |
( |
| ) |
const & |
|
inlineinherited |
Manually increase the reference count of the Python object. Usually, it is preferable to use the object
class which derives from handle
and calls this function automatically. Returns a reference to itself.
Definition at line 192 of file pytypes.h.
◆ operator bool()
Return true
when the handle
wraps a valid Python object.
Definition at line 207 of file pytypes.h.
◆ operator==()
bool operator== |
( |
const handle & |
h | ) |
const |
|
inlineinherited |
Deprecated: Check that the underlying pointers are the same. Equivalent to obj1 is obj2
in Python.
Definition at line 213 of file pytypes.h.
◆ ptr()
Return the underlying PyObject *
pointer.
Definition at line 184 of file pytypes.h.
◆ release()
Resets the internal pointer to nullptr
without decreasing the object's reference count. The function returns a raw handle to the original Python object.
Definition at line 249 of file pytypes.h.
References handle::handle().
The documentation for this class was generated from the following file: