Re: public virtual in PyROOT

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 4 Aug 2010 15:56:00 -0500


> Would you briefly tell me what the main problem in using virtual inheritance with TClass, please? Is that a streamer or I/O problem?

It is a representation (and use) problem. Currently the offset of the base classes of a specific class is a fixed offset. To implement virtual inheritance you need to make this 'offset' dependent on the derived type actually used.

Cheers,
Philippe.

On 8/4/10 2:22 PM, OKUMURA, Akira wrote:
> Hello Wim and Philippe,
>
> Thanks a lot for your comments and quick update. As Philippe mentioned, it seems that I should consider another implementation in my current code to avoid using diamond inheritance.
>
> Would you briefly tell me what the main problem in using virtual inheritance with TClass, please? Is that a streamer or I/O problem?
>
> Regards,
>
> --
> OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
> Institute of Space and Astronautical Science (ISAS/JAXA)
> Now at KIPAC/SLAC/Stanford
> Varian Physics #306
> 382 Via Pueblo Mall, MC 406 Stanford, CA94305
> TEL 650-736-0971/FAX 650-724-5065
> Skype : okumura.akira
>
> On 2010/08/04, at 12:03, WLavrijsen_at_lbl.gov wrote:
>
>
>> Akira,
>>
>> thanks for reporting. There's an issue with the upcasting to a TObject in
>> the case of virtual inheritance. As Philippe indicates, support is not there,
>> but a workaround is possible. Now in trunk.
>>
>> Best regards,
>> Wim
>> --
>> WLavrijsen_at_lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
>>
>
Received on Wed Aug 04 2010 - 22:56:06 CEST

This archive was generated by hypermail 2.2.0 : Fri Aug 06 2010 - 17:50:01 CEST