7 #ifndef __pyfe_Convertor_h__ 8 #define __pyfe_Convertor_h__ 12 #include <boost/python.hpp> 17 template<
class rawtype,
class bindtype>
18 class Convertor :
public BaseConvertor
21 Convertor(
object boostclass)
23 m_boostclass = boostclass;
25 virtual ~Convertor(
void) { }
28 if(instance.type()->typeinfo() == spBT->typeinfo())
30 object o = m_boostclass();
31 extract<bindtype&> ex(o);
34 bt.assign( *(reinterpret_cast<rawtype *>(instance.data())));
38 return Py_BuildValue(
"");
42 handle<> h(borrowed(pObject));
44 extract<bindtype&> x(o);
50 rawtype *pR = bt.rawptr();
Smart pointer used with types represented by BaseType.
Definition: Instance.h:28
python binding
Definition: namespace.dox:7