Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 >
26  inline Bool_t TTupleOfInstances_CheckExact( T* object )
27  {
28  return object && Py_TYPE(object) == &TTupleOfInstances_Type;
29  }
30 
31  PyObject* TTupleOfInstances_New(
32  Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, Py_ssize_t nelems );
33 
34 } // namespace PyROOT
35 
36 #endif // !PYROOT_TTUPLEOFINSTANCES_H