Re: [pygccxml-development] Can held_type be an abstract class?
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-06-18 06:55:07
|
On 6/18/06, Lakin Wecker <lak...@gm...> wrote: > Hi, > > I've applied some code that Roman and I came up with to wrap and > appropriately use the Ogre::SharedPtr class. In one case I'm setting > the held_type of Ogre::Resource to be Ogre::SharedPtr <Ogre::Resource> > .. However when I try to compile the generated code, I get the > following error. > > /home/lakin/code_personal/python-ogre/build/Resource.pypp.cpp:284: > instantiated from here > /usr/include/boost/python/object/pointer_holder.hpp:179: error: cannot > allocate an object of abstract type 'Ogre::Resource' > /home/lakin/.local//include/OGRE/OgreResource.h:68: note: because > the following virtual functions are pure within 'Ogre::Resource': > /home/lakin/.local//include/OGRE/OgreResource.h:101: note: virtual > void Ogre::Resource::loadImpl() > /home/lakin/.local//include/OGRE/OgreResource.h:105: note: virtual > void Ogre::Resource::unloadImpl() > /home/lakin/.local//include/OGRE/OgreResource.h:107: note: virtual > size_t Ogre::Resource::calculateSize() const > /usr/include/boost/python/object/pointer_holder.hpp: In constructor > 'boost::python::objects::pointer_holder<Pointer, > Value>::pointer_holder(PyObject*, A0, A1, A2, A3, A4, A5) [with A0 = > Ogre::ResourceManager*, A1 = > boost::python::objects::reference_to_value<const Ogre::String&>, A2 = > long unsigned int, A3 = > boost::python::objects::reference_to_value<const Ogre::String&>, A4 = > bool, A5 = Ogre::ManualResourceLoader*, Pointer = > Ogre::SharedPtr<Ogre::Resource>, Value = Ogre::Resource]': > > Anyone with ideas? Yes. Held type could not be abstract. SharedPtr<Resource> is not abstract. I guess, that pyplusplus does not generates no_init or something like this. I will check this evening, okay? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |