LSST Applications g0f08755f38+05b4b46b2c,g1653933729+a905cd61c3,g168dd56ebc+a905cd61c3,g1a2382251a+526767c3b0,g20f6ffc8e0+05b4b46b2c,g217e2c1bcf+f8df405040,g28da252d5a+e530e4405a,g2bbee38e9b+e060cc3e60,g2bc492864f+e060cc3e60,g32e5bea42b+7044b77928,g347aa1857d+e060cc3e60,g35bb328faa+a905cd61c3,g3a166c0a6a+e060cc3e60,g3bd4b5ce2c+9af3f3d415,g3e281a1b8c+2bff41ced5,g3e8969e208+a905cd61c3,g414038480c+882f223820,g41af890bb2+f72d0f2eea,g43bc871e57+ad86a2d9e2,g78460c75b0+4ae99bb757,g80478fca09+8d821d1b28,g82479be7b0+ec26a56c2d,g858d7b2824+05b4b46b2c,g9125e01d80+a905cd61c3,ga5288a1d22+64e5455051,gb58c049af0+84d1b6ec45,gc28159a63d+e060cc3e60,gc5452a3dca+b82ec7cc4c,gcab2d0539d+01da5adb7a,gcf0d15dbbd+56822d21ae,gda6a2b7d83+56822d21ae,gdaeeff99f8+686ef0dd99,ge79ae78c31+e060cc3e60,gef2f8181fd+f2c81e61ee,gf0baf85859+f9edac6842,gf1e97e5484+3a635bd7af,gfa517265be+05b4b46b2c,gfa999e8aa5+d85414070d,w.2025.01
LSST Data Management Base Package
|
A shared pointer that tracks both a C++ object and its associated PyObject. More...
#include <PySharedPtr.h>
Public Types | |
using | element_type = T |
Public Member Functions | |
PySharedPtr (T *const ptr) | |
Create a pointer that counts as an extra reference in the Python environment. | |
PySharedPtr (PySharedPtr const &) noexcept=default | |
PySharedPtr (PySharedPtr &&) noexcept=default | |
PySharedPtr & | operator= (PySharedPtr const &) noexcept=default |
PySharedPtr & | operator= (PySharedPtr &&) noexcept=default |
~PySharedPtr () noexcept=default | |
PySharedPtr (std::shared_ptr< T > r) noexcept | |
operator std::shared_ptr< T > () noexcept | |
T * | get () const noexcept |
A shared pointer that tracks both a C++ object and its associated PyObject.
Each group of PySharedPtr for a given object collectively counts as one reference to that object for the purpose of Python garbage collection.
A PySharedPtr is implicitly convertible to and from a std::shared_ptr to minimize API impact. Any shared_ptr
created this way will (I think) keep the Python reference alive, as described above.
Definition at line 49 of file PySharedPtr.h.
using lsst::cpputils::python::PySharedPtr< T >::element_type = T |
Definition at line 51 of file PySharedPtr.h.
|
inlineexplicit |
Create a pointer that counts as an extra reference in the Python environment.
ptr | a pointer to a pybind11-managed object. |
Definition at line 59 of file PySharedPtr.h.
|
defaultnoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
Definition at line 78 of file PySharedPtr.h.
|
inlinenoexcept |
Definition at line 81 of file PySharedPtr.h.
|
inlinenoexcept |
Definition at line 79 of file PySharedPtr.h.
|
defaultnoexcept |
|
defaultnoexcept |