Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::PythonInterface::UninstallTrace Class Reference

RAII handler to temporarily remove and reinstall a Python trace function. More...

#include <UninstallTrace.h>

Public Member Functions

 UninstallTrace ()
 Saves any function and argument previously set by PyEval_SetTrace and calls PyEval_SetTrace(nullptr, nullptr) to remove the trace function. More...
 
 ~UninstallTrace ()
 Reinstates any trace function with PyEval_SetTrace and any saved arguments from the constructor. More...
 

Private Attributes

PyObject * m_tracearg
 
Py_tracefunc m_tracefunc
 

Detailed Description

RAII handler to temporarily remove and reinstall a Python trace function.

Definition at line 18 of file UninstallTrace.h.

Constructor & Destructor Documentation

◆ UninstallTrace()

Mantid::PythonInterface::UninstallTrace::UninstallTrace ( )

Saves any function and argument previously set by PyEval_SetTrace and calls PyEval_SetTrace(nullptr, nullptr) to remove the trace function.

Definition at line 15 of file UninstallTrace.cpp.

References m_tracearg, and m_tracefunc.

◆ ~UninstallTrace()

Mantid::PythonInterface::UninstallTrace::~UninstallTrace ( )

Reinstates any trace function with PyEval_SetTrace and any saved arguments from the constructor.

Definition at line 27 of file UninstallTrace.cpp.

References m_tracearg, and m_tracefunc.

Member Data Documentation

◆ m_tracearg

PyObject* Mantid::PythonInterface::UninstallTrace::m_tracearg
private

Definition at line 25 of file UninstallTrace.h.

Referenced by UninstallTrace(), and ~UninstallTrace().

◆ m_tracefunc

Py_tracefunc Mantid::PythonInterface::UninstallTrace::m_tracefunc
private

Definition at line 24 of file UninstallTrace.h.

Referenced by UninstallTrace(), and ~UninstallTrace().


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