My Project
CppToPython.hh
00001 /*
00002 $Id: CppToPython.hh 2350 2012-03-11 02:27:01Z tito $
00003 */
00004 
00005 
00006 #ifndef CPPTOPYTHON
00007 #define CPPTOPYTHON
00008 
00009 #include "Header.hh"
00010 
00012 
00023 class CppToPython
00024 {
00025 public:
00026   CppToPython();
00028  ~CppToPython();
00031   PyObject *MakeIntList( UInt4 size=0 );
00035   PyObject *VectorUInt4ToList( vector<UInt4> v );
00038   vector<UInt4> ListToUInt4Vector( PyObject *List );
00041   vector<UInt4> *ListToUInt4VectorP( PyObject *List );
00045   PyObject *VectorInt4ToList( vector<Int4> v );
00048   vector<Int4> ListToInt4Vector( PyObject *List );
00051   vector<Int4> *ListToInt4VectorP( PyObject *List );
00055   PyObject *VectorStringToList( vector<string> v );
00058   vector<string> ListToStringVector( PyObject *List );
00061   vector<string> *ListToStringVectorP( PyObject *List );
00065   PyObject *VectorToList( vector<UInt4>  v ){ return VectorUInt4ToList(v); }
00067   PyObject *VectorToList( vector<Int4>   v ){ return VectorInt4ToList(v); }
00069   PyObject *VectorToList( vector<Double> v ){ return VectorDoubleToList(v); }
00072   PyObject *MakeDoubleList( UInt4 size=0 );
00081   PyObject *VectorDoubleToList( vector<Double> v );
00087   vector<Double> ListToDoubleVector( PyObject *List );
00097   vector<Double> *ListToDoubleVectorP( PyObject *List );
00107   vector< vector<Int4> > ListToInt4VectorVector( PyObject *List ); //<-> Ito,T [20120311]
00110 };
00111 
00112 static CppToPython  __gCppToPython;
00115 #endif
 All Classes Functions Variables Friends