Hi Python-Experts :-)
i am starting to get really frustrated trying to expose a simple C++
polymorphism to python with boost::python.
I do have the following structure in C++:
struct Base {
int typeID;
};
struct Derived : public Base {
int derivedProperty;
}
derived
hello PythonDerived
hello Base 0
Holger
Landesbank Baden-Wuerttemberg
Anstalt des oeffentlichen Rechts
Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz
HRA 12704
Amtsgericht Stuttgart
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://
g a wrapper class:
class Base
{
public:
void init( int first, int second, int third, int fourth ) {
//doWhatEver }
//a lot of other functions
};
class Derived : public Base
{
};
BOOST_PYTHON_MODULE( my_module )
{
class_( "Base", init<>() )
.def("init", &
printIt(_Base {lvalue})
I tried a lot of modification but always getting this message.
Does somebody of you know what i am missing?
Thanks a lot in advance!
Best regards!
--
Erik Türke
Department of Neurophysics
Max-Planck-Institute for Human Cognitive and Brain Sci
i need it there.
Is someone aware of this problem and can give me a hint? Thanks for your
help!
Best regards!
Erik Türke
Department of Neurophysics
Max-Planck-Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1A
04103 Leipzig
Germany
Tel: +49 341 99 40-2440
Email: