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
4namespace CPyCppyy {
5
6/** Representation of C-style array of instances
7 @author WLAV
8 @date 02/10/2014
9 @version 1.0
10 */
11
12//- custom tuple type that can pass through C-style arrays -------------------
13extern PyTypeObject TupleOfInstances_Type;
14extern PyTypeObject InstanceArrayIter_Type;
15
16template<typename T>
17inline bool TupleOfInstances_Check(T* object)
18{
19 return object && PyObject_TypeCheck(object, &TupleOfInstances_Type);
20}
21
22template<typename T>
23inline bool TupleOfInstances_CheckExact(T* object)
24{
25 return object && Py_TYPE(object) == &TupleOfInstances_Type;
26}
27
29 Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, dim_t ndims, dims_t dims);
30
31} // namespace CPyCppyy
32
33#endif // !CPYCPPYY_TUPLEOFINSTANCES_H
#define Py_TYPE(ob)
Definition CPyCppyy.h:217
Py_ssize_t dim_t
Definition CPyCppyy.h:64
_object PyObject
Set of helper functions that are invoked from the pythonizors, on the Python side.
bool TupleOfInstances_CheckExact(T *object)
PyObject * TupleOfInstances_New(Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, dim_t ndims, dims_t dims)
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