37#define PyRaveIO_Type_NUM 0
39#define PyRaveIO_GetNative_NUM 1
40#define PyRaveIO_GetNative_RETURN RaveIO_t*
41#define PyRaveIO_GetNative_PROTO (PyRaveIO*)
43#define PyRaveIO_New_NUM 2
44#define PyRaveIO_New_RETURN PyRaveIO*
45#define PyRaveIO_New_PROTO (RaveIO_t*)
47#define PyRaveIO_Open_NUM 3
48#define PyRaveIO_Open_RETURN PyRaveIO*
49#define PyRaveIO_Open_PROTO (const char* filename, int lazyLoading, const char* preloadQuantities)
52#define PyRaveIO_API_pointers 4
54#define PyRaveIO_CAPSULE_NAME "_raveio._C_API"
58extern PyTypeObject PyRaveIO_Type;
61#define PyRaveIO_Check(op) ((op)->ob_type == &PyRaveIO_Type)
74static void **PyRaveIO_API;
80#define PyRaveIO_GetNative \
81 (*(PyRaveIO_GetNative_RETURN (*)PyRaveIO_GetNative_PROTO) PyRaveIO_API[PyRaveIO_GetNative_NUM])
91 (*(PyRaveIO_New_RETURN (*)PyRaveIO_New_PROTO) PyRaveIO_API[PyRaveIO_New_NUM])
98#define PyRaveIO_Open \
99 (*(PyRaveIO_Open_RETURN (*)PyRaveIO_Open_PROTO) PyRaveIO_API[PyRaveIO_Open_NUM])
104#define PyRaveIO_Check(op) \
105 (Py_TYPE(op) == &PyRaveIO_Type)
107#define PyRaveIO_Type (*(PyTypeObject*)PyRaveIO_API[PyRaveIO_Type_NUM])
112#define import_pyraveio() \
113 PyRaveIO_API = (void **)PyCapsule_Import(PyRaveIO_CAPSULE_NAME, 1);
120#define PyRaveIO_Check(op) \
121 ((op)->ob_type == (PyTypeObject *)PyRaveIO_API[PyRaveIO_Type_NUM])
130 PyObject *c_api_object;
132 module = PyImport_ImportModule("_raveio");
133 if (module == NULL) {
137 c_api_object = PyObject_GetAttrString(module,
"_C_API");
138 if (c_api_object == NULL) {
142 if (PyCObject_Check(c_api_object)) {
143 PyRaveIO_API = (
void **)PyCObject_AsVoidPtr(c_api_object);
145 Py_DECREF(c_api_object);
#define PyRaveIO_New
Creates a new rave io instance.
Definition pyraveio.h:90
#define PyRaveIO_New_PROTO
argument prototype for New
Definition pyraveio.h:45
#define PyRaveIO_Open_RETURN
return type for Open
Definition pyraveio.h:48
#define PyRaveIO_GetNative_PROTO
argument prototype for GetNative
Definition pyraveio.h:41
#define import_pyraveio()
Imports the PyRaveIO module (like import _raveio in python).
Definition pyraveio.h:112
#define PyRaveIO_GetNative
Returns a pointer to the internal rave io, remember to release the reference when done with the objec...
Definition pyraveio.h:80
#define PyRaveIO_Open_PROTO
argument prototype for Open
Definition pyraveio.h:49
#define PyRaveIO_Open
Opens a rave io instance.
Definition pyraveio.h:98
#define PyRaveIO_New_RETURN
return type for New
Definition pyraveio.h:44
#define PyRaveIO_GetNative_RETURN
return type for GetNative
Definition pyraveio.h:40
Functions for performing rave related IO operations, mostly ODIM-formatted HDF5 files.
The RaveIO.
Definition pyraveio.h:32
PyObject_HEAD RaveIO_t * raveio
the raveio instance
Definition pyraveio.h:34
Defines the structure for the RaveIO in a volume.
Definition rave_io.c:58