RAVE
pypolarscanparam.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 PYPOLARSCANPARAM_H
26#define PYPOLARSCANPARAM_H
27#include "polarscanparam.h"
28
32typedef struct {
33 PyObject_HEAD /*Always has to be on top*/
36
37#define PyPolarScanParam_Type_NUM 0
39#define PyPolarScanParam_GetNative_NUM 1
40#define PyPolarScanParam_GetNative_RETURN PolarScanParam_t*
41#define PyPolarScanParam_GetNative_PROTO (PyPolarScanParam*)
43#define PyPolarScanParam_New_NUM 2
44#define PyPolarScanParam_New_RETURN PyPolarScanParam*
45#define PyPolarScanParam_New_PROTO (PolarScanParam_t*)
47#define PyPolarScanParam_API_pointers 3
49#define PyPolarScanParam_CAPSULE_NAME "_polarscanparam._C_API"
50
51#ifdef PYPOLARSCANPARAM_MODULE
53extern PyTypeObject PyPolarScanParam_Type;
54
56#define PyPolarScanParam_Check(op) ((op)->ob_type == &PyPolarScanParam_Type)
57
60
63
64#else
66static void **PyPolarScanParam_API;
67
72#define PyPolarScanParam_GetNative \
73 (*(PyPolarScanParam_GetNative_RETURN (*)PyPolarScanParam_GetNative_PROTO) PyPolarScanParam_API[PyPolarScanParam_GetNative_NUM])
74
82#define PyPolarScanParam_New \
83 (*(PyPolarScanParam_New_RETURN (*)PyPolarScanParam_New_PROTO) PyPolarScanParam_API[PyPolarScanParam_New_NUM])
84
88#define PyPolarScanParam_Check(op) \
89 (Py_TYPE(op) == &PyPolarScanParam_Type)
90
91#define PyPolarScanParam_Type (*(PyTypeObject*)PyPolarScanParam_API[PyPolarScanParam_Type_NUM])
92
96#define import_pypolarscanparam() \
97 PyPolarScanParam_API = (void **)PyCapsule_Import(PyPolarScanParam_CAPSULE_NAME, 1);
98
99#endif
100
101
102#endif /* PYPOLARSCANPARAM_H */
Defines the functions available when working with one parameter in a polar scan.
#define PyPolarScanParam_New_RETURN
return type for New
Definition pypolarscanparam.h:44
#define PyPolarScanParam_GetNative_RETURN
return type for GetNative
Definition pypolarscanparam.h:40
#define PyPolarScanParam_New_PROTO
arguments for New
Definition pypolarscanparam.h:45
#define PyPolarScanParam_GetNative
Returns a pointer to the internal polar scan param, remember to release the reference when done with ...
Definition pypolarscanparam.h:72
#define PyPolarScanParam_GetNative_PROTO
arguments for GetNative
Definition pypolarscanparam.h:41
#define PyPolarScanParam_New
Creates a new polar scan param instance.
Definition pypolarscanparam.h:82
A polar scan param.
Definition pypolarscanparam.h:32
PyObject_HEAD PolarScanParam_t * scanparam
the scan type
Definition pypolarscanparam.h:34
Represents one param in a scan.
Definition polarscanparam.c:41