Re: [orbitcpp-list] Re: cpp branch: CORBA_Object struct hidden?
- From: murrayc t-online de (Murray Cumming)
- To: Michael Meeks <michael ximian com>
- Cc: 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: 19 Feb 2002 10:58:05 +0100
On Tue, 2002-02-19 at 10:04, Michael Meeks wrote:
> Hi Murray,
>
> On Tue, 2002-02-19 at 09:04, Murray Cumming wrote:
> > 1. If a C++ class inherits from a struct, then it would make that struct
> > public to anybody who uses the C++ class.
>
> You don't need to inherit anything public from it. Just some internal
> structures eg.
>
> typedef struct {
> CORBA_Object_type base;
> gpointer cpp_impl_pointer;
> } ORBitCppInternalStruct;
So CORBA::Object would inherit from ORBITCppInternalStruct? Then I don't
see the purpose of cpp_impl_pointer, and I don't see how this is
different than having the CORBA_Object as a member field instead of
inheriting.
> > 2. We seem to need the CORBA_Object to be a member rather than a base
> > class, to allow for wrapping of existing CORBA_Object instances.
>
> Hmm; true - then again that can most likely be achieved by either a)
> having an accessor method or b) keeping a CORBA_Object pointer that you
> use for this purpose on the C++ wrapper, and simply narrowing that
> inside the C++ impl. to ORBitCppInternalStruct.
There's no publicness problem in having the CORBA_Object as a member.
The current problem is that there is no way to get an already existing
C++ wrapper instance from a C CORBA_Object instance. It's the lack of a
g_object_set_qdata() as mentioned in another thread.
Maybe there's a better way to do this. After all, how would a Perl or
Python binding libbonobo binding create a Perl/Python stub for an
existing C CORBA_Object instance? For instance, is there any kind of
instance ID? Can I create a 2nd CORBA_Object stub instance for the same
BonoboWindow?
--
Murray Cumming
murrayc@usa.net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]