RAVE
pyradardefinition.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 PYRADARDEFINITION_H
26#define PYRADARDEFINITION_H
27#include "radardefinition.h"
28
32typedef struct {
33 PyObject_HEAD /*Always has to be on top*/
36
37#define PyRadarDefinition_Type_NUM 0
39#define PyRadarDefinition_GetNative_NUM 1
40#define PyRadarDefinition_GetNative_RETURN RadarDefinition_t*
41#define PyRadarDefinition_GetNative_PROTO (PyRadarDefinition*)
43#define PyRadarDefinition_New_NUM 2
44#define PyRadarDefinition_New_RETURN PyRadarDefinition*
45#define PyRadarDefinition_New_PROTO (RadarDefinition_t*)
47#define PyRadarDefinition_API_pointers 3
49#define PyRadarDefinition_CAPSULE_NAME "_radardef._C_API"
50
51#ifdef PYRADARDEFINITION_MODULE
53extern PyTypeObject PyRadarDefinition_Type;
54
56#define PyRadarDefinition_Check(op) ((op)->ob_type == &PyRadarDefinition_Type)
57
60
63
64#else
66static void **PyRadarDefinition_API;
67
72#define PyRadarDefinition_GetNative \
73 (*(PyRadarDefinition_GetNative_RETURN (*)PyRadarDefinition_GetNative_PROTO) PyRadarDefinition_API[PyRadarDefinition_GetNative_NUM])
74
82#define PyRadarDefinition_New \
83 (*(PyRadarDefinition_New_RETURN (*)PyRadarDefinition_New_PROTO) PyRadarDefinition_API[PyRadarDefinition_New_NUM])
84
88#define PyRadarDefinition_Check(op) \
89 (Py_TYPE(op) == &PyRadarDefinition_Type)
90
91#define PyRadarDefinition_Type (*(PyTypeObject*)PyRadarDefinition_API[PyRadarDefinition_Type_NUM])
92
96#define import_pyradardefinition() \
97 PyRadarDefinition_API = (void **)PyCapsule_Import(PyRadarDefinition_CAPSULE_NAME, 1);
98
99#endif
100
101
102
103#endif /* PYRADARDEFINITION_H */
#define PyRadarDefinition_New_RETURN
return type for New
Definition pyradardefinition.h:44
#define PyRadarDefinition_New
Creates a new radar definition instance.
Definition pyradardefinition.h:82
#define PyRadarDefinition_GetNative_RETURN
return type for GetNative
Definition pyradardefinition.h:40
#define PyRadarDefinition_New_PROTO
arguments for New
Definition pyradardefinition.h:45
#define PyRadarDefinition_GetNative_PROTO
arguments for GetNative
Definition pyradardefinition.h:41
#define PyRadarDefinition_GetNative
Returns a pointer to the internal definition, remember to release the reference when done with the ob...
Definition pyradardefinition.h:72
Defines a radar definition This object supports RAVE_OBJECT_CLONE.
A radar definition.
Definition pyradardefinition.h:32
PyObject_HEAD RadarDefinition_t * def
the radar definition
Definition pyradardefinition.h:34
Represents the area.
Definition radardefinition.c:33