Re: [pygccxml-development] Implicit virtual functions in derived classes
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2008-02-16 07:46:34
|
On Sat, Feb 16, 2008 at 3:29 AM, Julian Scheid <jul...@rs...> wrote: > There's also another problem with this approach (both your patch and my > similar fix): the API I'm wrapping is a rather large class hierarchy, > and nearly all classes are derived from a common base class with a large > number of virtual functions. > > Let's say for the sake of argument that it's 100 classes and 10 virtual > functions in the common base class. This leads to 1000 times the wrapper > functions generated, with almost identical code in each wrapper. I found > that my Py++ wrapper library, which is already quite large at roughly 20 > MB, gets blown up to over 40 MB once I include the base classes' virtual > functions. > > I wonder if it would be possible to derive wrappers from the base class > wrapper to help reduce this overhead? E.g. in my example, derive > B_wrapper from A_wrapper? Ideally you could also reuse the registration > code so that register_B_class would call something like > register_A_class_virtuals. I should think about this. For some reason I thought that it could not be done without additional code provided by user. Let me check this one more time. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |