Hi
Because of the way UNO works, it is quite common for the same UNO
interface to be implemented at multiple places in the class hierarchy.
The solution to this is virtual inheritance.
However, we cannot simply "turn it on" because:
(a) it would break binary compatibility
(b) there is quite a lot of code that would need to change
(c) It is quite likely that there is code that will stop working when it
starts using virtual inheritance.
For this reason, I would like __as a temporary measure__[0] to introduce
a "virtual" keyword[1] to the UNO IDL.
This keyword would have no meaning for languages other than C++.[2]
I don't think we can realistically expect to be able to implement
virtual inheritance any other way.
A "big bang" approach would require massive amounts of testing and a
fairly large patch.
With an incremental approach, we can modify the non-public bits first,
flushing out bugs slowly and gaining experience with the likely problems.
Also, we can mandate that new UNO interfaces use virtual inheritance.
Then whenever we do our ABI-breaking release, we can spend that dev
cycle sorting out the public interfaces.
Regards, Noel Grandin
[0] I do realise that "temporary" in this case is likely to be
2-5 years :-)
[1] My proposed syntax is something along the lines of
interface MyInterface {
virtual interface MyBaseInterface;
}
[2] Perhaps we can make the syntax more obviously C++ specific?
Disclaimer: http://www.peralex.com/disclaimer.html
Context
- UNO, virtual base (or the lack thereof) problem · Noel Grandin
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.