itom
Loading...
Searching...
No Matches
pythonProxy.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef PYTHONPROXY_H
24#define PYTHONPROXY_H
25
26/* includes */
27#ifndef Q_MOC_RUN
28 #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API //see numpy help ::array api :: Miscellaneous :: Importing the api (this line must before include global.h)
29 #define NO_IMPORT_ARRAY
30
31 #include "python/pythonWrapper.h"
32#endif
33
34namespace ito
35{
36
38{
39public:
40 typedef struct
41 {
42 PyObject_HEAD
43 PyObject* inst;
44 PyObject* func;
45 PyObject* klass;
46 PyObject* base;
47 }
48 PyProxy;
49
50 //-------------------------------------------------------------------------------------------------
51 // constructor, deconstructor, alloc, dellaoc
52 //-------------------------------------------------------------------------------------------------
53 static void PyProxy_dealloc(PyProxy *self);
54 static PyObject* PyProxy_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
55 static int PyProxy_init(PyProxy *self, PyObject *args, PyObject *kwds);
56
57
58 static PyObject *PyProxy_richcompare(PyObject *v, PyObject *w, int op);
59 static PyObject *PyProxy_call(PyProxy *self, PyObject *args, PyObject *kwds);
60
61 //-------------------------------------------------------------------------------------------------
62 // type structures
63 //-------------------------------------------------------------------------------------------------
64 static PyTypeObject PyProxyType;
65 static PyModuleDef PyProxyModule;
66
67 static void PyProxy_addTpDict(PyObject *tp_dict);
68};
69
70}; //end namespace ito
71
72
73#endif
Definition pythonProxy.h:38
Definition apiFunctionsGraph.cpp:40
Definition pythonProxy.h:41