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



 --- 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), but the storage structure will not be publicly
available to clients of OrbitCPP_Object.

Is this what you need?


http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]