BEAM BLOCKAGE
pybeamblockagemap.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2011 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of beamb.
5
6beamb 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
11beamb 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 beamb. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
25#ifndef PYBEAMBLOCKAGEMAP_H
26#define PYBEAMBLOCKAGEMAP_H
27#include "beamblockagemap.h"
28
32typedef struct {
33 PyObject_HEAD /*Always have to be on top*/
36
37#define PyBeamBlockageMap_Type_NUM 0
39#define PyBeamBlockageMap_GetNative_NUM 1
40#define PyBeamBlockageMap_GetNative_RETURN BeamBlockageMap_t*
41#define PyBeamBlockageMap_GetNative_PROTO (PyBeamBlockageMap*)
43#define PyBeamBlockageMap_New_NUM 2
44#define PyBeamBlockageMap_New_RETURN PyBeamBlockageMap*
45#define PyBeamBlockageMap_New_PROTO (BeamBlockageMap_t*)
47#define PyBeamBlockageMap_API_pointers 3
49#define PyBeamBlockageMap_CAPSULE_NAME "_beamblockagemap._C_API"
50
51#ifdef PYBEAMBLOCKAGEMAP_MODULE
53extern PyTypeObject PyBeamBlockageMap_Type;
54
56#define PyBeamBlockageMap_Check(op) ((op)->ob_type == &PyBeamBlockageMap_Type)
57
60
63
64#else
66static void **PyBeamBlockageMap_API;
67
72#define PyBeamBlockageMap_GetNative \
73 (*(PyBeamBlockageMap_GetNative_RETURN (*)PyBeamBlockageMap_GetNative_PROTO) PyBeamBlockageMap_API[PyBeamBlockageMap_GetNative_NUM])
74
82#define PyBeamBlockageMap_New \
83 (*(PyBeamBlockageMap_New_RETURN (*)PyBeamBlockageMap_New_PROTO) PyBeamBlockageMap_API[PyBeamBlockageMap_New_NUM])
84
88#define PyBeamBlockageMap_Check(op) \
89 (Py_TYPE(op) == &PyBeamBlockageMap_Type)
90
91#define PyBeamBlockageMap_Type (*(PyTypeObject*)PyBeamBlockageMap_API[PyBeamBlockageMap_Type_NUM])
92
96#define import_beamblockagemap() \
97 PyBeamBlockageMap_API = (void **)PyCapsule_Import(PyBeamBlockageMap_CAPSULE_NAME, 1);
98
99#endif
100
101#endif /* PYBEAMBLOCKAGEMAP_H */
Beam-blockage topography map reading functionallity.
#define PyBeamBlockageMap_New_PROTO
arguments for New
Definition pybeamblockagemap.h:45
#define PyBeamBlockageMap_GetNative_RETURN
return type for GetNative
Definition pybeamblockagemap.h:40
#define PyBeamBlockageMap_GetNative_PROTO
arguments for GetNative
Definition pybeamblockagemap.h:41
#define PyBeamBlockageMap_New_RETURN
return type for New
Definition pybeamblockagemap.h:44
#define PyBeamBlockageMap_GetNative
Returns a pointer to the internal beam blockage, remember to release the reference when done with the...
Definition pybeamblockagemap.h:72
#define PyBeamBlockageMap_New
Creates a new beam blockage instance.
Definition pybeamblockagemap.h:82
The beam blockage.
Definition pybeamblockagemap.h:32
PyObject_HEAD BeamBlockageMap_t * map
the native object
Definition pybeamblockagemap.h:34
Represents the beam blockage algorithm.
Definition beamblockagemap.c:39