RAVE
pypolarnavinfo.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2024 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 PYAREA_H
26#define PYAREA_H
27#include "rave_types.h"
28
32typedef struct {
33 PyObject_HEAD /*Always has to be on top*/
36
37#define PyPolarNavigationInfo_Type_NUM 0
39#define PyPolarNavigationInfo_GetNative_NUM 1
40#define PyPolarNavigationInfo_GetNative_RETURN PolarNavigationInfo
41#define PyPolarNavigationInfo_GetNative_PROTO (PyPolarNavigationInfo*)
43#define PyPolarNavigationInfo_New_NUM 2
44#define PyPolarNavigationInfo_New_RETURN PyPolarNavigationInfo*
45#define PyPolarNavigationInfo_New_PROTO (PolarNavigationInfo)
47#define PyPolarNavigationInfo_API_pointers 3
49#define PyPolarNavigationInfo_CAPSULE_NAME "_pypolarnavinfo._C_API"
50
51#ifdef PYPOLARNAVIGATIONINFO_MODULE
53extern PyTypeObject PyPolarNavigationInfo_Type;
54
56#define PyPolarNavigationInfo_Check(op) ((op)->ob_type == &PyPolarNavigationInfo_Type)
57
60
63
64#else
66static void **PyPolarNavigationInfo_API;
67
72#define PyPolarNavigationInfo_GetNative \
73 (*(PyPolarNavigationInfo_GetNative_RETURN (*)PyPolarNavigationInfo_GetNative_PROTO) PyPolarNavigationInfo_API[PyPolarNavigationInfo_GetNative_NUM])
74
82#define PyPolarNavigationInfo_New \
83 (*(PyPolarNavigationInfo_New_RETURN (*)PyPolarNavigationInfo_New_PROTO) PyPolarNavigationInfo_API[PyPolarNavigationInfo_New_NUM])
84
88#define PyPolarNavigationInfo_Check(op) \
89 (Py_TYPE(op) == &PyPolarNavigationInfo_Type)
90
91#define PyPolarNavigationInfo_Type (*(PyTypeObject*)PyPolarNavigationInfo_API[PyPolarNavigationInfo_Type_NUM])
92
96#define import_pypolarnavinfo() \
97 PyPolarNavigationInfo_API = (void **)PyCapsule_Import(PyPolarNavigationInfo_CAPSULE_NAME, 1);
98#endif
99
100#endif /* PYPOLARNAVIGATIONINFO_H */
#define PyPolarNavigationInfo_GetNative
Returns a pointer to the internal area, remember to release the reference when done with the object.
Definition pypolarnavinfo.h:72
#define PyPolarNavigationInfo_New_PROTO
arguments for New
Definition pypolarnavinfo.h:45
#define PyPolarNavigationInfo_GetNative_RETURN
return type for GetNative
Definition pypolarnavinfo.h:40
#define PyPolarNavigationInfo_New_RETURN
return type for New
Definition pypolarnavinfo.h:44
#define PyPolarNavigationInfo_New
Creates a new polar scan instance.
Definition pypolarnavinfo.h:82
#define PyPolarNavigationInfo_GetNative_PROTO
arguments for GetNative
Definition pypolarnavinfo.h:41
Type definitions for RAVE.
Provides user with navigation information.
Definition rave_types.h:160
A cartesian product.
Definition pypolarnavinfo.h:32
PyObject_HEAD PolarNavigationInfo info
the navigation info
Definition pypolarnavinfo.h:34