hpi_classes.h

Go to the documentation of this file.
00001 
00015 /*  This program is free software; you can redistribute it and/or
00016  *  modify it under the terms of the GNU General Public
00017  *  License as published by the Free Software Foundation; either
00018  *  version 2 of the License, or (at your option) any later version.
00019  *
00020  *  This software is distributed in the hope that it will be useful,
00021  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  *  General Public License for more details.
00024  *
00025  *  You should have received a copy of the GNU General Public
00026  *  License along with this software; if not, write to the Free Software
00027  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028  *
00029  *  KFJ 2011-01-18
00030  *
00031  */
00032 
00033 #include <Python.h>            // always first
00034 #include "swigpyrun.h"         // contains SWIG access
00035 #include <panodata/Panorama.h>
00036 
00037 namespace hpi
00038 {
00046 class python_interface
00047 {
00048 private :
00050     bool activated;
00052     PyObject* hsi_module;
00054     PyObject* hpi_module;
00056     PyObject* load_module ( const char* name );
00057 
00058 public:
00060     python_interface() : activated(false) {};
00061     /* destructor, does cleanup */
00062     ~python_interface();
00063 
00071     bool activate();
00072 
00079     int call_hpi ( const char* hpi_func ,
00080                    PyObject* pArgs );
00081 };
00082 
00084 class python_arglist
00085 {
00086     // the class members are private
00087 private :
00088     PyObject* pArgs;
00089     int argc;
00090     int have;
00091 
00092 public:
00100     PyObject* make_hsi_object ( const char* hsi_type ,
00101                                 void* hugin_value );
00102 
00107     python_arglist ( int _argc );
00109     ~python_arglist();
00110 
00111 public :
00117     bool add ( PyObject* python_arg );
00123     bool add ( const char* str );
00127     PyObject* yield();
00128 };
00129 
00130 }; //namespace

Generated on Sat May 25 01:25:40 2013 for Hugintrunk by  doxygen 1.3.9.1