Logo ROOT  
Reference Guide
CPPExcInstance.h
Go to the documentation of this file.
1 #ifndef CPYCPPYY_CPPEXCINSTANCE_H
2 #define CPYCPPYY_CPPEXCINSTANCE_H
3 
4 //////////////////////////////////////////////////////////////////////////////
5 // //
6 // CpyCppyy::CPPExceptionInstance //
7 // //
8 // Python-side proxy, encapsulaties a C++ exception object. //
9 // //
10 //////////////////////////////////////////////////////////////////////////////
11 
12 namespace CPyCppyy {
13 
15 public:
16  PyBaseExceptionObject fBase;
19 };
20 
21 
22 //- object proxy type and type verification ----------------------------------
24 
25 template<typename T>
26 inline bool CPPExcInstance_Check(T* object)
27 {
28  return object && PyObject_TypeCheck(object, &CPPExcInstance_Type);
29 }
30 
31 template<typename T>
32 inline bool CPPExcInstance_CheckExact(T* object)
33 {
34  return object && Py_TYPE(object) == &CPPExcInstance_Type;
35 }
36 
37 } // namespace CPyCppyy
38 
39 #endif // !CPYCPPYY_CPPEXCINSTANCE_H
CPyCppyy
Definition: TPython.cxx:99
CPyCppyy::CPPExcInstance_Type
PyTypeObject CPPExcInstance_Type
Definition: CPPExcInstance.cxx:226
PyObject
_object PyObject
Definition: PyMethodBase.h:41
CPYCPPYY_IMPORT
#define CPYCPPYY_IMPORT
Definition: CommonDefs.h:26
CPyCppyy::CPPExcInstance
Definition: CPPExcInstance.h:14
CPyCppyy::CPPExcInstance_CheckExact
bool CPPExcInstance_CheckExact(T *object)
Definition: CPPExcInstance.h:32
CPyCppyy::CPPExcInstance::fBase
PyBaseExceptionObject fBase
Definition: CPPExcInstance.h:16
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:34
CPyCppyy::CPPExcInstance_Check
bool CPPExcInstance_Check(T *object)
Definition: CPPExcInstance.h:26
Py_TYPE
#define Py_TYPE(ob)
Definition: CPyCppyy.h:209
CPyCppyy::CPPExcInstance::fCppInstance
PyObject * fCppInstance
Definition: CPPExcInstance.h:17
CPyCppyy::CPPExcInstance::fTopMessage
PyObject * fTopMessage
Definition: CPPExcInstance.h:18