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



Hi Murray,

On Tue, 2002-02-19 at 19:38, Murray Cumming wrote:
> > > For instance, is there any kind of
> > > instance ID? Can I create a 2nd CORBA_Object stub instance for the same
> > > BonoboWindow?
> 
> That wasn't a suggestion. It's a question from a CORBA newbie.

	Ahh ;-) ok.

> Is it possible to get a 2nd stub for the same server instance? For
> instance, can I have 2 BonoboWindow*s which can be used to manipulate
> the same actual visible Bonobo window (forgive me if my capitalization
> is wrong)?

	Ok; so BonoboWindow is not such a good example, since we can't get a
CORBA reference to it; we can get a CORBA reference to a
BonoboUIContainer [Bonobo_UIContainer] object.

	And yes we can get multiple references to it; simply doing

	new_ref = CORBA_Object_duplicate (old_ref, &ev);

	will give us a new reference that points to the object; clearly this
needs to be wrapped for C++ in a far more cunning fashion [ I assume -
in fact I've no idea how you'd do it ;-].

	So - the stub really stores almost no state; ie. CORBA_Object is opaque
precisely because the information in it is only really necessary for
marshaling and de-marshaling so ...

> If so, is it possible to get the 2nd stub from the 1st stub, or is this
> only possible when a get_something() method happens to return references
> to the same server object?

	As above really; also - more tryingly if we have B inherits from A,
then a method can return an 'A' and then narrow it to a 'B' later, which
should be dealt with I suppose. I know not how a C++ binding should /
can deal with this - lots of rtti ?

	Does that help ?

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot




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