RAVE
pyprojection.h File Reference

Python version of the projection API. More...

#include "projection.h"

Go to the source code of this file.

Classes

struct  PyProjection
 A projection. More...
 

Macros

#define PyProjection_Type_NUM   0
 index for Type
 
#define PyProjection_GetNative_NUM   1
 index for GetNative
 
#define PyProjection_GetNative_RETURN   Projection_t*
 return type for GetNative
 
#define PyProjection_GetNative_PROTO   (PyProjection*)
 argument prototype for GetNative
 
#define PyProjection_New_NUM   2
 index for New
 
#define PyProjection_New_RETURN   PyProjection*
 return type for New
 
#define PyProjection_New_PROTO   (Projection_t*)
 argument prototype for New
 
#define PyProjection_NewFromDef_NUM   3
 index for NewFromDef
 
#define PyProjection_NewFromDef_RETURN   PyProjection*
 return type for NewFromDef
 
#define PyProjection_NewFromDef_PROTO   (const char* id, const char* definition, const char* description)
 argument prototype for NewFromDef
 
#define PyProjection_API_pointers   4
 number of function and variable pointers
 
#define PyProjection_CAPSULE_NAME   "_projection._C_API"
 
#define PyProjection_GetNative    (*(PyProjection_GetNative_RETURN (*)PyProjection_GetNative_PROTO) PyProjection_API[PyProjection_GetNative_NUM])
 Returns a pointer to the internal projection, remember to release the reference when done with the object.
 
#define PyProjection_New    (*(PyProjection_New_RETURN (*)PyProjection_New_PROTO) PyProjection_API[PyProjection_New_NUM])
 Creates a new projection instance.
 
#define PyProjection_NewFromDef    (*(PyProjection_NewFromDef_RETURN (*)PyProjection_NewFromDef_PROTO) PyProjection_API[PyProjection_NewFromDef_NUM])
 Creates a new projection instance from a definition.
 
#define PyProjection_Check(op)
 Checks if the object is a python projection.
 
#define PyProjection_Type   (*(PyTypeObject *)PyProjection_API[PyProjection_Type_NUM])
 
#define import_pyprojection()
 Imports the pyprojection module (like import _projection in python).
 

Detailed Description

Python version of the projection API.

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

Macro Definition Documentation

◆ import_pyprojection

#define import_pyprojection ( )
Value:
PyProjection_API = (void **)PyCapsule_Import(PyProjection_CAPSULE_NAME, 1);

Imports the pyprojection module (like import _projection in python).

◆ PyProjection_API_pointers

#define PyProjection_API_pointers   4

number of function and variable pointers

◆ PyProjection_Check

#define PyProjection_Check ( op)
Value:
(Py_TYPE(op) == &PyProjection_Type)

Checks if the object is a python projection.

◆ PyProjection_GetNative

#define PyProjection_GetNative    (*(PyProjection_GetNative_RETURN (*)PyProjection_GetNative_PROTO) PyProjection_API[PyProjection_GetNative_NUM])

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

(RAVE_OBJECT_RELEASE).

◆ PyProjection_GetNative_NUM

#define PyProjection_GetNative_NUM   1

index for GetNative

◆ PyProjection_GetNative_PROTO

#define PyProjection_GetNative_PROTO   (PyProjection*)

argument prototype for GetNative

◆ PyProjection_GetNative_RETURN

#define PyProjection_GetNative_RETURN   Projection_t*

return type for GetNative

◆ PyProjection_New

#define PyProjection_New    (*(PyProjection_New_RETURN (*)PyProjection_New_PROTO) PyProjection_API[PyProjection_New_NUM])

Creates a new projection instance.

Release this object with Py_DECREF. If the passed Projection_t instance is bound to a python instance, this instance will be increfed and returned.

Parameters
[in]proj- the Projection_t intance.
Returns
the PyProjection instance.

◆ PyProjection_New_NUM

#define PyProjection_New_NUM   2

index for New

◆ PyProjection_New_PROTO

#define PyProjection_New_PROTO   (Projection_t*)

argument prototype for New

◆ PyProjection_New_RETURN

#define PyProjection_New_RETURN   PyProjection*

return type for New

◆ PyProjection_NewFromDef

#define PyProjection_NewFromDef    (*(PyProjection_NewFromDef_RETURN (*)PyProjection_NewFromDef_PROTO) PyProjection_API[PyProjection_NewFromDef_NUM])

Creates a new projection instance from a definition.

Release this object with Py_DECREF.

Parameters
[in]id- the id for this projection
[in]description- the description of this projection
[in]definition- the proj.4 definition
Returns
the PyProjection instance.

◆ PyProjection_NewFromDef_NUM

#define PyProjection_NewFromDef_NUM   3

index for NewFromDef

◆ PyProjection_NewFromDef_PROTO

#define PyProjection_NewFromDef_PROTO   (const char* id, const char* definition, const char* description)

argument prototype for NewFromDef

◆ PyProjection_NewFromDef_RETURN

#define PyProjection_NewFromDef_RETURN   PyProjection*

return type for NewFromDef

◆ PyProjection_Type_NUM

#define PyProjection_Type_NUM   0

index for Type