Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TupleOfInstances.h
Go to the documentation of this file.
1#ifndef CPYCPPYY_TUPLEOFINSTANCES_H
2#define CPYCPPYY_TUPLEOFINSTANCES_H
3
4// Bindings
5#include "Dimensions.h"
6
7
8namespace CPyCppyy {
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 -------------------
17extern PyTypeObject TupleOfInstances_Type;
18extern PyTypeObject InstanceArrayIter_Type;
19
20template<typename T>
21inline bool TupleOfInstances_Check(T* object)
22{
23 return object && PyObject_TypeCheck(object, &TupleOfInstances_Type);
24}
25
26template<typename T>
27inline bool TupleOfInstances_CheckExact(T* object)
28{
29 return object && Py_TYPE(object) == &TupleOfInstances_Type;
30}
31
33 Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, cdims_t dims);
34
35} // namespace CPyCppyy
36
37#endif // !CPYCPPYY_TUPLEOFINSTANCES_H
#define Py_TYPE(ob)
Definition CPyCppyy.h:196
_object PyObject
bool TupleOfInstances_CheckExact(T *object)
PyObject * TupleOfInstances_New(Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, cdims_t dims)
const dims_t & cdims_t
Definition API.h:104
PyTypeObject InstanceArrayIter_Type
bool TupleOfInstances_Check(T *object)
PyTypeObject TupleOfInstances_Type
Representation of C-style array of instances.
void * TCppObject_t
Definition cpp_cppyy.h:21
TCppScope_t TCppType_t
Definition cpp_cppyy.h:19