[GCC-XML]RE: Detecting virtual inheritance (Pere Mato Vila)
Brad King
brad.king at kitware.com
Thu May 6 09:08:14 EDT 2004
Tony Cook wrote:
> See my comments below
>
> -----Original Message-----
> From: gccxml-admin at gccxml.org [mailto:gccxml-admin at gccxml.org] On Behalf
> Of
>
>
>> It has been quite easy after all. I am attaching the diff of what I
>>have done.=20
>> I have extended the existing qualifications of the bases with:
>>
>> _<id> public non virtual
>> protected:_<id> protected non virtual
>> private:_<id> private non virtual
>> virtual:_<id> public virtual
>> protected_virtual:_<id> protected virtual
>> private_virtual:_<id> private virtual
>>=20
>> The problem is that this change makes the XML output backward
>>incompatible. Any suggestion?
>>
>>
>> Pere
>
>
> Please, please DON'T format it this way - this not the best use of XML
> and makes writing transforms in XSLT a pig, and also makes writing a DTD
> or XML schema harder than it should be. The "location" attribute is not
> a good role model and the alternative "file" and "line" attributes where
> added to fix this (hope I got these attribute names right). Instead add
> a new attribute - say "inherit" (please choose some better name!). Then
> you would have:
>
> <tag id="_1" inherit="protected" ...>
>
>
> This is then backwards compatible (existing transforms or parsing code
> not knowing about "inherit" will not trip up, but will miss this extra
> info)
Actually, Pere was not the one to introduce that syntax. It is already
present for protected and private inheritance. No one notices, though,
because that form of inheritance is so rarely used. I'll work on an
alternative format when I get a chance.
-Brad
More information about the gccxml
mailing list