PLearn 0.1
Classes | Namespaces | Defines | Functions
PythonObjectWrapper.h File Reference
#include <plearn/python/PythonIncludes.h>
#include <utility>
#include <vector>
#include <map>
#include <set>
#include <limits>
#include <plearn/math/TVec.h>
#include <plearn/math/TMat.h>
#include <plearn/base/tostring.h>
#include <plearn/base/PMemPool.h>
#include <plearn/base/TypeTraits.h>
#include <plearn/base/tuple.h>
#include <plearn/base/CopiesMap.h>
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
Include dependency graph for PythonObjectWrapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PLearn::ConvertFromPyObject< T >
 Set of conversion functions from Python to C++. More...
struct  PLearn::ConvertFromPyObject< PyObject * >
struct  PLearn::ConvertFromPyObject< bool >
struct  PLearn::ConvertFromPyObject< short >
struct  PLearn::ConvertFromPyObject< unsigned short >
struct  PLearn::ConvertFromPyObject< int >
struct  PLearn::ConvertFromPyObject< unsigned int >
struct  PLearn::ConvertFromPyObject< long >
struct  PLearn::ConvertFromPyObject< unsigned long >
struct  PLearn::ConvertFromPyObject< long long >
struct  PLearn::ConvertFromPyObject< unsigned long long >
struct  PLearn::ConvertFromPyObject< double >
struct  PLearn::ConvertFromPyObject< float >
struct  PLearn::ConvertFromPyObject< string >
struct  PLearn::ConvertFromPyObject< PPath >
struct  PLearn::ConvertFromPyObject< PPointable * >
struct  PLearn::ConvertFromPyObject< Object * >
struct  PLearn::ConvertFromPyObject< T * >
 ***///*** More...
struct  PLearn::ConvertFromPyObject< Vec >
 ***///*** More...
struct  PLearn::ConvertFromPyObject< Mat >
struct  PLearn::ConvertFromPyObject< PP< VMatrix > >
struct  PLearn::ConvertFromPyObject< PythonObjectWrapper >
struct  PLearn::ConvertFromPyObject< PP< T > >
struct  PLearn::ConvertFromPyObject< TVec< T > >
struct  PLearn::ConvertFromPyObject< Array< T > >
struct  PLearn::ConvertFromPyObject< TMat< T > >
struct  PLearn::ConvertFromPyObject< std::vector< T > >
struct  PLearn::ConvertFromPyObject< std::map< T, U > >
struct  PLearn::ConvertFromPyObject< std::set< T > >
struct  PLearn::ConvertFromPyObject< std::pair< T, U > >
struct  PLearn::ConvertFromPyObject< CopiesMap >
struct  PLearn::ConvertFromPyObject< VarArray >
struct  PLearn::ConvertFromPyObject< RealRange >
struct  PLearn::ConvertFromPyObject< VMField >
struct  PLearn::ConvertToPyObject< T >
struct  PLearn::ConvertToPyObject< Object * >
struct  PLearn::ConvertToPyObject< bool >
struct  PLearn::ConvertToPyObject< short >
struct  PLearn::ConvertToPyObject< unsigned short >
struct  PLearn::ConvertToPyObject< int >
struct  PLearn::ConvertToPyObject< unsigned int >
struct  PLearn::ConvertToPyObject< long >
struct  PLearn::ConvertToPyObject< unsigned long >
struct  PLearn::ConvertToPyObject< long long >
struct  PLearn::ConvertToPyObject< unsigned long long >
struct  PLearn::ConvertToPyObject< double >
struct  PLearn::ConvertToPyObject< float >
struct  PLearn::ConvertToPyObject< char * >
struct  PLearn::ConvertToPyObject< char[N]>
struct  PLearn::ConvertToPyObject< string >
struct  PLearn::ConvertToPyObject< PPath >
struct  PLearn::ConvertToPyObject< Vec >
 PLearn Vec: use numarray. More...
struct  PLearn::ConvertToPyObject< Mat >
 PLearn Mat: use numarray. More...
struct  PLearn::ConvertToPyObject< PP< VMatrix > >
 PLearn VMat. More...
struct  PLearn::ConvertToPyObject< PP< T > >
 Generic PP: wrap pointed object. More...
struct  PLearn::ConvertToPyObject< tuple< T > >
 tuples (1 to 7 elts.) More...
struct  PLearn::ConvertToPyObject< tuple< T, U > >
struct  PLearn::ConvertToPyObject< tuple< T, U, V > >
struct  PLearn::ConvertToPyObject< tuple< T, U, V, W > >
struct  PLearn::ConvertToPyObject< tuple< T, U, V, W, X > >
struct  PLearn::ConvertToPyObject< tuple< T, U, V, W, X, Y > >
struct  PLearn::ConvertToPyObject< tuple< T, U, V, W, X, Y, Z > >
struct  PLearn::ConvertToPyObject< Array< T > >
 Generic array: create a Python list of those objects recursively. More...
struct  PLearn::ConvertToPyObject< TVec< T > >
 Generic vector: create a Python list of those objects recursively. More...
struct  PLearn::ConvertToPyObject< TMat< T > >
 Generic matrix: create a Python list of those objects recursively. More...
struct  PLearn::ConvertToPyObject< std::vector< T > >
 C++ stdlib vector<>: create a Python list of those objects recursively. More...
struct  PLearn::ConvertToPyObject< std::map< T, U > >
 C++ stlib map<>: create a Python dict of those objects. More...
struct  PLearn::ConvertToPyObject< std::set< T > >
 C++ stlib set<>: create a Python set of those objects. More...
struct  PLearn::ConvertToPyObject< std::pair< T, U > >
 C++ stdlib pair<>: create a Python tuple with two elements. More...
struct  PLearn::ConvertToPyObject< std::vector< T > const * >
 Pointer to vector<>: simply dereference pointer, or None if NULL. More...
struct  PLearn::ConvertToPyObject< std::map< T, U > const * >
 Pointer to map<>: simply dereference pointer, or None if NULL. More...
struct  PLearn::ConvertToPyObject< std::set< T > const * >
 Pointer to set<>: simply dereference pointer, or None if NULL. More...
struct  PLearn::ConvertToPyObject< PythonObjectWrapper >
 For a general PythonObjectWrapper: we simply increment the refcount to the underlying Python object, no matter whether we own it or not. More...
struct  PLearn::ConvertToPyObject< CopiesMap >
struct  PLearn::ConvertToPyObject< VarArray >
struct  PLearn::ConvertToPyObject< RealRange >
struct  PLearn::ConvertToPyObject< VMField >
struct  PLearn::PLPyClass
class  PLearn::PythonGlobalInterpreterLock
 Ensure thread safety by managing the Python Global Interpreter Lock. More...
class  PLearn::PythonObjectWrapper
 Very lightweight wrapper over a Python Object that allows conversion to/from C++ types (including those of PLearn) More...
struct  PLearn::ConvertToPyObject< T * >
struct  PLearn::StaticConvertEnumFromPyObject< U, is_enum >
struct  PLearn::StaticConvertEnumFromPyObject< U, true >
struct  PLearn::StaticConvertEnumToPyObject< T, is_enum >
struct  PLearn::StaticConvertEnumToPyObject< T, true >
class  PLearn::TypeTraits< PythonObjectWrapper >

Namespaces

namespace  PLearn
 

< for swap


Defines

#define PL_NPY_REAL   NPY_DOUBLE
#define tReal   tFloat64

Functions

void PLearn::PLPythonConversionError (const char *function_name, PyObject *pyobj, bool print_traceback)
 Used for error reporting.
template<class I >
PLearn::integerFromPyObject (PyObject *pyobj, bool print_traceback)
 Used to retrieve integer values from python if possible without precision loss, and convert them to requested type.
template<typename T >
int PLearn::numpyType ()
template<>
int PLearn::numpyType< bool > ()
template<>
int PLearn::numpyType< signed char > ()
template<>
int PLearn::numpyType< unsigned char > ()
template<>
int PLearn::numpyType< signed short > ()
template<>
int PLearn::numpyType< unsigned short > ()
template<>
int PLearn::numpyType< signed int > ()
template<>
int PLearn::numpyType< unsigned int > ()
template<>
int PLearn::numpyType< signed long > ()
template<>
int PLearn::numpyType< unsigned long > ()
template<>
int PLearn::numpyType< signed long long > ()
template<>
int PLearn::numpyType< unsigned long long > ()
template<>
int PLearn::numpyType< float > ()
template<>
int PLearn::numpyType< double > ()
template<>
int PLearn::numpyType< long double > ()
template<class I >
PyObject * PLearn::integerToPyObject (const I &x)
 Used to convert integer values to python, using PyInt if possible.
PyObject * PLearn::convertArrayCheck (PyObject *pyobj, int numpy_type, int ndim, bool print_traceback)
PStream & PLearn::operator>> (PStream &in, PythonObjectWrapper &v)
PStream & PLearn::operator<< (PStream &out, const PythonObjectWrapper &v)
PStream & PLearn::operator>> (PStream &in, PyObject *v)
PStream & PLearn::operator<< (PStream &out, const PyObject *v)
void PLearn::printWrappedObjects ()
 debug
void PLearn::ramassePoubelles ()
bool PLearn::getVMatAsPtr ()
bool PLearn::setVMatAsPtr (bool vmat_as_ptr)

Detailed Description

Definition in file PythonObjectWrapper.h.


Define Documentation

#define PL_NPY_REAL   NPY_DOUBLE
#define tReal   tFloat64
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines