00001
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <Python.h>
00034 #include "swigpyrun.h"
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
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
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 };