Re: [orbitcpp-list] Re: cpp branch: CORBA_Object struct hidden?



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]