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



On Thu, 2002-02-21 at 12:34, Sam Couter wrote:
> One of the original goals of the ORBit-C++ project was that a programmer
> should be able to treat a C++ object as the C equivalent, and any C
> objects as the C++ equivalent.

What was the advantage of this? I'm increasingly thinking that there's
no harm in the them being separate stub instances.

And there should be no harm in 2 CORBA::Object instances sharing the
same underlying CORBA_Object - refcounting will take care of lifetime
issues. I was thinking too much about how gtkmm does things, where we
hook virtual functions into the underlying C struct, and therefore need
to be more careful about actual instances.

> This goal meant that, amongst other
> things, the C++ object was the exact same size of the C object. This was
> usually achieved by having a single member variable, which was the C
> struct representing the type. Not a pointer to the struct, but the
> struct itself.

I don't see a need for extra member variables at the moment, but I'd
prefer not to have this restriction unless there's a good reason.

-- 
Murray Cumming
murrayc@usa.net
www.murrayc.com




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