itom
Loading...
Searching...
No Matches
pythonMatlab.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 PYTHONMATLAB_H
24#define PYTHONMATLAB_H
25
26#include "pythonWrapper.h"
27#include "structmember.h"
28
29#include "../global.h"
30
31#if ITOM_PYTHONMATLAB == 1
32/* * *
33 * Copyright 2010 Joakim Mller
34 *
35 * This file is part of pymatlab.
36 *
37 * pymatlab is free software: you can redistribute it and/or modify
38 * it under the terms of the GNU General Public License as published by
39 * the Free Software Foundation, either version 3 of the License, or
40 * (at your option) any later version.
41 *
42 * pymatlab is distributed in the hope that it will be useful,
43 * but WITHOUT ANY WARRANTY; without even the implied warranty of
44 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 * GNU General Public License for more details.
46 *
47 * You should have received a copy of the GNU General Public License
48 * along with pymatlab. If not, see <http://www.gnu.org/licenses/>.
49 * * */
50
51#include "common/retVal.h"
52#include <qlibrary.h>
53#include <engine.h>
54
55
56
57namespace ito
58{
59
60class PythonMatlab
61{
62
63public:
64
65 typedef struct
66 {
67 PyObject_HEAD
68 Engine *ep;
69 } PyMatlabSessionObject;
70
71 static PyObject * PyMatlabSessionObject_new(PyTypeObject *type, PyObject *args, PyObject * kwds);
72
73 static int PyMatlabSessionObject_init(PyMatlabSessionObject *self, PyObject *args, PyObject *kwds);
74
75 static void PyMatlabSessionObject_dealloc(PyMatlabSessionObject *self);
76
77 static PyObject * PyMatlabSessionObject_run(PyMatlabSessionObject *self, PyObject *args);
78
79 static PyObject * PyMatlabSessionObject_setValue(PyMatlabSessionObject *self, PyObject *args);
80
81 static PyObject * PyMatlabSessionObject_setString(PyMatlabSessionObject *self, PyObject *args);
82
83 static PyObject * PyMatlabSessionObject_getString(PyMatlabSessionObject *self, PyObject *args);
84
85 static PyObject * PyMatlabSessionObject_GetValue(PyMatlabSessionObject * self, PyObject *args);
86
87 static PyObject * PyMatlabSessionObject_close(PyMatlabSessionObject * self, PyObject *args);
88
89
90 static PyMethodDef PyMatlabSessionObject_methods[];
91 static PyMemberDef PyMatlabSessionObject_members[]; // = { { NULL } };
92 static PyTypeObject PyMatlabSessionObjectType;
93 static PyModuleDef PyMatlabSessionObject_Module;
94 static PyObject* PyInit_matlab(void);
95
96 static bool initialized;
97 static ito::RetVal loadLibrary();
98
99 static QLibrary engineLibrary;
100 static QLibrary mxLibrary;
101
102}; //end class PythonMatlab
103
104} //end namespace ito
105
106
107#endif
108
109#endif
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40