RAVE
pygra.h File Reference

Python version of the Gra API. More...

#include "Python.h"
#include "rave_gra.h"

Go to the source code of this file.

Classes

struct  PyGra
 A gra coefficient applier. More...
 

Macros

#define PyGra_Type_NUM   0
 index of type
 
#define PyGra_GetNative_NUM   1
 index of GetNative
 
#define PyGra_GetNative_RETURN   RaveGra_t*
 return type for GetNative
 
#define PyGra_GetNative_PROTO   (PyGra*)
 arguments for GetNative
 
#define PyGra_New_NUM   2
 index of New
 
#define PyGra_New_RETURN   PyGra*
 return type for New
 
#define PyGra_New_PROTO   (RaveGra_t*)
 arguments for New
 
#define PyGra_API_pointers   3
 number of API pointers
 
#define PyGra_CAPSULE_NAME   "_gra._C_API"
 
#define PyGra_GetNative    (*(PyGra_GetNative_RETURN (*)PyGra_GetNative_PROTO) PyGra_API[PyGra_GetNative_NUM])
 Returns a pointer to the internal acrr, remember to release the reference when done with the object.
 
#define PyGra_New    (*(PyGra_New_RETURN (*)PyGra_New_PROTO) PyGra_API[PyGra_New_NUM])
 Creates a new polar scan instance.
 
#define PyGra_Check(op)
 Checks if the object is a python gra instance.
 
#define PyGra_Type   (*(PyTypeObject*)PyGra_API[PyGra_Type_NUM])
 
#define import_gra()
 Imports the PyGra module (like import _gra in python).
 

Detailed Description

Python version of the Gra API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2014-03-28

Macro Definition Documentation

◆ import_gra

#define import_gra ( )
Value:
PyGra_API = (void **)PyCapsule_Import(PyGra_CAPSULE_NAME, 1);

Imports the PyGra module (like import _gra in python).

◆ PyGra_API_pointers

#define PyGra_API_pointers   3

number of API pointers

◆ PyGra_Check

#define PyGra_Check ( op)
Value:
(Py_TYPE(op) == &PyGra_Type)

Checks if the object is a python gra instance.

◆ PyGra_GetNative

#define PyGra_GetNative    (*(PyGra_GetNative_RETURN (*)PyGra_GetNative_PROTO) PyGra_API[PyGra_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyGra_GetNative_NUM

#define PyGra_GetNative_NUM   1

index of GetNative

◆ PyGra_GetNative_PROTO

#define PyGra_GetNative_PROTO   (PyGra*)

arguments for GetNative

◆ PyGra_GetNative_RETURN

#define PyGra_GetNative_RETURN   RaveGra_t*

return type for GetNative

◆ PyGra_New

#define PyGra_New    (*(PyGra_New_RETURN (*)PyGra_New_PROTO) PyGra_API[PyGra_New_NUM])

Creates a new polar scan instance.

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

Parameters
[in]area- the RaveAcrr_t intance.
Returns
the PyGra instance.

◆ PyGra_New_NUM

#define PyGra_New_NUM   2

index of New

◆ PyGra_New_PROTO

#define PyGra_New_PROTO   (RaveGra_t*)

arguments for New

◆ PyGra_New_RETURN

#define PyGra_New_RETURN   PyGra*

return type for New

◆ PyGra_Type_NUM

#define PyGra_Type_NUM   0

index of type