ROOT  6.06/09
Reference Guide
TTupleOfInstances.h
Go to the documentation of this file.
1 #ifndef PYROOT_TTUPLEOFINSTANCES_H
2 #define PYROOT_TTUPLEOFINSTANCES_H
3 
4 // ROOT
5 #include "DllImport.h"
6 
7 
8 namespace PyROOT {
9 
10 /** Representation of C-style array of instances
11  @author WLAV
12  @date 02/10/2014
13  @version 1.0
14  */
15 
16 //- custom tuple type that can pass through C-style arrays -------------------
17  R__EXTERN PyTypeObject TTupleOfInstances_Type;
18 
19  template< typename T >
20  inline Bool_t TTupleOfInstances_Check( T* object )
21  {
22  return object && PyObject_TypeCheck( object, &TTupleOfInstances_Type );
23  }
24 
25  template< typename T >
27  {
28  return object && Py_TYPE(object) == &TTupleOfInstances_Type;
29  }
30 
32  Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, Py_ssize_t nelems );
33 
34 } // namespace PyROOT
35 
36 #endif // !PYROOT_TTUPLEOFINSTANCES_H
TCppScope_t TCppType_t
Definition: Cppyy.h:13
double T(double x)
Definition: ChebyshevPol.h:34
Bool_t TTupleOfInstances_Check(T *object)
PyTypeObject TTupleOfInstances_Type
Representation of C-style array of instances.
bool Bool_t
Definition: RtypesCore.h:59
Bool_t TTupleOfInstances_CheckExact(T *object)
PyObject * TTupleOfInstances_New(Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, Py_ssize_t nelems)
void * TCppObject_t
Definition: Cppyy.h:14
#define R__EXTERN
Definition: DllImport.h:27
#define Py_TYPE(ob)
Definition: PyROOT.h:149
int Py_ssize_t
Definition: PyROOT.h:154
_object PyObject
Definition: TPyArg.h:22