RAVE
pyravevalue.h File Reference

Python version of the Rave Value API. More...

#include "Python.h"
#include "rave_value.h"

Go to the source code of this file.

Classes

struct  PyRaveValue
 A cartesian product. More...
 

Macros

#define PyRaveValue_Type_NUM   0
 index of type
 
#define PyRaveValue_GetNative_NUM   1
 index of GetNative
 
#define PyRaveValue_GetNative_RETURN   RaveValue_t*
 return type for GetNative
 
#define PyRaveValue_GetNative_PROTO   (PyRaveValue*)
 arguments for GetNative
 
#define PyRaveValue_New_NUM   2
 index of New
 
#define PyRaveValue_New_RETURN   PyRaveValue*
 return type for New
 
#define PyRaveValue_New_PROTO   (RaveValue_t*)
 arguments for New
 
#define PyRaveValue_API_pointers   3
 number of API pointers
 
#define PyRaveValue_CAPSULE_NAME   "_ravevalue._C_API"
 
#define PyRaveValue_GetNative    (*(PyRaveValue_GetNative_RETURN (*)PyRaveValue_GetNative_PROTO) PyRaveValue_API[PyRaveValue_GetNative_NUM])
 Returns a pointer to the internal area, remember to release the reference when done with the object.
 
#define PyRaveValue_New    (*(PyRaveValue_New_RETURN (*)PyRaveValue_New_PROTO) PyRaveValue_API[PyRaveValue_New_NUM])
 Creates a new rave value instance.
 
#define PyRaveValue_Check(op)
 Checks if the object is a python area.
 
#define PyRaveValue_Type   (*(PyTypeObject*)PyRaveValue_API[PyRaveValue_Type_NUM])
 
#define import_ravevalue()
 Imports the PyRaveValue module (like import _area in python).
 

Detailed Description

Python version of the Rave Value API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2025-02-14

Macro Definition Documentation

◆ import_ravevalue

#define import_ravevalue ( )
Value:
PyRaveValue_API = (void **)PyCapsule_Import(PyRaveValue_CAPSULE_NAME, 1);

Imports the PyRaveValue module (like import _area in python).

◆ PyRaveValue_API_pointers

#define PyRaveValue_API_pointers   3

number of API pointers

◆ PyRaveValue_Check

#define PyRaveValue_Check ( op)
Value:
(Py_TYPE(op) == &PyRaveValue_Type)

Checks if the object is a python area.

◆ PyRaveValue_GetNative

#define PyRaveValue_GetNative    (*(PyRaveValue_GetNative_RETURN (*)PyRaveValue_GetNative_PROTO) PyRaveValue_API[PyRaveValue_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyRaveValue_GetNative_NUM

#define PyRaveValue_GetNative_NUM   1

index of GetNative

◆ PyRaveValue_GetNative_PROTO

#define PyRaveValue_GetNative_PROTO   (PyRaveValue*)

arguments for GetNative

◆ PyRaveValue_GetNative_RETURN

#define PyRaveValue_GetNative_RETURN   RaveValue_t*

return type for GetNative

◆ PyRaveValue_New

#define PyRaveValue_New    (*(PyRaveValue_New_RETURN (*)PyRaveValue_New_PROTO) PyRaveValue_API[PyRaveValue_New_NUM])

Creates a new rave value instance.

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

Parameters
[in]value- the RaveValue_t intance.
Returns
the PyRaveValue instance.

◆ PyRaveValue_New_NUM

#define PyRaveValue_New_NUM   2

index of New

◆ PyRaveValue_New_PROTO

#define PyRaveValue_New_PROTO   (RaveValue_t*)

arguments for New

◆ PyRaveValue_New_RETURN

#define PyRaveValue_New_RETURN   PyRaveValue*

return type for New

◆ PyRaveValue_Type_NUM

#define PyRaveValue_Type_NUM   0

index of type