My Project
|
Connector between Python and C++ environment. More...
#include <CppToPython.hh>
Public Member Functions | |
CppToPython () | |
~CppToPython () | |
PyObject * | MakeIntList (UInt4 size=0) |
PyObject * | VectorUInt4ToList (vector< UInt4 > v) |
vector< UInt4 > | ListToUInt4Vector (PyObject *List) |
vector< UInt4 > * | ListToUInt4VectorP (PyObject *List) |
PyObject * | VectorInt4ToList (vector< Int4 > v) |
vector< Int4 > | ListToInt4Vector (PyObject *List) |
vector< Int4 > * | ListToInt4VectorP (PyObject *List) |
PyObject * | VectorStringToList (vector< string > v) |
vector< string > | ListToStringVector (PyObject *List) |
vector< string > * | ListToStringVectorP (PyObject *List) |
PyObject * | VectorToList (vector< UInt4 > v) |
PyObject * | VectorToList (vector< Int4 > v) |
PyObject * | VectorToList (vector< Double > v) |
PyObject * | MakeDoubleList (UInt4 size=0) |
PyObject * | VectorDoubleToList (vector< Double > v) |
vector< Double > | ListToDoubleVector (PyObject *List) |
vector< Double > * | ListToDoubleVectorP (PyObject *List) |
vector< vector< Int4 > > | ListToInt4VectorVector (PyObject *List) |
Connector between Python and C++ environment.
This class is applied to data-converter between Python and C++ environment. "PyObject*", Python-list, tuple, double, int etc, can be accessed on C++ environment. The access speed to Python-Object in C++ environment is faster than that in Python environment. If you want to pass large Python-object from C++ to Python, it should be manipulated in C++ environment with this class.
Constructor.
Destructor.
vector< Double > CppToPython::ListToDoubleVector | ( | PyObject * | List | ) |
This method returns "vector<Double>" converted from the argument of a Python-List. The type of the argument of this method is PyObject*. If the type of it is not Python-list, the warning message is sent to the standard-output, and a STL-vector whose size is zero will be returned to avoid problems.
vector< Double > * CppToPython::ListToDoubleVectorP | ( | PyObject * | List | ) |
This method returns "vector<Double>*" converted from the argument of a Python-List. The type of the argument of this method is PyObject*. If the type of it is not Python-list, the warning message is sent to the standard-output, and a STL-vector whose size is zero will be returned to avoid problems.
vector< Int4 > CppToPython::ListToInt4Vector | ( | PyObject * | List | ) |
This method converts from a python list object into a vector<Int4> object.
vector< Int4 > * CppToPython::ListToInt4VectorP | ( | PyObject * | List | ) |
This method converts from a python list object into a vector<UInt4> dynamically-object.
vector< string > CppToPython::ListToStringVector | ( | PyObject * | List | ) |
This method converts from a python list object into a vector<string> object.
vector< string > * CppToPython::ListToStringVectorP | ( | PyObject * | List | ) |
This method converts from a python list object into a vector<string> dynamically-object.
vector< UInt4 > CppToPython::ListToUInt4Vector | ( | PyObject * | List | ) |
This method converts from a python list object into a vector<UInt4> object.
vector< UInt4 > * CppToPython::ListToUInt4VectorP | ( | PyObject * | List | ) |
This method converts from a python list object into a vector<UInt4> dynamically-object.
PyObject * CppToPython::MakeDoubleList | ( | UInt4 | size = 0 | ) |
This method returns a Python-List whose element data-type is double. The argument of the integer is the size of the Python-list produced in this method. The value of each element is set as zero.
PyObject * CppToPython::MakeIntList | ( | UInt4 | size = 0 | ) |
Returns a python list object, and its each value is integer.
PyObject * CppToPython::VectorDoubleToList | ( | vector< Double > | v | ) |
Converts from a STL-vector to a Python-List. The data-type of the vector- and list-elements are "Double".
PyObject * CppToPython::VectorInt4ToList | ( | vector< Int4 > | v | ) |
This method converts from a vector<Int4> object into a python list object.
PyObject * CppToPython::VectorStringToList | ( | vector< string > | v | ) |
This method converts from a vector<string> object into a python list object.
PyObject* CppToPython::VectorToList | ( | vector< UInt4 > | v | ) | [inline] |
Alias of VectorUInt4ToList(v).
PyObject* CppToPython::VectorToList | ( | vector< Int4 > | v | ) | [inline] |
Alias of VectorInt4ToList(v).
PyObject* CppToPython::VectorToList | ( | vector< Double > | v | ) | [inline] |
Alias of VectorDoubleToList(v).
PyObject * CppToPython::VectorUInt4ToList | ( | vector< UInt4 > | v | ) |
This method converts from a vector<UInt4> object into a python list object.