PLearn 0.1
|
#include <PythonObjectWrapper.h>
Static Public Member Functions | |
static PyObject * | newPyObject (const T *x) |
Definition at line 962 of file PythonObjectWrapper.h.
static PyObject* PLearn::ConvertToPyObject< T * >::newPyObject | ( | const T * | x | ) | [inline, static] |
Definition at line 964 of file PythonObjectWrapper.h.
References PLearn::PythonObjectWrapper::newPyObject(), PLearn::ConvertToPyObject< T >::newPyObject(), and PLERROR.
{ if(!x) // null ptr. becomes None return PythonObjectWrapper::newPyObject(); if (const Object* objx = dynamic_cast<const Object*>(x)) return ConvertToPyObject<Object*>::newPyObject(objx); PLERROR("Cannot convert type %s by value to python", TypeTraits<T*>::name().c_str()); return 0;//shut up compiler }