[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: about private 'd' pointer
From:       Simon Hausmann <sh () caldera ! de>
Date:       2000-08-31 7:45:08
[Download RAW message or body]

On Thu, Aug 31, 2000 at 09:49:03AM +0200, Falk Brettschneider wrote:
> Hi,
> 
> It is recommented to use a private 'd' pointer for binary compatibility.
> Well, but is it also possible to use a protected one?
> The problem is that all inheriting classes can't use that 'd' because
> it's private.

Well, the point about that d is exactly to be private! If you make it protected
and let inheritting classes access is, then adding/removing variables to/from the
structure breaks binary compatibility. (obviously)
(which makes the idea of the "d" void :)

So I think what you want are simple protected member variables. Just keep in mind
that these are fixed then, meaning adding/removing/changing them breaks binary compatibility.
But that's the price for the advantage of them being shared / available for inheritting classes.

Bye,
 Simon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic