HepMC3 event record library
|
#include <pybind11.h>
Public Member Functions | |
exception (handle scope, const char *name, handle base=PyExc_Exception) | |
void | operator() (const char *message) |
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 ()&& |
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 |
Data Fields | |
bool | is_borrowed: handle(h) { if (is_borrowed) inc_ref() |
Protected Attributes | |
PyObject * | m_ptr = nullptr |
Wrapper to generate a new Python exception type.
This should only be used with PyErr_SetString for now. It is not (yet) possible to use as a py::base. Template type argument is reserved for future use.
Definition at line 1945 of file pybind11.h.
|
inlineinherited |
|
inlineinherited |
|
inlineexplicitinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
\rst 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().