itom 1.4.0
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2013, Institut fuer Technische Optik (ITO), 00005 Universitaet Stuttgart, Germany 00006 00007 This file is part of itom. 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 itom is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00017 General Public Licence for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with itom. If not, see <http://www.gnu.org/licenses/>. 00021 *********************************************************************** */ 00022 00023 #ifndef PYTHONPROXY_H 00024 #define PYTHONPROXY_H 00025 00026 /* includes */ 00027 #ifndef Q_MOC_RUN 00028 #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API //see numpy help ::array api :: Miscellaneous :: Importing the api (this line must bebefore include global.h) 00029 #define NO_IMPORT_ARRAY 00030 00031 //python 00032 // see http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3 00033 #if (defined _DEBUG) && (!defined linux) 00034 #undef _DEBUG 00035 #include "Python.h" 00036 #define _DEBUG 00037 #else 00038 #include "Python.h" 00039 #endif 00040 #endif 00041 00042 namespace ito 00043 { 00044 00045 class PythonProxy 00046 { 00047 public: 00048 typedef struct 00049 { 00050 PyObject_HEAD 00051 PyObject* inst; 00052 PyObject* func; 00053 PyObject* klass; 00054 PyObject* base; 00055 } 00056 PyProxy; 00057 00058 //------------------------------------------------------------------------------------------------- 00059 // constructor, deconstructor, alloc, dellaoc 00060 //------------------------------------------------------------------------------------------------- 00061 static void PyProxy_dealloc(PyProxy *self); 00062 static PyObject* PyProxy_new(PyTypeObject *type, PyObject *args, PyObject *kwds); 00063 static int PyProxy_init(PyProxy *self, PyObject *args, PyObject *kwds); 00064 00065 00066 static PyObject *PyProxy_richcompare(PyObject *v, PyObject *w, int op); 00067 static PyObject *PyProxy_call(PyProxy *self, PyObject *args, PyObject *kwds); 00068 //------------------------------------------------------------------------------------------------- 00069 // type structures 00070 //------------------------------------------------------------------------------------------------- 00071 //static PyMemberDef PyNpDataObject_members[]; 00072 //static PyMethodDef PyPointCloud_methods[]; 00073 static PyTypeObject PyProxyType; 00074 static PyModuleDef PyProxyModule; 00075 00076 static void PyProxy_addTpDict(PyObject *tp_dict); 00077 }; 00078 00079 }; //end namespace ito 00080 00081 00082 #endif