RAVE
pyiocache.h File Reference

Python version of the RaveIOCache API. More...

#include "rave_iocache.h"

Go to the source code of this file.

Classes

struct  PyRaveIOCache
 The RaveIOCache. More...
 

Macros

#define PyRaveIOCache_Type_NUM   0
 index for Type
 
#define PyRaveIOCache_GetNative_NUM   1
 index for GetNative
 
#define PyRaveIOCache_GetNative_RETURN   RaveIOCache_t*
 return type for GetNative
 
#define PyRaveIOCache_GetNative_PROTO   (PyRaveIOCache*)
 argument prototype for GetNative
 
#define PyRaveIOCache_New_NUM   2
 index for New
 
#define PyRaveIOCache_New_RETURN   PyRaveIOCache*
 return type for New
 
#define PyRaveIOCache_New_PROTO   (RaveIOCache_t*)
 argument prototype for New
 
#define PyRaveIOCache_API_pointers   3
 Total number of C API pointers.
 
#define PyRaveIOCache_CAPSULE_NAME   "_iocache._C_API"
 
#define PyRaveIOCache_GetNative    (*(PyRaveIOCache_GetNative_RETURN (*)PyRaveIOCache_GetNative_PROTO) PyRaveIOCache_API[PyRaveIOCache_GetNative_NUM])
 Returns a pointer to the internal rave io, remember to release the reference when done with the object.
 
#define PyRaveIOCache_New    (*(PyRaveIOCache_New_RETURN (*)PyRaveIOCache_New_PROTO) PyRaveIOCache_API[PyRaveIOCache_New_NUM])
 Creates a new rave io cache instance.
 
#define PyRaveIOCache_Check(op)
 Checks if the object is a python rave io cache.
 
#define PyRaveIOCache_Type   (*(PyTypeObject*)PyRaveIOCache_API[PyRaveIOCache_Type_NUM])
 
#define import_iocache()
 Imports the PyRaveIOCache module (like import _iocache in python).
 

Detailed Description

Python version of the RaveIOCache API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2024-02-05

Macro Definition Documentation

◆ import_iocache

#define import_iocache ( )
Value:
PyRaveIOCache_API = (void **)PyCapsule_Import(PyRaveIOCache_CAPSULE_NAME, 1);

Imports the PyRaveIOCache module (like import _iocache in python).

◆ PyRaveIOCache_API_pointers

#define PyRaveIOCache_API_pointers   3

Total number of C API pointers.

◆ PyRaveIOCache_Check

#define PyRaveIOCache_Check ( op)
Value:
(Py_TYPE(op) == &PyRaveIOCache_Type)

Checks if the object is a python rave io cache.

◆ PyRaveIOCache_GetNative

#define PyRaveIOCache_GetNative    (*(PyRaveIOCache_GetNative_RETURN (*)PyRaveIOCache_GetNative_PROTO) PyRaveIOCache_API[PyRaveIOCache_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyRaveIOCache_GetNative_NUM

#define PyRaveIOCache_GetNative_NUM   1

index for GetNative

◆ PyRaveIOCache_GetNative_PROTO

#define PyRaveIOCache_GetNative_PROTO   (PyRaveIOCache*)

argument prototype for GetNative

◆ PyRaveIOCache_GetNative_RETURN

#define PyRaveIOCache_GetNative_RETURN   RaveIOCache_t*

return type for GetNative

◆ PyRaveIOCache_New

#define PyRaveIOCache_New    (*(PyRaveIOCache_New_RETURN (*)PyRaveIOCache_New_PROTO) PyRaveIOCache_API[PyRaveIOCache_New_NUM])

Creates a new rave io cache instance.

Release this object with Py_DECREF. If a RaveIOCache_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 RaveIOCache_t intance.
Returns
the PyRaveIOCache instance.

◆ PyRaveIOCache_New_NUM

#define PyRaveIOCache_New_NUM   2

index for New

◆ PyRaveIOCache_New_PROTO

#define PyRaveIOCache_New_PROTO   (RaveIOCache_t*)

argument prototype for New

◆ PyRaveIOCache_New_RETURN

#define PyRaveIOCache_New_RETURN   PyRaveIOCache*

return type for New

◆ PyRaveIOCache_Type_NUM

#define PyRaveIOCache_Type_NUM   0

index for Type