BALTRAD PPC
pypdpprocessor.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 PYPDPPROCESSING_H
26#define PYPDPPROCESSING_H
27#include "pdp_processor.h"
28
32typedef struct {
33 PyObject_HEAD /*Always have to be on top*/
36
37#define PyPdpProcessor_Type_NUM 0
39#define PyPdpProcessor_GetNative_NUM 1
40#define PyPdpProcessor_GetNative_RETURN PdpProcessor_t*
41#define PyPdpProcessor_GetNative_PROTO (PyPdpProcessor*)
43#define PyPdpProcessor_New_NUM 2
44#define PyPdpProcessor_New_RETURN PyPdpProcessor*
45#define PyPdpProcessor_New_PROTO (PdpProcessor_t*)
47#define PyPdpProcessor_API_pointers 3
49#define PyPdpProcessor_CAPSULE_NAME "_pdpprocessor._C_API"
50
51#ifdef PYPDPPROCESSOR_MODULE
53extern PyTypeObject PyPdpProcessor_Type;
54
56#define PyPdpProcessor_Check(op) ((op)->ob_type == &PyPdpProcessor_Type)
57
60
63
64#else
66static void **PyPdpProcessor_API;
67
72#define PyPdpProcessor_GetNative \
73 (*(PyPdpProcessor_GetNative_RETURN (*)PyPdpProcessor_GetNative_PROTO) PyPdpProcessor_API[PyPdpProcessor_GetNative_NUM])
74
82#define PyPdpProcessor_New \
83 (*(PyPdpProcessor_New_RETURN (*)PyPdpProcessor_New_PROTO) PyPdpProcessor_API[PyPdpProcessor_New_NUM])
84
88#define PyPdpProcessor_Check(op) \
89 (Py_TYPE(op) == &PyPdpProcessor_Type)
90
91#define PyPdpProcessor_Type (*(PyTypeObject*)PyPdpProcessor_API[PyPdpProcessor_Type_NUM])
92
96#define import_pdpprocessor() \
97 PyPdpProcessor_API = (void **)PyCapsule_Import(PyPdpProcessor_CAPSULE_NAME, 1);
98
99#endif
100
101#endif /* PYPDPPROCESSOR_H */
Main routine for the pdp processing based on the algorithm from Vulpiani et al.
#define PyPdpProcessor_GetNative_RETURN
return type for GetNative
Definition pypdpprocessor.h:40
#define PyPdpProcessor_GetNative
Returns a pointer to the internal pdp processor, remember to release the reference when done with the...
Definition pypdpprocessor.h:72
#define PyPdpProcessor_GetNative_PROTO
arguments for GetNative
Definition pypdpprocessor.h:41
#define PyPdpProcessor_New_RETURN
return type for New
Definition pypdpprocessor.h:44
#define PyPdpProcessor_New_PROTO
arguments for New
Definition pypdpprocessor.h:45
#define PyPdpProcessor_New
Creates a new pdp processor instance.
Definition pypdpprocessor.h:82
The fmi image object.
Definition pypdpprocessor.h:32
PyObject_HEAD PdpProcessor_t * processor
the pdp processor
Definition pypdpprocessor.h:34
Represents one transformator.
Definition pdp_processor.c:41