itom 1.1.0
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2013, Institut für Technische Optik (ITO), 00005 Universität 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 //################### 00024 //# pythonStream.h # 00025 //################### 00026 00027 #ifndef PYTHONSTREAM_H 00028 #define PYTHONSTREAM_H 00029 00030 //python 00031 // see http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3 00032 #if (defined _DEBUG) && (!defined linux) 00033 #undef _DEBUG 00034 #include "Python.h" 00035 #define _DEBUG 00036 #else 00037 #include "Python.h" 00038 #endif 00039 00040 00041 class PyStream 00042 { 00043 00044 public: 00045 00047 /* 00048 The struct's name is PythonStream. This python type consists of the basic elements for every python type, 00049 included an integer value type, which indicates whether this stream corresponds to the stream \a cout or \a cerr. 00050 */ 00051 typedef struct 00052 { 00053 PyObject_HEAD 00054 int type; 00055 } 00056 PythonStream; 00057 00058 static void PythonStream_dealloc(PythonStream* self); 00059 //static PyObject *PythonStream_new(PyTypeObject *type, PyObject *args, PyObject *kwds); 00060 static int PythonStream_init(PythonStream *self, PyObject *args, PyObject *kwds); 00061 00062 static PyObject *PythonStream_name(PythonStream* self); 00063 static PyObject *PythonStream_fileno(PythonStream* self); 00064 static PyObject *PythonStream_write(PythonStream* self, PyObject *args); 00065 static PyObject *PythonStream_flush(PythonStream* self, PyObject *args); 00066 00067 static PyMemberDef PythonStream_members[]; 00068 static PyMethodDef PythonStream_methods[]; 00069 static PyTypeObject PythonStreamType; 00070 static PyModuleDef pythonStreamModule; 00071 }; 00072 00073 00074 #endif