BALTRAD PPC
pyppcradaroptions.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2011 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of bRopo.
5
6bRopo 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
11bRopo 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 bRopo. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
25#ifndef PYPPCRADAROPTIONS_H
26#define PYPPCRADAROPTIONS_H
27#include "ppc_radar_options.h"
28
32typedef struct {
33 PyObject_HEAD /*Always have to be on top*/
36
37#define PyPpcRadarOptions_Type_NUM 0
39#define PyPpcRadarOptions_GetNative_NUM 1
40#define PyPpcRadarOptions_GetNative_RETURN PpcRadarOptions_t*
41#define PyPpcRadarOptions_GetNative_PROTO (PyPpcRadarOptions*)
43#define PyPpcRadarOptions_New_NUM 2
44#define PyPpcRadarOptions_New_RETURN PyPpcRadarOptions*
45#define PyPpcRadarOptions_New_PROTO (PpcRadarOptions_t*)
47#define PyPpcRadarOptions_API_pointers 3
49#define PyPpcRadarOptions_CAPSULE_NAME "_ppcradaroptions._C_API"
50
51#ifdef PYPPCRADAROPTIONS_MODULE
53extern PyTypeObject PyPpcRadarOptions_Type;
54
56#define PyPpcRadarOptions_Check(op) ((op)->ob_type == &PyPpcRadarOptions_Type)
57
60
63
64#else
66static void **PyPpcRadarOptions_API;
67
72#define PyPpcRadarOptions_GetNative \
73 (*(PyPpcRadarOptions_GetNative_RETURN (*)PyPpcRadarOptions_GetNative_PROTO) PyPpcRadarOptions_API[PyPpcRadarOptions_GetNative_NUM])
74
82#define PyPpcRadarOptions_New \
83 (*(PyPpcRadarOptions_New_RETURN (*)PyPpcRadarOptions_New_PROTO) PyPpcRadarOptions_API[PyPpcRadarOptions_New_NUM])
84
88#define PyPpcRadarOptions_Check(op) \
89 (Py_TYPE(op) == &PyPpcRadarOptions_Type)
90
91#define PyPpcRadarOptions_Type (*(PyTypeObject*)PyPpcRadarOptions_API[PyPpcRadarOptions_Type_NUM])
92
96#define import_ppcradaroptions() \
97 PyPpcRadarOptions_API = (void **)PyCapsule_Import(PyPpcRadarOptions_CAPSULE_NAME, 1);
98
99#endif
100
101#endif /* PYPPCRADAROPTIONS_H */
Keeps one radar options setup This object does support #RAVE_OBJECT_CLONE.
#define PyPpcRadarOptions_New_RETURN
return type for New
Definition pyppcradaroptions.h:44
#define PyPpcRadarOptions_GetNative_RETURN
return type for GetNative
Definition pyppcradaroptions.h:40
#define PyPpcRadarOptions_GetNative
Returns a pointer to the internal ppc radar options, remember to release the reference when done with...
Definition pyppcradaroptions.h:72
#define PyPpcRadarOptions_GetNative_PROTO
arguments for GetNative
Definition pyppcradaroptions.h:41
#define PyPpcRadarOptions_New_PROTO
arguments for New
Definition pyppcradaroptions.h:45
#define PyPpcRadarOptions_New
Creates a new ppc radar options instance.
Definition pyppcradaroptions.h:82
The ppc radar objects class.
Definition pyppcradaroptions.h:32
PyObject_HEAD PpcRadarOptions_t * options
the options
Definition pyppcradaroptions.h:34
The radar options class.
Definition ppc_radar_options.c:39