RAVE
pyraveio.h File Reference

Python version of the RaveIO API. More...

#include "rave_io.h"

Go to the source code of this file.

Classes

struct  PyRaveIO
 The RaveIO. More...
 

Macros

#define PyRaveIO_Type_NUM   0
 index for Type
 
#define PyRaveIO_GetNative_NUM   1
 index for GetNative
 
#define PyRaveIO_GetNative_RETURN   RaveIO_t*
 return type for GetNative
 
#define PyRaveIO_GetNative_PROTO   (PyRaveIO*)
 argument prototype for GetNative
 
#define PyRaveIO_New_NUM   2
 index for New
 
#define PyRaveIO_New_RETURN   PyRaveIO*
 return type for New
 
#define PyRaveIO_New_PROTO   (RaveIO_t*)
 argument prototype for New
 
#define PyRaveIO_Open_NUM   3
 index for Open
 
#define PyRaveIO_Open_RETURN   PyRaveIO*
 return type for Open
 
#define PyRaveIO_Open_PROTO   (const char* filename, int lazyLoading, const char* preloadQuantities)
 argument prototype for Open
 
#define PyRaveIO_API_pointers   4
 Total number of C API pointers.
 
#define PyRaveIO_CAPSULE_NAME   "_raveio._C_API"
 
#define PyRaveIO_GetNative    (*(PyRaveIO_GetNative_RETURN (*)PyRaveIO_GetNative_PROTO) PyRaveIO_API[PyRaveIO_GetNative_NUM])
 Returns a pointer to the internal rave io, remember to release the reference when done with the object.
 
#define PyRaveIO_New    (*(PyRaveIO_New_RETURN (*)PyRaveIO_New_PROTO) PyRaveIO_API[PyRaveIO_New_NUM])
 Creates a new rave io instance.
 
#define PyRaveIO_Open    (*(PyRaveIO_Open_RETURN (*)PyRaveIO_Open_PROTO) PyRaveIO_API[PyRaveIO_Open_NUM])
 Opens a rave io instance.
 
#define PyRaveIO_Check(op)
 Checks if the object is a python rave io.
 
#define PyRaveIO_Type   (*(PyTypeObject*)PyRaveIO_API[PyRaveIO_Type_NUM])
 
#define import_pyraveio()
 Imports the PyRaveIO module (like import _raveio in python).
 

Detailed Description

Python version of the RaveIO API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-12-10

Macro Definition Documentation

◆ import_pyraveio

#define import_pyraveio ( )
Value:
PyRaveIO_API = (void **)PyCapsule_Import(PyRaveIO_CAPSULE_NAME, 1);

Imports the PyRaveIO module (like import _raveio in python).

◆ PyRaveIO_API_pointers

#define PyRaveIO_API_pointers   4

Total number of C API pointers.

◆ PyRaveIO_Check

#define PyRaveIO_Check ( op)
Value:
(Py_TYPE(op) == &PyRaveIO_Type)

Checks if the object is a python rave io.

◆ PyRaveIO_GetNative

#define PyRaveIO_GetNative    (*(PyRaveIO_GetNative_RETURN (*)PyRaveIO_GetNative_PROTO) PyRaveIO_API[PyRaveIO_GetNative_NUM])

Returns a pointer to the internal rave io, remember to release the reference when done with the object.

(RAVE_OBJECT_RELEASE).

◆ PyRaveIO_GetNative_NUM

#define PyRaveIO_GetNative_NUM   1

index for GetNative

◆ PyRaveIO_GetNative_PROTO

#define PyRaveIO_GetNative_PROTO   (PyRaveIO*)

argument prototype for GetNative

◆ PyRaveIO_GetNative_RETURN

#define PyRaveIO_GetNative_RETURN   RaveIO_t*

return type for GetNative

◆ PyRaveIO_New

#define PyRaveIO_New    (*(PyRaveIO_New_RETURN (*)PyRaveIO_New_PROTO) PyRaveIO_API[PyRaveIO_New_NUM])

Creates a new rave io instance.

Release this object with Py_DECREF. If a RaveIO_t instance is provided and this instance already is bound to a python instance, this instance will be increfed and returned.

Parameters
[in]raveio- the RaveIO_t intance.
Returns
the PyRaveIO instance.

◆ PyRaveIO_New_NUM

#define PyRaveIO_New_NUM   2

index for New

◆ PyRaveIO_New_PROTO

#define PyRaveIO_New_PROTO   (RaveIO_t*)

argument prototype for New

◆ PyRaveIO_New_RETURN

#define PyRaveIO_New_RETURN   PyRaveIO*

return type for New

◆ PyRaveIO_Open

#define PyRaveIO_Open    (*(PyRaveIO_Open_RETURN (*)PyRaveIO_Open_PROTO) PyRaveIO_API[PyRaveIO_Open_NUM])

Opens a rave io instance.

Release this object with Py_DECREF.

Parameters
[in]filename- the filename.
Returns
the PyRaveIO instance.

◆ PyRaveIO_Open_NUM

#define PyRaveIO_Open_NUM   3

index for Open

◆ PyRaveIO_Open_PROTO

#define PyRaveIO_Open_PROTO   (const char* filename, int lazyLoading, const char* preloadQuantities)

argument prototype for Open

◆ PyRaveIO_Open_RETURN

#define PyRaveIO_Open_RETURN   PyRaveIO*

return type for Open

◆ PyRaveIO_Type_NUM

#define PyRaveIO_Type_NUM   0

index for Type