[C++-sig] Wrapping Just an Abstract Base

Thomas Muldowney temas at box5.net
Sat Jul 26 09:32:02 CEST 2003


I'm having a mental breakdown on this one.  I have a factory returning a
pointer to an abstract base class that I've wrapped.  However, I can't
logically wrap the actual derived class because it's generated in a
plugin.  So, when I go to make a call on one of the abstract functions
it fails with an AttributeError exception.  Is there anyway to handle
this in a clean manner that keeps the API near the C++ API?  I've played
around with writing wrapper functions (taking the base class pointer)
that are defined on the class using the same name as the virtual
function.  Sadly, from my mailing list searches on this subject it seems
this is a bad idea and can possibly lead to lookup loops?  It does seem
to run properly, though.  Would love some feedback or a kick in the head
if I'm missing something in the docs and sites.

Thanks.

--temas







More information about the Cplusplus-sig mailing list