Archived

This forum has been archived. Please start a new discussion on GitHub.

Interface identity

Hi
I have a small question regarding interface identity.
Assume the following psuedo interfaces
interface IA:
void f([out] IB ib);
void g([out] IB ib);

So a call (sorry for the bad code)
IB *ib1;
IB *ib2;
pIA->f(&ib1);
pIA->g(&ib2);

Is it possible to determine whether or not the ib1 and ib2 are pointing to the same interface (object) on the server?
This example is simple and more complex combinations are possible!

The question is important because our current system uses a proxy-manager to use cached network-proxies when handing out the handles (handle-body idiom) that are pointing to network objects.

Comments

  • marc
    marc Florida
    You can easily determine whether two proxies point to the same Ice object by comparing the identities contained in the proxies. I contrast to other object middleware (notably CORBA), Ice has a built-in concept of object identity. See chapter 6.11.3 in the Ice manual.