OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::PyObjectPtr Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/plugin/PythonInterpreter.hpp>

Public Member Functions

 PyObjectPtr (PyObject *obj=nullptr)
 ~PyObjectPtr ()
PyObject * get () const
PyObject * release ()
void reset (PyObject *obj=nullptr)
 operator bool () const

Private Member Functions

 PyObjectPtr (const PyObjectPtr &)=delete
PyObjectPtr & operator= (const PyObjectPtr &)=delete

Private Attributes

PyObject * m_obj

Detailed Description

Constructor & Destructor Documentation

◆ PyObjectPtr() [1/2]

Slic3r::PyObjectPtr::PyObjectPtr ( PyObject * obj = nullptr)
inlineexplicit
196: m_obj(obj) {}
PyObject * m_obj
Definition PythonInterpreter.hpp:221

References m_obj.

Referenced by PyObjectPtr(), and operator=().

Here is the caller graph for this function:

◆ ~PyObjectPtr()

Slic3r::PyObjectPtr::~PyObjectPtr ( )
inline
198 {
199 if (m_obj) {
200 Py_DECREF(m_obj);
201 }
202 }

References m_obj.

◆ PyObjectPtr() [2/2]

Slic3r::PyObjectPtr::PyObjectPtr ( const PyObjectPtr & )
privatedelete

References PyObjectPtr().

Here is the call graph for this function:

Member Function Documentation

◆ get()

PyObject * Slic3r::PyObjectPtr::get ( ) const
inline
204{ return m_obj; }

References m_obj.

Referenced by Slic3r::anonymous_namespace{PythonInterpreter.cpp}::add_sys_path_entry(), Slic3r::PythonInterpreter::record_plugin_modules_locked(), Slic3r::PythonInterpreter::remove_module_tree_locked(), and Slic3r::PythonInterpreter::remove_plugin_sys_paths_locked().

Here is the caller graph for this function:

◆ operator bool()

Slic3r::PyObjectPtr::operator bool ( ) const
inline
218{ return m_obj != nullptr; }

References m_obj.

◆ operator=()

PyObjectPtr & Slic3r::PyObjectPtr::operator= ( const PyObjectPtr & )
privatedelete

References PyObjectPtr().

Here is the call graph for this function:

◆ release()

PyObject * Slic3r::PyObjectPtr::release ( )
inline
205 {
206 PyObject* temp = m_obj;
207 m_obj = nullptr;
208 return temp;
209 }

References m_obj.

◆ reset()

void Slic3r::PyObjectPtr::reset ( PyObject * obj = nullptr)
inline
211 {
212 if (m_obj) {
213 Py_DECREF(m_obj);
214 }
215 m_obj = obj;
216 }

References m_obj.

Member Data Documentation

◆ m_obj

PyObject* Slic3r::PyObjectPtr::m_obj
private

The documentation for this class was generated from the following file: