RAVE
pyacqvafeaturemap.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 PYACQVAFEATUREMAP_H
26#define PYACQVAFEATUREMAP_H
27#include "acqvafeaturemap.h"
28
32typedef struct {
33 PyObject_HEAD /*Always has to be on top*/
36
37typedef struct {
38 PyObject_HEAD /*Always has to be on top*/
41
42typedef struct {
43 PyObject_HEAD /*Always has to be on top*/
46
47#define PyAcqvaFeatureMap_Type_NUM 0
48
49#define PyAcqvaFeatureMap_GetNative_NUM 1
50#define PyAcqvaFeatureMap_GetNative_RETURN AcqvaFeatureMap_t*
51#define PyAcqvaFeatureMap_GetNative_PROTO (PyAcqvaFeatureMap*)
52
53#define PyAcqvaFeatureMap_New_NUM 2
54#define PyAcqvaFeatureMap_New_RETURN PyAcqvaFeatureMap*
55#define PyAcqvaFeatureMap_New_PROTO (AcqvaFeatureMap_t*)
56
57#define PyAcqvaFeatureMapElevation_Type_NUM 3
58
59#define PyAcqvaFeatureMapElevation_GetNative_NUM 4
60#define PyAcqvaFeatureMapElevation_GetNative_RETURN AcqvaFeatureMapElevation_t*
61#define PyAcqvaFeatureMapElevation_GetNative_PROTO (PyAcqvaFeatureMapElevation*)
62
63#define PyAcqvaFeatureMapElevation_New_NUM 5
64#define PyAcqvaFeatureMapElevation_New_RETURN PyAcqvaFeatureMapElevation*
65#define PyAcqvaFeatureMapElevation_New_PROTO (AcqvaFeatureMapElevation_t*)
66
67#define PyAcqvaFeatureMapField_Type_NUM 6
68
69#define PyAcqvaFeatureMapField_GetNative_NUM 7
70#define PyAcqvaFeatureMapField_GetNative_RETURN AcqvaFeatureMapField_t*
71#define PyAcqvaFeatureMapField_GetNative_PROTO (PyAcqvaFeatureMapField*)
72
73#define PyAcqvaFeatureMapField_New_NUM 8
74#define PyAcqvaFeatureMapField_New_RETURN PyAcqvaFeatureMapField*
75#define PyAcqvaFeatureMapField_New_PROTO (AcqvaFeatureMapField_t*)
76
77#define PyAcqvaFeatureMap_API_pointers 9
78
79#define PyAcqvaFeatureMap_CAPSULE_NAME "_acqvafeaturemap._C_API"
80
81
82#ifdef PYACQVAFEATUREMAP_MODULE
84extern PyTypeObject PyAcqvaFeatureMap_Type;
85
86extern PyTypeObject PyAcqvaFeatureMapElevation_Type;
87
88extern PyTypeObject PyAcqvaFeatureMapField_Type;
89
91#define PyAcqvaFeatureMap_Check(op) ((op)->ob_type == &PyAcqvaFeatureMap_Type)
92
94#define PyAcqvaFeatureMapElevation_Check(op) ((op)->ob_type == &PyAcqvaFeatureMapElevation_Type)
95
97#define PyAcqvaFeatureMapField_Check(op) ((op)->ob_type == &PyAcqvaFeatureMapField_Type)
98
101
104
107
110
113
116
117#else
119static void **PyAcqvaFeatureMap_API;
120
125#define PyAcqvaFeatureMap_GetNative \
126 (*(PyAcqvaFeatureMap_GetNative_RETURN (*)PyAcqvaFeatureMap_GetNative_PROTO) PyAcqvaFeatureMap_API[PyAcqvaFeatureMap_GetNative_NUM])
127
135#define PyAcqvaFeatureMap_New \
136 (*(PyAcqvaFeatureMap_New_RETURN (*)PyAcqvaFeatureMap_New_PROTO) PyAcqvaFeatureMap_API[PyAcqvaFeatureMap_New_NUM])
137
142#define PyAcqvaFeatureMapElevation_GetNative \
143 (*(PyAcqvaFeatureMapElevation_GetNative_RETURN (*)PyAcqvaFeatureMapElevation_GetNative_PROTO) PyAcqvaFeatureMapElevation_API[PyAcqvaFeatureMapElevation_GetNative_NUM])
144
152#define PyAcqvaFeatureMapElevation_New \
153 (*(PyAcqvaFeatureMapElevation_New_RETURN (*)PyAcqvaFeatureMapElevation_New_PROTO) PyAcqvaFeatureMapElevation_API[PyAcqvaFeatureMapElevation_New_NUM])
154
159#define PyAcqvaFeatureMapField_GetNative \
160 (*(PyAcqvaFeatureMapField_GetNative_RETURN (*)PyAcqvaFeatureMapField_GetNative_PROTO) PyAcqvaFeatureMapField_API[PyAcqvaFeatureMapField_GetNative_NUM])
161
169#define PyAcqvaFeatureMapField_New \
170 (*(PyAcqvaFeatureMapField_New_RETURN (*)PyAcqvaFeatureMapField_New_PROTO) PyAcqvaFeatureMapField_API[PyAcqvaFeatureMapField_New_NUM])
171
175#define PyAcqvaFeatureMap_Check(op) \
176 (Py_TYPE(op) == &PyAcqvaFeatureMap_Type)
177
178#define PyAcqvaFeatureMapElevation_Check(op) \
179 (Py_TYPE(op) == &PyAcqvaFeatureMapElevation_Type)
180
181#define PyAcqvaFeatureMapField_Check(op) \
182 (Py_TYPE(op) == &PyAcqvaFeatureMapField_Type)
183
184#define PyAcqvaFeatureMap_Type (*(PyTypeObject*)PyAcqvaFeatureMap_API[PyAcqvaFeatureMap_Type_NUM])
185
186#define PyAcqvaFeatureMapElevation_Type (*(PyTypeObject*)PyAcqvaFeatureMap_API[PyAcqvaFeatureMapElevation_Type_NUM])
187
188#define PyAcqvaFeatureMapField_Type (*(PyTypeObject*)PyAcqvaFeatureMap_API[PyAcqvaFeatureMapElevation_Type_NUM])
189
193#define import_acqvafeaturemap() \
194 PyAcqvaFeatureMap_API = (void **)PyCapsule_Import(PyAcqvaFeatureMap_CAPSULE_NAME, 1);
195
196#endif
197
198#endif /* PYACQVAFEATUREMAP_H */
Feature map used when working with acqva.
struct _AcqvaFeatureMapField_t AcqvaFeatureMapField_t
Defines a feature map field.
Definition acqvafeaturemap.h:51
struct _AcqvaFeatureMap_t AcqvaFeatureMap_t
Defines a feature map.
Definition acqvafeaturemap.h:40
struct _AcqvaFeatureMapElevation_t AcqvaFeatureMapElevation_t
Defines a feature map elevation.
Definition acqvafeaturemap.h:46
#define PyAcqvaFeatureMapElevation_New_PROTO
arguments for New
Definition pyacqvafeaturemap.h:65
#define PyAcqvaFeatureMapElevation_New
Creates a new acqva feature map elevation.
Definition pyacqvafeaturemap.h:152
#define PyAcqvaFeatureMap_New
Creates a acqva feature map instance.
Definition pyacqvafeaturemap.h:135
#define PyAcqvaFeatureMap_New_RETURN
return type for New
Definition pyacqvafeaturemap.h:54
#define PyAcqvaFeatureMapField_GetNative
Returns a pointer to the internal acqva feature map field, remember to release the reference when don...
Definition pyacqvafeaturemap.h:159
#define PyAcqvaFeatureMapElevation_GetNative_PROTO
arguments for GetNative
Definition pyacqvafeaturemap.h:61
#define PyAcqvaFeatureMapElevation_GetNative
Returns a pointer to the internal acqva feature map elevation, remember to release the reference when...
Definition pyacqvafeaturemap.h:142
#define PyAcqvaFeatureMapElevation_New_RETURN
return type for New
Definition pyacqvafeaturemap.h:64
#define PyAcqvaFeatureMapElevation_GetNative_RETURN
return type for GetNative
Definition pyacqvafeaturemap.h:60
#define PyAcqvaFeatureMapField_New_RETURN
return type for GetNative
Definition pyacqvafeaturemap.h:74
#define PyAcqvaFeatureMapField_New_PROTO
arguments for GetNative
Definition pyacqvafeaturemap.h:75
#define PyAcqvaFeatureMapField_New
Creates a new acqva feature map field.
Definition pyacqvafeaturemap.h:169
#define PyAcqvaFeatureMap_GetNative_RETURN
return type for GetNative
Definition pyacqvafeaturemap.h:50
#define PyAcqvaFeatureMapField_GetNative_RETURN
return type for GetNative
Definition pyacqvafeaturemap.h:70
#define PyAcqvaFeatureMap_GetNative
Returns a pointer to the internal acqva feature map, remember to release the reference when done with...
Definition pyacqvafeaturemap.h:125
#define PyAcqvaFeatureMap_GetNative_PROTO
arguments for GetNative
Definition pyacqvafeaturemap.h:51
#define PyAcqvaFeatureMapField_GetNative_PROTO
arguments for GetNative
Definition pyacqvafeaturemap.h:71
#define PyAcqvaFeatureMap_New_PROTO
arguments for New
Definition pyacqvafeaturemap.h:55
Definition pyacqvafeaturemap.h:37
PyObject_HEAD AcqvaFeatureMapElevation_t * elevation
the elevation group
Definition pyacqvafeaturemap.h:39
Definition pyacqvafeaturemap.h:42
PyObject_HEAD AcqvaFeatureMapField_t * field
the field
Definition pyacqvafeaturemap.h:44
A feature map.
Definition pyacqvafeaturemap.h:32
PyObject_HEAD AcqvaFeatureMap_t * featuremap
the feature map
Definition pyacqvafeaturemap.h:34