[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: OT: What is the purpose of virtual_hook anyways?
From: Kuba Ober <kuba () mareimbrium ! org>
Date: 2005-01-21 18:47:08
Message-ID: 200501211347.08591.kuba () mareimbrium ! org
[Download RAW message or body]
On czwartek 20 styczeń 2005 11:21 am, David Faure wrote:
> On Thursday 20 January 2005 15:03, Jason Keirstead wrote:
> > Is it also to ensure BC, so that you have a generic entry point of data
> > into the class, in case you really need it?
>
> Yes. For internal additions of virtual methods. ( != adding virtual methods
> in public API, that can't be done )
Is adding virtual methods at the end of the class really a binary incompatible
change? Why?
I mean, AFAIK, if done properly it will only enlarge the virtual table for
given class. It won't move any previous items.
I.e. consider an application compiled with following .h file (O):
class Test {
virtual ~Test();
void F1()
};
Then, you change it as follows (N):
class Test {
virtual ~Test();
void F1();
virtual void F2();
};
The applications compiled with (O) header file won't have a way of referencing
F2. The library compiled with (N) doesn't break apps compiled with (O). The
apps compiled with (N) *and* referencing F2 will of course only work with (N)
(or newer) libraries.
So, what's the catch?
Cheers, Kuba Ober
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic