RAVE
pyravelegend.h File Reference

Python version of the RaveField API. More...

#include "rave_legend.h"

Go to the source code of this file.

Classes

struct  PyRaveLegend
 The rave field object. More...
 

Macros

#define PyRaveLegend_Type_NUM   0
 index of type
 
#define PyRaveLegend_GetNative_NUM   1
 index of GetNative
 
#define PyRaveLegend_GetNative_RETURN   RaveLegend_t*
 return type for GetNative
 
#define PyRaveLegend_GetNative_PROTO   (PyRaveLegend*)
 arguments for GetNative
 
#define PyRaveLegend_New_NUM   2
 index of New
 
#define PyRaveLegend_New_RETURN   PyRaveLegend*
 return type for New
 
#define PyRaveLegend_New_PROTO   (RaveLegend_t*)
 arguments for New
 
#define PyRaveLegend_API_pointers   3
 number of type and function pointers
 
#define PyRaveLegend_CAPSULE_NAME   "_ravelegend._C_API"
 
#define PyRaveLegend_GetNative    (*(PyRaveLegend_GetNative_RETURN (*)PyRaveLegend_GetNative_PROTO) PyRaveLegend_API[PyRaveLegend_GetNative_NUM])
 Returns a pointer to the internal legend, remember to release the reference when done with the object.
 
#define PyRaveLegend_New    (*(PyRaveLegend_New_RETURN (*)PyRaveLegend_New_PROTO) PyRaveLegend_API[PyRaveLegend_New_NUM])
 Creates a new rave legend instance.
 
#define PyRaveLegend_Check(op)
 Checks if the object is a python rave legend.
 
#define PyRaveLegend_Type   (*(PyTypeObject*)PyRaveLegend_API[PyRaveLegend_Type_NUM])
 
#define import_pyravelegend()
 Imports the PyRaveLegend module (like import _ravelegend in python).
 

Detailed Description

Python version of the RaveField API.

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

Macro Definition Documentation

◆ import_pyravelegend

#define import_pyravelegend ( )
Value:
PyRaveLegend_API = (void **)PyCapsule_Import(PyRaveLegend_CAPSULE_NAME, 1);

Imports the PyRaveLegend module (like import _ravelegend in python).

◆ PyRaveLegend_API_pointers

#define PyRaveLegend_API_pointers   3

number of type and function pointers

◆ PyRaveLegend_Check

#define PyRaveLegend_Check ( op)
Value:
(Py_TYPE(op) == &PyRaveLegend_Type)

Checks if the object is a python rave legend.

◆ PyRaveLegend_GetNative

#define PyRaveLegend_GetNative    (*(PyRaveLegend_GetNative_RETURN (*)PyRaveLegend_GetNative_PROTO) PyRaveLegend_API[PyRaveLegend_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyRaveLegend_GetNative_NUM

#define PyRaveLegend_GetNative_NUM   1

index of GetNative

◆ PyRaveLegend_GetNative_PROTO

#define PyRaveLegend_GetNative_PROTO   (PyRaveLegend*)

arguments for GetNative

◆ PyRaveLegend_GetNative_RETURN

#define PyRaveLegend_GetNative_RETURN   RaveLegend_t*

return type for GetNative

◆ PyRaveLegend_New

#define PyRaveLegend_New    (*(PyRaveLegend_New_RETURN (*)PyRaveLegend_New_PROTO) PyRaveLegend_API[PyRaveLegend_New_NUM])

Creates a new rave legend instance.

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

Parameters
[in]field- the RaveLegend_t intance.
Returns
the PyRaveLegend instance.

◆ PyRaveLegend_New_NUM

#define PyRaveLegend_New_NUM   2

index of New

◆ PyRaveLegend_New_PROTO

#define PyRaveLegend_New_PROTO   (RaveLegend_t*)

arguments for New

◆ PyRaveLegend_New_RETURN

#define PyRaveLegend_New_RETURN   PyRaveLegend*

return type for New

◆ PyRaveLegend_Type_NUM

#define PyRaveLegend_Type_NUM   0

index of type