Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TupleOfInstances.h
Go to the documentation of this file.
1#ifndef CPYRT_TUPLEOFINSTANCES_H
2#define CPYRT_TUPLEOFINSTANCES_H
3
4// Bindings
5#include "Dimensions.h"
6
7namespace cppjit::cpyrt {
8
9/** Representation of C-style array of instances
10 @author WLAV
11 @date 02/10/2014
12 @version 1.0
13 */
14
15//- custom tuple type that can pass through C-style arrays -------------------
16extern PyTypeObject TupleOfInstances_Type;
17extern PyTypeObject InstanceArrayIter_Type;
18
19template <typename T> inline bool TupleOfInstances_Check(T* object) {
20 return object && PyObject_TypeCheck(object, &TupleOfInstances_Type);
21}
22
23template <typename T> inline bool TupleOfInstances_CheckExact(T* object) {
24 return object && Py_TYPE(object) == &TupleOfInstances_Type;
25}
26
28 interop::TCppScope_t klass, cdims_t dims);
29
30} // namespace cppjit::cpyrt
31
32#endif // !CPYRT_TUPLEOFINSTANCES_H
_object PyObject
bool TupleOfInstances_CheckExact(T *object)
PyTypeObject TupleOfInstances_Type
Representation of C-style array of instances.
PyTypeObject InstanceArrayIter_Type
PyObject * TupleOfInstances_New(interop::TCppObject_t address, interop::TCppScope_t klass, cdims_t dims)
bool TupleOfInstances_Check(T *object)
const dims_t & cdims_t
Definition API.h:114
Cpp::ObjectRef TCppObject_t
Definition API.h:43
Cpp::DeclRef TCppScope_t
Definition API.h:41