PythonConsolePy.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef GUI_PYTHONCONSOLE_PY_H
00025 #define GUI_PYTHONCONSOLE_PY_H
00026 
00027 #include <CXX/Extensions.hxx>
00028 
00029 namespace Gui {
00030 class PythonConsole;
00031 class PythonInputField;
00032 
00041 class PythonStdout : public Py::PythonExtension<PythonStdout> 
00042 {
00043 private:
00044     PythonConsole* pyConsole;
00045 
00046 public:
00047     static void init_type(void);    // announce properties and methods
00048 
00049     PythonStdout(PythonConsole *pc);
00050     ~PythonStdout();
00051 
00052     Py::Object repr();
00053     Py::Object write(const Py::Tuple&);
00054     Py::Object flush(const Py::Tuple&);
00055 };
00056 
00065 class PythonStderr : public Py::PythonExtension<PythonStderr> 
00066 {
00067 private:
00068     PythonConsole* pyConsole;
00069 
00070 public:
00071     static void init_type(void);    // announce properties and methods
00072 
00073     PythonStderr(PythonConsole *pc);
00074     ~PythonStderr();
00075 
00076     Py::Object repr();
00077     Py::Object write(const Py::Tuple&);
00078     Py::Object flush(const Py::Tuple&);
00079 };
00080 
00089 class OutputStdout : public Py::PythonExtension<OutputStdout>
00090 {
00091 public:
00092     static void init_type(void);    // announce properties and methods
00093 
00094     OutputStdout();
00095     ~OutputStdout();
00096 
00097     Py::Object repr();
00098     Py::Object write(const Py::Tuple&);
00099     Py::Object flush(const Py::Tuple&);
00100 };
00101 
00110 class OutputStderr : public Py::PythonExtension<OutputStderr> 
00111 {
00112 public:
00113     static void init_type(void);    // announce properties and methods
00114 
00115     OutputStderr();
00116     ~OutputStderr();
00117 
00118     Py::Object repr();
00119     Py::Object write(const Py::Tuple&);
00120     Py::Object flush(const Py::Tuple&);
00121 };
00122 
00127 class PythonStdin : public Py::PythonExtension<PythonStdin> 
00128 {
00129 private:
00130     PythonConsole* pyConsole;
00131 
00132 public:
00133     static void init_type(void);    // announce properties and methods
00134 
00135     PythonStdin(PythonConsole *pc);
00136     ~PythonStdin();
00137 
00138     Py::Object repr();
00139     Py::Object readline(const Py::Tuple&);
00140 
00141 private:
00142     PythonInputField* editField;
00143 };
00144 
00145 } // namespace Gui
00146 
00147 #endif // GUI_PYTHONCONSOLE_PY_H

Generated on Wed Nov 23 19:00:32 2011 for FreeCAD by  doxygen 1.6.1