[C++-sig] Pyste: Resolution of order of exports.

Nicodemus nicodemus at globalite.com.br
Tue Jul 8 18:11:38 CEST 2003

Prabhu Ramachandran wrote:

>I was thinking of something along these lines:
> 1. While writing the module section for each class, also add a
>    comment that contains all the bases in order (via ClassBases).
>    Something like so:
>// bases = [B, C, D]
>void Export_A()
> 2. I'll then read this 'bases' information when generating _main.cpp
>    and then for each base, ensure that the order is such that each of
>    the bases or ancestral bases is exported earlier.  I'm guessing
>    that this should be fairly easy to do and does not seem too bad a
>    hack to be considered inelegant.  It also eliminates the need to
>    generate a separate file.  Is there a simpler way or an
>    alternative?  Thoughts?

I don't know, it seems to much like a "hack" to me. 8/
Let's get together on IRC to discuss this better, like you proposeed.

>BTW, in your code you group the exporters based on the header used and
>then sort the list based on Order.  I'm not sure that this approach is
>guaranteed to work all the time since if the base is in another header
>the sorting won't work.  However, I might be wrong and if you are sure
>that it will work then we could do that, i.e. write the header info
>and then the 'Order' then do the same thing that you do.
>Will this approach work?  What do you folks think?

 From your other email, we have a bug here. 8(

Thanks Prabhu,

More information about the Cplusplus-sig mailing list