Re: [orbitcpp-list] Re: cpp branch: CORBA_Object struct hidden?
- From: murrayc t-online de (Murray Cumming)
- To: Richard Andrews <bbmaj7 yahoo com au>
- Cc: Michael Meeks <michael ximian com>,Sam Couter <sam topic com au>, orbit-list <orbit-list gnome org>,orbitcpp-list <orbitcpp-list lists sourceforge net>
- Subject: Re: [orbitcpp-list] Re: cpp branch: CORBA_Object struct hidden?
- Date: 20 Feb 2002 09:26:30 +0100
On Wed, 2002-02-20 at 01:31, Richard Andrews wrote:
> --- Murray Cumming <murrayc@t-online.de> wrote:
> > 1. If a C++ class inherits from a struct, then it would make that
> > struct public to anybody who uses the C++ class.
>
> What happens if you use private inheritance?
>
> eg.
>
> class OrbitCPP_Object : private CORBA_Object
> {
> ....
> };
>
> My understanding (although I haven't used private inheritance for
> years) is that this should make the internal data storage of the
> OrbitCPP_Object the same as a CORBA_Object (so casting between them
> is possible),
That would be true for normal public inheritance anyway.
> but the storage structure will not be publicly
> available to clients of OrbitCPP_Object.
It doesn't change the fact that the CORBA_Object's declaration will be
publically available. That's 2 different meanings of 'public'.
--
Murray Cumming
murrayc@usa.net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]