RAVE
pycartesian.h File Reference

Python version of the Cartesian API. More...

#include "cartesian.h"

Go to the source code of this file.

Classes

struct  PyCartesian
 A cartesian product. More...
 

Macros

#define PyCartesian_Type_NUM   0
 index of type
 
#define PyCartesian_GetNative_NUM   1
 index of GetNative
 
#define PyCartesian_GetNative_RETURN   Cartesian_t*
 return type for GetNative
 
#define PyCartesian_GetNative_PROTO   (PyCartesian*)
 arguments for GetNative
 
#define PyCartesian_New_NUM   2
 index of New
 
#define PyCartesian_New_RETURN   PyCartesian*
 return type for New
 
#define PyCartesian_New_PROTO   (Cartesian_t*)
 arguments for New
 
#define PyCartesian_API_pointers   3
 number of api pointers
 
#define PyCartesian_CAPSULE_NAME   "_cartesian._C_API"
 
#define PyCartesian_GetNative    (*(PyCartesian_GetNative_RETURN (*)PyCartesian_GetNative_PROTO) PyCartesian_API[PyCartesian_GetNative_NUM])
 Returns a pointer to the internal cartesian, remember to release the reference when done with the object.
 
#define PyCartesian_New    (*(PyCartesian_New_RETURN (*)PyCartesian_New_PROTO) PyCartesian_API[PyCartesian_New_NUM])
 Creates a new cartesian instance.
 
#define PyCartesian_Check(op)
 Checks if the object is a python cartesian.
 
#define PyCartesian_Type   (*(PyTypeObject*)PyCartesian_API[PyCartesian_Type_NUM])
 
#define import_pycartesian()
 Imports the PyArea module (like import _area in python).
 

Detailed Description

Python version of the Cartesian API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-12-10

Macro Definition Documentation

◆ import_pycartesian

#define import_pycartesian ( )
Value:
PyCartesian_API = (void **)PyCapsule_Import(PyCartesian_CAPSULE_NAME, 1);

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

◆ PyCartesian_API_pointers

#define PyCartesian_API_pointers   3

number of api pointers

◆ PyCartesian_Check

#define PyCartesian_Check ( op)
Value:
(Py_TYPE(op) == &PyCartesian_Type)

Checks if the object is a python cartesian.

◆ PyCartesian_GetNative

#define PyCartesian_GetNative    (*(PyCartesian_GetNative_RETURN (*)PyCartesian_GetNative_PROTO) PyCartesian_API[PyCartesian_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyCartesian_GetNative_NUM

#define PyCartesian_GetNative_NUM   1

index of GetNative

◆ PyCartesian_GetNative_PROTO

#define PyCartesian_GetNative_PROTO   (PyCartesian*)

arguments for GetNative

◆ PyCartesian_GetNative_RETURN

#define PyCartesian_GetNative_RETURN   Cartesian_t*

return type for GetNative

◆ PyCartesian_New

#define PyCartesian_New    (*(PyCartesian_New_RETURN (*)PyCartesian_New_PROTO) PyCartesian_API[PyCartesian_New_NUM])

Creates a new cartesian instance.

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

Parameters
[in]cartesian- the Cartesian_t intance.
Returns
the PyCartesian instance.

◆ PyCartesian_New_NUM

#define PyCartesian_New_NUM   2

index of New

◆ PyCartesian_New_PROTO

#define PyCartesian_New_PROTO   (Cartesian_t*)

arguments for New

◆ PyCartesian_New_RETURN

#define PyCartesian_New_RETURN   PyCartesian*

return type for New

◆ PyCartesian_Type_NUM

#define PyCartesian_Type_NUM   0

index of type