RAVE
pyravefield.h File Reference

Python version of the RaveField API. More...

#include "rave_field.h"

Go to the source code of this file.

Classes

struct  PyRaveField
 The rave field object. More...
 

Macros

#define PyRaveField_Type_NUM   0
 index of type
 
#define PyRaveField_GetNative_NUM   1
 index of GetNative
 
#define PyRaveField_GetNative_RETURN   RaveField_t*
 return type for GetNative
 
#define PyRaveField_GetNative_PROTO   (PyRaveField*)
 arguments for GetNative
 
#define PyRaveField_New_NUM   2
 index of New
 
#define PyRaveField_New_RETURN   PyRaveField*
 return type for New
 
#define PyRaveField_New_PROTO   (RaveField_t*)
 arguments for New
 
#define PyRaveField_API_pointers   3
 number of type and function pointers
 
#define PyRaveField_CAPSULE_NAME   "_ravefield._C_API"
 
#define PyRaveField_GetNative    (*(PyRaveField_GetNative_RETURN (*)PyRaveField_GetNative_PROTO) PyRaveField_API[PyRaveField_GetNative_NUM])
 Returns a pointer to the internal field, remember to release the reference when done with the object.
 
#define PyRaveField_New    (*(PyRaveField_New_RETURN (*)PyRaveField_New_PROTO) PyRaveField_API[PyRaveField_New_NUM])
 Creates a new rave field instance.
 
#define PyRaveField_Check(op)
 Checks if the object is a python rave field.
 
#define PyRaveField_Type   (*(PyTypeObject*)PyRaveField_API[PyRaveField_Type_NUM])
 
#define import_pyravefield()
 Imports the PyArea module (like import _area in python).
 

Detailed Description

Python version of the RaveField API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2010-07-05

Macro Definition Documentation

◆ import_pyravefield

#define import_pyravefield ( )
Value:
PyRaveField_API = (void **)PyCapsule_Import(PyRaveField_CAPSULE_NAME, 1);

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

◆ PyRaveField_API_pointers

#define PyRaveField_API_pointers   3

number of type and function pointers

◆ PyRaveField_Check

#define PyRaveField_Check ( op)
Value:
(Py_TYPE(op) == &PyRaveField_Type)

Checks if the object is a python rave field.

◆ PyRaveField_GetNative

#define PyRaveField_GetNative    (*(PyRaveField_GetNative_RETURN (*)PyRaveField_GetNative_PROTO) PyRaveField_API[PyRaveField_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyRaveField_GetNative_NUM

#define PyRaveField_GetNative_NUM   1

index of GetNative

◆ PyRaveField_GetNative_PROTO

#define PyRaveField_GetNative_PROTO   (PyRaveField*)

arguments for GetNative

◆ PyRaveField_GetNative_RETURN

#define PyRaveField_GetNative_RETURN   RaveField_t*

return type for GetNative

◆ PyRaveField_New

#define PyRaveField_New    (*(PyRaveField_New_RETURN (*)PyRaveField_New_PROTO) PyRaveField_API[PyRaveField_New_NUM])

Creates a new rave field instance.

Release this object with Py_DECREF. If a RaveField_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 RaveField_t intance.
Returns
the PyRaveField instance.

◆ PyRaveField_New_NUM

#define PyRaveField_New_NUM   2

index of New

◆ PyRaveField_New_PROTO

#define PyRaveField_New_PROTO   (RaveField_t*)

arguments for New

◆ PyRaveField_New_RETURN

#define PyRaveField_New_RETURN   PyRaveField*

return type for New

◆ PyRaveField_Type_NUM

#define PyRaveField_Type_NUM   0

index of type