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 #ifdef MAC_SELF_CONTAINED_BUNDLE
00034   #include <Python27/Python.h>
00035 #else
00036   #include <Python.h>            // always first
00037 #endif // MAC_SELF_CONTAINED_BUNDLE
00038 #include "swigpyrun.h"         // contains SWIG access
00039 #include <panodata/Panorama.h>
00040 
00041 namespace hpi
00042 {
00050 class python_interface
00051 {
00052 private :
00054     bool activated;
00056     PyObject* hsi_module;
00058     PyObject* hpi_module;
00060     PyObject* load_module ( const char* name );
00061 
00062 public:
00064     python_interface() : activated(false) {};
00065     /* destructor, does cleanup */
00066     ~python_interface();
00067 
00075     bool activate();
00076 
00083     int call_hpi ( const char* hpi_func ,
00084                    PyObject* pArgs );
00085 };
00086 
00088 class python_arglist
00089 {
00090     // the class members are private
00091 private :
00092     PyObject* pArgs;
00093     int argc;
00094     int have;
00095 
00096 public:
00104     PyObject* make_hsi_object ( const char* hsi_type ,
00105                                 void* hugin_value );
00106 
00111     python_arglist ( int _argc );
00113     ~python_arglist();
00114 
00115 public :
00121     bool add ( PyObject* python_arg );
00127     bool add ( const char* str );
00131     PyObject* yield();
00132 };
00133 
00134 }; //namespace

Generated on Fri Aug 29 01:25:43 2014 for Hugintrunk by  doxygen 1.3.9.1