RAVE
pyprojectionpipeline.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of RAVE.
5
6RAVE is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11RAVE is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with RAVE. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
25#ifndef PYPROJECTIONPIPELINE_H
26#define PYPROJECTIONPIPELINE_H
27#include "projection_pipeline.h"
28
32typedef struct {
33 PyObject_HEAD /*Always has to be on top*/
36
37#define PyProjectionPipeline_Type_NUM 0
39#define PyProjectionPipeline_GetNative_NUM 1
40#define PyProjectionPipeline_GetNative_RETURN ProjectionPipeline_t*
41#define PyProjectionPipeline_GetNative_PROTO (PyProjectionPipeline*)
43#define PyProjectionPipeline_New_NUM 2
44#define PyProjectionPipeline_New_RETURN PyProjectionPipeline*
45#define PyProjectionPipeline_New_PROTO (ProjectionPipeline_t*)
47#define PyProjectionPipeline_API_pointers 3
49#define PyProjectionPipeline_CAPSULE_NAME "_projectionpipeline._C_API"
50
51#ifdef PYPROJECTIONPIPELINE_MODULE
53extern PyTypeObject PyProjectionPipeline_Type;
54
56#define PyProjectionPipeline_Check(op) ((op)->ob_type == &PyProjectionPipeline_Type)
57
62
67
68#else
70static void **PyProjectionPipeline_API;
71
76#define PyProjectionPipeline_GetNative \
77 (*(PyProjectionPipeline_GetNative_RETURN (*)PyProjectionPipeline_GetNative_PROTO) PyProjectionPipeline_API[PyProjectionPipeline_GetNative_NUM])
78
85#define PyProjectionPipeline_New \
86 (*(PyProjectionPipeline_New_RETURN (*)PyProjectionPipeline_New_PROTO) PyProjectionPipeline_API[PyProjectionPipeline_New_NUM])
87
91#define PyProjectionPipeline_Check(op) \
92 (Py_TYPE(op) == &PyProjectionPipeline_Type)
93
94#define PyProjectionPipeline_Type (*(PyTypeObject *)PyProjectionPipeline_API[PyProjectionPipeline_Type_NUM])
95
99#define import_pyprojectionpipeline() \
100 PyProjectionPipeline_API = (void **)PyCapsule_Import(PyProjectionPipeline_CAPSULE_NAME, 1);
101
102#endif
103
104#endif /* PYPROJECTIONPIPELINE_H */
Helper class to support both legacy PROJ.4 projection and > PROJ.4 This object supports RAVE_OBJECT_C...
#define PyProjectionPipeline_GetNative_PROTO
argument prototype for GetNative
Definition pyprojectionpipeline.h:41
#define PyProjectionPipeline_New
Creates a new projection pipeline instance.
Definition pyprojectionpipeline.h:85
#define PyProjectionPipeline_New_PROTO
argument prototype for New
Definition pyprojectionpipeline.h:45
#define PyProjectionPipeline_GetNative_RETURN
return type for GetNative
Definition pyprojectionpipeline.h:40
#define PyProjectionPipeline_GetNative
Returns a pointer to the internal projection pipeline, remember to release the reference when done wi...
Definition pyprojectionpipeline.h:76
#define PyProjectionPipeline_New_RETURN
return type for New
Definition pyprojectionpipeline.h:44
A projection.
Definition pyprojectionpipeline.h:32
PyObject_HEAD ProjectionPipeline_t * pipeline
The pipeline definition.
Definition pyprojectionpipeline.h:34
Represents one projection.
Definition projection_pipeline.c:43