RAVE
pycompositearguments.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 PYCOMPOSITEARGUMENTS_H
26#define PYCOMPOSITEARGUMENTS_H
27#include "compositearguments.h"
28
32typedef struct {
33 PyObject_HEAD /*Always has to be on top*/
36
37#define PyCompositeArguments_Type_NUM 0
38
39#define PyCompositeArguments_GetNative_NUM 1
40#define PyCompositeArguments_GetNative_RETURN CompositeArguments_t*
41#define PyCompositeArguments_GetNative_PROTO (PyCompositeArguments*)
42
43#define PyCompositeArguments_New_NUM 2
44#define PyCompositeArguments_New_RETURN PyCompositeArguments*
45#define PyCompositeArguments_New_PROTO (CompositeArguments_t*)
46
47#define PyCompositeArguments_API_pointers 3
48
49#define PyCompositeArguments_CAPSULE_NAME "_compositearguments._C_API"
50
51
52#ifdef PYCOMPOSITEARGUMENTS_MODULE
54extern PyTypeObject PyCompositeArguments_Type;
55
57#define PyCompositeArguments_Check(op) ((op)->ob_type == &PyCompositeArguments_Type)
58
61
64
65#else
67static void **PyCompositeArguments_API;
68
73#define PyCompositeArguments_GetNative \
74 (*(PyCompositeArguments_GetNative_RETURN (*)PyCompositeArguments_GetNative_PROTO) PyCompositeArguments_API[PyCompositeArguments_GetNative_NUM])
75
83#define PyCompositeArguments_New \
84 (*(PyCompositeArguments_New_RETURN (*)PyCompositeArguments_New_PROTO) PyCompositeArguments_API[PyCompositeArguments_New_NUM])
85
89#define PyCompositeArguments_Check(op) \
90 (Py_TYPE(op) == &PyCompositeArguments_Type)
91
92#define PyCompositeArguments_Type (*(PyTypeObject*)PyCompositeArguments_API[PyCompositeArguments_Type_NUM])
93
97#define import_compositearguments() \
98 PyCompositeArguments_API = (void **)PyCapsule_Import(PyCompositeArguments_CAPSULE_NAME, 1);
99
100#endif
101
102
103
104#endif /* PYCOMPOSITEARGUMENTS_H */
The arguments that should be passed on to the composite generator.
struct _CompositeArguments_t CompositeArguments_t
Defines a Geographical Area.
Definition compositearguments.h:41
#define PyCompositeArguments_GetNative_PROTO
arguments for GetNative
Definition pycompositearguments.h:41
#define PyCompositeArguments_New
Creates a new composite generator instance.
Definition pycompositearguments.h:83
#define PyCompositeArguments_GetNative
Returns a pointer to the internal composite, remember to release the reference when done with the obj...
Definition pycompositearguments.h:73
#define PyCompositeArguments_New_RETURN
return type for New
Definition pycompositearguments.h:44
#define PyCompositeArguments_New_PROTO
arguments for New
Definition pycompositearguments.h:45
#define PyCompositeArguments_GetNative_RETURN
return type for GetNative
Definition pycompositearguments.h:40
A composite argument structure.
Definition pycompositearguments.h:32
PyObject_HEAD CompositeArguments_t * args
the composite arguments
Definition pycompositearguments.h:34