ROOT
master
Reference Guide
Loading...
Searching...
No Matches
CPPExcInstance.h
Go to the documentation of this file.
1
#ifndef CPYRT_CPPEXCINSTANCE_H
2
#define CPYRT_CPPEXCINSTANCE_H
3
4
//////////////////////////////////////////////////////////////////////////////
5
// //
6
// cppjit::cpyrt::CPPExceptionInstance //
7
// //
8
// Python-side proxy, encapsulaties a C++ exception object. //
9
// //
10
//////////////////////////////////////////////////////////////////////////////
11
12
namespace
cppjit::cpyrt
{
13
14
class
CPPExcInstance
{
15
public
:
16
PyBaseExceptionObject
fBase
;
17
PyObject
*
fCppInstance
;
18
PyObject
*
fTopMessage
;
19
};
20
21
//- object proxy type and type verification ----------------------------------
22
CPYRT_IMPORT
PyTypeObject
CPPExcInstance_Type
;
23
24
template
<
typename
T>
inline
bool
CPPExcInstance_Check
(T*
object
) {
25
return
object
&& PyObject_TypeCheck(
object
, &
CPPExcInstance_Type
);
26
}
27
28
template
<
typename
T>
inline
bool
CPPExcInstance_CheckExact
(T*
object
) {
29
return
object
&& Py_TYPE(
object
) == &
CPPExcInstance_Type
;
30
}
31
32
}
// namespace cppjit::cpyrt
33
34
#endif
// !CPYRT_CPPEXCINSTANCE_H
PyObject
_object PyObject
Definition
PyMethodBase.h:36
CPYRT_IMPORT
#define CPYRT_IMPORT
Definition
CommonDefs.h:26
cppjit::cpyrt::CPPExcInstance
Definition
CPPExcInstance.h:14
cppjit::cpyrt::CPPExcInstance::fTopMessage
PyObject * fTopMessage
Definition
CPPExcInstance.h:18
cppjit::cpyrt::CPPExcInstance::fBase
PyBaseExceptionObject fBase
Definition
CPPExcInstance.h:16
cppjit::cpyrt::CPPExcInstance::fCppInstance
PyObject * fCppInstance
Definition
CPPExcInstance.h:17
cppjit::cpyrt
Definition
API.cxx:34
cppjit::cpyrt::CPPExcInstance_CheckExact
bool CPPExcInstance_CheckExact(T *object)
Definition
CPPExcInstance.h:28
cppjit::cpyrt::CPPExcInstance_Check
bool CPPExcInstance_Check(T *object)
Definition
CPPExcInstance.h:24
cppjit::cpyrt::CPPExcInstance_Type
PyTypeObject CPPExcInstance_Type
Definition
CPPExcInstance.cxx:200
bindings
pyroot
cppjit
src
cpyrt
CPPExcInstance.h
ROOTmaster - Reference Guide Generated on Tue Oct 20 2026 15:12:45 (GVA Time) using Doxygen 1.10.0